This content has been marked as final.
Show 3 replies
-
1. Re: One suggestionBox to update 2 input fields
ilya_shaikovsky Apr 21, 2008 11:21 AM (in response to phread)seems something like I described at:
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4143150#4143150 -
2. Re: One suggestionBox to update 2 input fields
phread Apr 22, 2008 3:38 AM (in response to phread)In the mean time I've found an alternative solution :
<h:inputText id="city" value="#{address.city}" /> <rich:suggestionbox for="city" var="result" fetchValue="#{result.city}" suggestionAction="#{suggestAction.suggest}" nothingLabel="unknown city" > <h:column> <h:outputText value="#{result.zip}" /> </h:column> <h:column> <h:outputText value="#{result.city}" /> </h:column> <a4j:support event="onselect" action="#address.setZip(result.zip)}" reRender="zip" ></a4j:support> </rich:suggestionbox> <h:inputText id="zip" value="#{address.zip}" />
It works but there's an additional round trip to the server I'm not comfortable with. I'll try your solution, as it seems client side only -correct me if I'm wrong.
Thanks.
Fred B. -
3. Re: One suggestionBox to update 2 input fields
ilya_shaikovsky Apr 22, 2008 7:38 AM (in response to phread)Yes in my case the object instead just string comes from server. And the only you need to save it to some hidden. In future we plans to add JS API to more comfortable work with client side suggested objects