-
1. Re: suggestionbox selected item's object value retrieval
ilya_shaikovsky Mar 23, 2007 10:39 AM (in response to carlhowarth)use "fetchvalue" to define which of the columns must be displayed in the input
-
2. Re: suggestionbox selected item's object value retrieval
carlhowarth Mar 23, 2007 10:46 AM (in response to carlhowarth)Hello - I have done that already - I show 'displayName' which is a property of my user and is working fine. The issue is fetching the actual underlying selected object in the backing bean - displayName is not necessarily unique therefore I can't just loop until I find a matching user...
I have got around it by setting the fetchvalue to equal the object's id then the display value I require delimited with a |, I then use the onitemselect javascript to split these up and place my id in a hidden value... a little messy but it works! If there's a better way I'd like to hear it.
Cheers, Carl -
3. Re: suggestionbox selected item's object value retrieval
damianharvey Mar 27, 2007 4:16 AM (in response to carlhowarth)I have a similar requirement. I am currently doing the same and setting the fetch value to the id + some delimiter + label and parsing it on the backend.
Functionally this requirement is similar to how the Seam selectItems currently works; ie. it passes the whole object to the backend (have a look at it here: http://wiki.jboss.org/wiki/Wiki.jsp?page=SeamEntityConverter).
My understanding is that you should be able to use the Seam entityConverter to do this. I have asked this question in the Seam forum (http://www.jboss.com/index.html?module=bb&op=viewtopic&t=104306) and raised a feature request in the Seam JIRA so hopefully Pete Muir will get a chance to look at it.
Cheers,
Damian.