And what about null values? How can I make an empty value? It was posible before but I now, I can't add a f:selectItem with a null or empty valueItem and I can't add a selectItem with null value to the list.
El jue, 19-04-2007 a las 09:38 -0400, Mike Kienenberger escribió: > Value needs to be an Integer if you're going to assign it to an int accessor. > > Ie, > > new SelectItem(Integer value, String label). > > > > On 4/19/07, Francesco Consumi <[EMAIL PROTECTED]> wrote: > > Citando Mike Kienenberger <[EMAIL PROTECTED]>: > > > > > Short answer: Old behavior was broken. New behavior matches the spec. > > > Long answer: Read through this thread, probably starting at the > > > beginning (postings after the one below probably aren't relevent to > > > your issue): > > > > > > http://www.mail-archive.com/[email protected]/msg34395.html > > > > > > Solution: Make sure that your itemValue attributes have value > > > bindings that return the correct type. If your value points to a > > > Long, this can be as simple as using "#{3}" to return a Long 3. > > > Otherwise, you'll have to convert or fetch the correct value type > > > yourself. > > > > > > Nice Long-term solution: submit a patch for Tomahawk selectItem so > > > that it automatically coerces the type like the old f:selectItem > > > component used to do. > > > > > > > a big thanks, but I don't understant what selectItem has to convert: > > > > this is the tag: > > > > <t:selectOneMenu value="#{mb.id_cassa_int}" > > > <f:selectItems value="#{mb.dblCasse.rows}"/> > > </t:selectOneMenu> > > > > this is the id_cassa_int declaration: > > > > private int id_cassa_int = 0; > > .... > > public int getId_cassa_fat() { return id_cassa_fat;} > > public void setId_cassa_fat(int id_cassa_fat) { this.id_cassa_fat = > > id_cassa_fat; } > > > > > > selectItems points to an ArrayList of selectItem, filled with strings, > > where "Value" is converted from Int. > > > > So, why does it need to convert something ? > > > > really thanks, > > -- > > Francesco Consumi > > Ufficio Sistemi informativi > > Istituto degli Innocenti > > Piazza SS.Annunziata, 12 > > 50122 Firenze > > consumi at istitutodeglinnocenti.it > > Tel. +39 055 2037320 > > ICQ# 12516133 > > > > > -- _______________________________________________ Josué Alcalde González [EMAIL PROTECTED] Dpto. Desarrollo CSA - Centro Regional de Servicios Avanzados C/ López Bravo, 1 Pol. Ind. Villalonquéjar (Burgos) Tel. (+34) 947 256 250 Fax. (+34) 947 256 583 Web: http://www.csa.es

