-
1. Re: How handle object from rich:suggestionbox ?
anonym365456 Jul 20, 2008 1:46 PM (in response to anonym365456)I know that possible is sth. like that in normal h:dataTable (rich:suggestionBox is similar):
UserInfo a = (UserInfo) FacesContext.getCurrentInstance().getExternalContext().getRequestMap().get("suggestUser");
but i checked this and I'm dissapointed because there is no request parameter named 'suggestUser'.
Any ideas? -
2. Re: How handle object from rich:suggestionbox ?
rolandotr Jul 20, 2008 8:44 PM (in response to anonym365456)you could use onselect event in conjunction with a4j:jsFunction for this purpose, maybe is not very clean but work.
-
3. Re: How handle object from rich:suggestionbox ?
benjes Aug 28, 2008 1:06 PM (in response to anonym365456)It seems I am not the only one who tries to figure out how to do it.
I've tried using a4j:jsFunction and onselect but that didn't work.<rich:suggestionbox id="suggestionBoxId" suggestionAction="#{suggestion.autocomplete}" var="result" fetchValue="#{result.name}" onselect="select(#{result.id})" immediate="true" >
and<a4j:jsFunction name="select" action="#{suggestion.setCurrentId()}" eventsQueue="foo" ignoreDupResponses="true"> <a4j:actionparam name="resultID" /> </a4j:jsFunction>
The problem is that resultID is undefined when the function is called.
Any other ideas how to do it? I guess I could wrap the whole table row in a a4j:commandLink or something. -
4. Re: How handle object from rich:suggestionbox ?
ilya_shaikovsky Aug 29, 2008 3:18 AM (in response to anonym365456)https://jira.jboss.org/jira/browse/RF-3657
please be patient.. I'll complete this till release. -
5. Re: How handle object from rich:suggestionbox ?
benjes Aug 29, 2008 10:27 AM (in response to anonym365456)Could you please give a little hint on how to do it for the impatient amongst us?
-
6. Re: How handle object from rich:suggestionbox ?
benjes Sep 1, 2008 5:01 AM (in response to anonym365456)Okay I found a way to do it using a4j:support and f:setPropertyActionListener
<rich:suggestionbox var="result" .... > ... <a4j:support event="onselect" reRender="myid"> <f:setPropertyActionListener value="#{result}" target="#{backingBean.currentObject}" /> </a4j:support> </rich:suggestionbox>
And in your backing bean you've gotpublic void setCurrentObject(Object current){ ... }
-
7. Re: How handle object from rich:suggestionbox ?
ilya_shaikovsky Sep 1, 2008 6:05 AM (in response to anonym365456)ok.. commited simple example to richfaces-demo. check it from SVN because it will not be online till release.
-
8. Re: How handle object from rich:suggestionbox ?
damnre Sep 5, 2008 4:27 PM (in response to anonym365456)Please could you specify where is the exemple please..or poste it here!
thanks -
9. Re: How handle object from rich:suggestionbox ?
nbelaevski Feb 27, 2009 7:21 AM (in response to anonym365456)"ilya_shaikovsky" wrote:
ok.. commited simple example to richfaces-demo. check it from SVN because it will not be online till release.
Ilya,
Where is this demo?