-
1. Re: richFaces suggestionbox! Send param for the backBean
ilya_shaikovsky Oct 12, 2007 4:56 AM (in response to nightiger)<rich:suggestionbox width="200" height="200" for="test" suggestionAction="#{bean.autocomplete}" var="cap"> <h:column> <f:facet name="header"> <h:outputText value="Sometext"></h:outputText> </f:facet> <h:outputText value="#{cap.text}"></h:outputText> </h:column> <a4j:support event="onselect" action="#{bean.action}"> <f:setPropertyActionListener value="#{cap.label}" target="#{bean.property1}" /> </a4j:support> </rich:suggestionbox>
Works as you need ;) -
2. Re: richFaces suggestionbox! Send param for the backBean
nightiger Oct 15, 2007 9:05 AM (in response to nightiger)But if I use this:
<f:setPropertyActionListener value="#{bean.label}"
target="#{bean.strString}" />
The value is set by is null, ever !
----------------------------------------------------
But if I use this:
<f:setPropertyActionListener value="LABELL"
target="#{bean.strString}" />
The value is set by correctly -
3. Re: richFaces suggestionbox! Send param for the backBean
softwareaksoy Oct 29, 2007 10:04 AM (in response to nightiger)I tried this example. I think "f:setPropertyActionListener" tag looks for the bean in a different scope than the request scope that h:suggestionBox tag uses.
-
4. Re: richFaces suggestionbox! Send param for the backBean
jamesjmp Oct 29, 2007 11:27 AM (in response to nightiger)softwareaksoy, how are you assigning the id to other field?
I was trying it this way:<s:decorate id="currencyIsoDecoration" template="layout/edit.xhtml"> <ui:define name="label">#{messages['CfgCurrency']}</ui:define> <h:inputText id="currencyIso" value="#{rstReportHome.instance.cfgCurrency.currencyIso}" required="true"> </h:inputText> <rich:suggestionbox for="currencyIso" suggestionAction="#{cfgCurrencySuggest.suggestCfgCurrency}" var="name" fetchValue="#{name.currencyIso}" tokens="," selfRendered="true" width="500"> <f:facet name="nothingLabel"> <h:outputText value="Empty"/> </f:facet> <h:column> <h:outputText value="#{name.currencyDes} (#{name.currencyIso})"></h:outputText> </h:column> <a:support event="onblur" reRender="currencyIso"/> </rich:suggestionbox> </s:decorate>
And now with<s:decorate id="currencyIsoDecoration" template="layout/edit.xhtml"> <ui:define name="label">#{messages['CfgCurrency']}</ui:define> <h:inputText id="currencyIso" value="#{rstReportHome.instance.cfgCurrency.currencyIso}" required="true"> </h:inputText> <rich:suggestionbox for="currencyIso" suggestionAction="#{cfgCurrencySuggest.suggestCfgCurrency}" var="name" fetchValue="#{name.currencyIso}" tokens="," selfRendered="true" width="500"> <f:facet name="nothingLabel"> <h:outputText value="Empty"/> </f:facet> <h:column> <h:outputText value="#{name.currencyDes} (#{name.currencyIso})"></h:outputText> </h:column> <a:support event="onselect" action="#{rstReportHome.sugBox}"> <f:setPropertyActionListener value="#{name.currencyIso}" target="#{rstReportHome.instance.cfgCurrency.currencyIso}" /> </a:support> </rich:suggestionbox> </s:decorate>
thanks in advance! -
5. Re: richFaces suggestionbox! Send param for the backBean
softwareaksoy Oct 29, 2007 11:41 AM (in response to nightiger)I couldnt make the code work, either. I tried many alternatives and none of them havent worked. I realized that the bean doesnt exist in request scope.
-
6. Re: richFaces suggestionbox! Send param for the backBean
jamesjmp Oct 29, 2007 12:32 PM (in response to nightiger)thank you! If anyone has succeeded in using suggestionBox please let us know. I can´t believe there is NOT a way of using it to store data selected in a bean!
-
7. Re: richFaces suggestionbox! Send param for the backBean
kazoo Nov 18, 2008 11:52 PM (in response to nightiger)It has been more than a year. I ran into the same problem that the value from f:setPropertyActionListener is always null when the backbean setter is called.
-
8. Re: richFaces suggestionbox! Send param for the backBean
ilya_shaikovsky Nov 19, 2008 4:15 AM (in response to nightiger)kazoo, such post tells nothing about the source of the problem. this post is too old. from those times I do not heard about non working f:setPropActListener.. So please make more input about your environment, your page..
And try to update from the beggining if you using some old RF versions .