1 Reply Latest reply on Aug 19, 2011 3:59 AM by feroz.pasha18

    listbox has invalid value expression  in richfaces

    feroz.pasha18

      Hi ,

       

      I am getting this error

       

      "Component j_id_jsp_50032895_1:listbox has invalid value expression Guru" 
      while selecting the one of user from list of user in  ordering list i am getting this error has invalid expression

      my code is

      <rich:orderingList id="listbox" value="#{mainBean.userList}" var="lib"

                  listHeight="200" listWidth="150" converter="customConvertor"

                  selection="#{mainBean.selectedUser}">

                  <rich:column width="180">

                      <f:facet name="header">

                          <h:outputText value="User Name" />

                      </f:facet>

                      <h:outputText value="#{lib}"></h:outputText>

                  </rich:column>

       

                  <a4j:support event="onclick" ignoreDupResponses="true" reRender="mes"

                      requestDelay="800" action="#{mainBean.searchByKeyword}">

                  </a4j:support>

              </rich:orderingList>





      Converter class

      public class UserConverter implements Converter {

       

          @Override

          public Object getAsObject(FacesContext arg0, UIComponent arg1, String arg2) {

              // TODO Auto-generated method stub

              System.out.println("As object :"+arg2);

              return arg2;

          }

       

          @Override

          public String getAsString(FacesContext arg0, UIComponent arg1, Object arg2) {

             

              String username=(String)arg2;

              System.out.println("usern: "+username);

              return username;

          }

       

      }