oncomplete event means when the ajax response from the server side is returned successfully to the browser, so it doesn't have a meaning to execute java code at this point. However
a4j:ajaxListener may help you.
It adds an action listener to the parent component that is fired during the Render Response phase.