This content has been marked as final.
Show 4 replies
-
1. Re: Objects in rich:comboBox
andersun Mar 19, 2008 2:57 PM (in response to andersun)And enableManualInput attribute doesn't work
-
2. Re: Objects in rich:comboBox
andrei_123 Mar 21, 2008 5:51 AM (in response to andersun)I have the same problem..
I have the 'Project' instance with 'projectId' and 'description' fields, and I want that comboBox in jsp includes descriptions and after submit - Project with projectId.
I tried to use Converter, but it didn't resolve this problem. To get the projectId in getAsObject method is necessary to return String projectId in getAsString method, but if getAsString method returns ids the comboBox on jsp shows Ids....
In my backing:List projects = new ArrayList(); ... projects.add(new SelectItem(project, project.getDescription())); ...
Anybody knows how to do it? -
3. Re: Objects in rich:comboBox
tkalactomo Mar 21, 2008 10:58 AM (in response to andersun)"Andrei_123" wrote:
I have the same problem..
Anybody knows how to do it?
I know that is the richfaces forum but,
I've used the tomahawk components...<t:selectOneMenu value="#{myBean.selectedObject}"> <t:selectItems value="#{myBean.someListGetter}" var="v" itemLabel="#{v.label}" itemValue="#{v}"/> </t:selectOneMenu>
Their description is:
An extended version of the standard UISelectItems. Populates the SelectItem collection from the
given value automatically using the itemLabel and itemValue attributes.
Of course I didn't try to use it in a rich:comboBox... -
4. Re: Objects in rich:comboBox
ilya_shaikovsky Mar 21, 2008 12:14 PM (in response to andersun)comboBox works only with values of selectItems.
Normally comboBox designed to be used with suggestionValues list of Strings. SelectItems support added only for declarative definitions on the page.