-
1. Re: Combobox setting value
msantana Apr 2, 2009 7:06 PM (in response to msantana)Someone who has a clue?
-
2. Re: Combobox setting value
stefanotravelli Apr 2, 2009 8:25 PM (in response to msantana)There are several problems in your code.
The first is that the value property for rich:combobox points to the categoria.categoriaId. This won't work. Look at the <s:convertEntity>. Your code should look like:
<rich:comboBox value="#{productoHome.instance.categoria}" defaultLabel="Seleccione..." required="true" directInputSuggestions="true" /> <s:selectItems var="categoria" value="#{categoriaServiceBean.findAll()}" label="#{categoria.descripcion}" itemValue="#{categoria}" /> <s:convertEntity/> </rich:comboBox>
In order to enable the save button you also have to modify the isWired() method so that it doesn't check if categoria is null. The pattern for wired/not wired entity home needs a page refresh to work.
-
3. Re: Combobox setting value
msantana Apr 3, 2009 10:54 PM (in response to msantana)YES!! It work but the combobox is showing me the items with numbers! but the numbers aren´t the id´s however i want to show the descripition of the object, or the toString().
IF you have ideas I will be very thankful to you!!!
-
4. Re: Combobox setting value
williamfitz Jan 18, 2012 12:46 AM (in response to msantana)What is easy and what is difficult? Easy is to judge others mistakes and difficult is to recognize our own mistakes.Write My Essay For Me
-
5. Re: Combobox setting value
ramram888 Sep 20, 2012 2:49 AM (in response to msantana)Matias,
<rich:combo> works as a suggestion box and supports only a list of characters. your are using the below :
<s:selectItems var="categoria" itemLabel="#{categoria.descripcion}" itemValue="#{categoria.categoriaId}" />
instead use :
<s:selectItems var="categoria" itemLabel="#{categoria.categoriaId}" itemValue="#{categoria.descripcion}" />
the itemValue appears in the combo list and not the itemLabel. <rich:combo> is different from <h:selectOneMenu>.
Regards,