This content has been marked as final.
Show 1 reply
-
1. Re: required fields x focus
ilya_shaikovsky Aug 3, 2010 7:46 AM (in response to edilmar)just add some code to server side which check's if there are some faces messages (for example in phaseListener before render - add check for FacesContext.getClientIdsWithMessages()). if some components failed - store the first one in some view bean property. Then there are different options - you could add the clientId to focus attribute of the action component using EL binding or just add to inline script (which will be reRender'ed after request) like
<script>
focusTheFiled(#{someBean.storedIdOfFailedComponent});
</script>