This content has been marked as final.
Show 2 replies
-
1. Re: Retrieving Client ID of a JSF control
kragoth Dec 15, 2009 12:51 AM (in response to jonathan2009)This is very possible if you are using richfaces.
http://mkblog.exadel.com/ria/richfaces-ria/richfaces-built-in-client-functions/
So, essentially you would do this.
In your .xhtml something like this.
<ui:composition> <h:inputText id="myInput" value="myValue"/> <script> var myInputValue = getElementById("#{rich:clientId('myInput')}").value; alert(myInputValue); </script> </ui:composition>
Hope this helps. If you are not using Richfaces then you'll need a different method for retrieving this id.
-
2. Re: Retrieving Client ID of a JSF control
jonathan2009 Dec 15, 2009 4:28 PM (in response to jonathan2009)We are indeed using richfaces.
Many thanks!!