This content has been marked as final.
Show 4 replies
-
1. Re: Clearing inputText
ilya_shaikovsky Feb 4, 2009 4:10 AM (in response to l.fugaro)you could use onselect attribute on the suggestion defined for example with something like next code:
onselect="{rich:element('input2Id')}.value=''; "
-
2. Re: Clearing inputText
l.fugaro Feb 4, 2009 5:33 AM (in response to l.fugaro)Thanks for answering Ilya!
Your code works fine, but I think I have another problem.
Here is my code:<h:inputText id="inputText1" /> <rich:suggestionbox for="inputText1" suggestionAction="#{myService.getListCodePV}" var="pv" onselect="#{rich:element('inputText2')}.value='';" minChars="3"> <h:column> <h:outputText value="${pv.codePV}"/> </h:column> <a4j:support event="onselect" > <f:setPropertyActionListener value="#{pv.id}" target="#{myModel.id}" /> </a4j:support> </rich:suggestionbox> <h:inputText id="inputText2" /> <rich:suggestionbox for="inputText2" suggestionAction="#{myService.getListDescPV}" var="pv" onselect="#{rich:element('inputText1')}.value='';" minChars="3"> <h:column> <h:outputText value="${pv.descPV}"/> </h:column> <a4j:support event="onselect" > <f:setPropertyActionListener value="#{pv.id}" target="#{myModel.id}" /> </a4j:support> </rich:suggestionbox>
I think that the a4j:support event="onselect" ... goes in conflict with rich:suggestionbox onselect="..."
It seems like I have to choose only one of them.
Thanks for your help,
Luigi"ilya_shaikovsky" wrote:
you could use onselect attribute on the suggestion defined for example with something like next code:onselect="{rich:element('input2Id')}.value=''; "
-
3. Re: Clearing inputText
ilya_shaikovsky Feb 4, 2009 6:01 AM (in response to l.fugaro)ok :) not a problem. just move the code I mentioned to onsubmit of the support.
-
4. Re: Clearing inputText
l.fugaro Feb 4, 2009 6:47 AM (in response to l.fugaro)"ilya_shaikovsky" wrote:
ok :) not a problem. just move the code I mentioned to onsubmit of the support.
PERFETTO!!!
Thank you very very much!!![/img]