1 Reply Latest reply on Jun 18, 2012 8:28 AM by sivaprasad9394

    WARNING: FacesMessage(s) - Conversion error occurred on rich:inplaceSelect

    david.bono

      Hi all!

      I don't understand what's the problem in my code..

      I have a bean with an ArrayList<SelectItem> for a <rich:inplaceSelect> but there is some error of conversion...

      this is the code of jsp page:

       

                                              <rich:panel  id="dettaglioInModifica">

                                                      <f:facet name="header">

                                                          <h:outputText value="#{msg.medic_showPatient_pagetitle}" />

                                                      </f:facet>

                                                      <h:panelGrid columns="2" style="font-size: 0.9em;">

       

                                                              <h:outputText value="Medic: "/>

                                                              <rich:inplaceSelect id="medicoSelectUpD" value="#{user.medico}">

                                                                  <f:selectItems value="#{tblBean.optMedics}" />

                                                              </rich:inplaceSelect>

                                                              <%-- Capo villaggio select --%>

                                                              <h:outputText value="#{msg.medic_showPatient_field15} "/>

                                                              <rich:inplaceSelect id="capovillaggioSelectUpD" value="#{tblBean.pazienteSelezionato.capoVillaggio}">

                                                                  <f:selectItems value="#{tblBean.optVillageBoss}" />

                                                              </rich:inplaceSelect>

                                                      </h:panelGrid>

                                                  </rich:panel>

       

      And this is the code of tblBean:

       

      public class PazientiTblBean implements Serializable{

          //Liste

          private ArrayList<SBPaziente> listPazienti;

          private ArrayList<SBPaziente> listVillageBoss;

          private ArrayList<SBMedico> listMedics;

          //Liste per select

          private ArrayList<SelectItem> optMedics;

          private ArrayList<SelectItem> optVillageBoss;

       

       

          //Costruttore

          public PazientiTblBean() {

              this.listVillageBoss = myFramework.DatabaseStorage.getAllCapiVillaggio();

              this.listMedics = myFramework.DatabaseStorage.getAllMedics();

              this.optMedics = new ArrayList<SelectItem>();

              this.optVillageBoss = new ArrayList<SelectItem>();

              for(SBMedico m : this.listMedics)

                  this.optMedics.add(new SelectItem(m, m.getName()+" "+m.getSurname()));

              for(SBPaziente p : this.listVillageBoss)

                  this.optVillageBoss.add(new SelectItem(p, p.getName()+" "+p.getSurname()));

          }

       

          /*.....*/

       

      /**

           * @return the optMedics

           */

          public ArrayList<SelectItem> getOptMedics() {

              return optMedics;

          }

       

          /**

           * @param optMedics the optMedics to set

           */

          public void setOptMedics(ArrayList<SelectItem> optMedics) {

              this.optMedics = optMedics;

          }

       

          /**

           * @return the optVillageBoss

           */

          public ArrayList<SelectItem> getOptVillageBoss() {

              return optVillageBoss;

          }

       

          /**

           * @param optVillageBoss the optVillageBoss to set

           */

          public void setOptVillageBoss(ArrayList<SelectItem> optVillageBoss) {

              this.optVillageBoss = optVillageBoss;

          }

       

      }

       

      can you help me?