0 Replies Latest reply on Jan 11, 2010 10:40 AM by boy18nj

    EL expression for converter?

    boy18nj

      If I see the existing example provided for listhuttle on this page- http://docs.jboss.org/richfaces/3.3.2.GA/en/devguide/html/rich_listShuttle.html

       

      <rich:listShuttle id="myListShuttle" sourceValue="#{toolBar.freeItems}" targetValue="#{toolBar.items}" 
                                      sourceRequired = "true" targetRequired = "true" var="items" converter="listShuttleconverter"

                                      sourceCaptionLabel="Source List" targetCaptionLabel="Target List">

       

       

       


      But in my code this will not work. I get Illegal Argument exception- class not found.

      But if i use my converter using EL Expression it works fine. converter="#{listShuttleconverter}".

      Am i doing something wrong here ?

       

      My actual converter looks like this-

       

      @Name

       

      ("bankBrandsConverter")

      @BypassInterceptors

      @Scope

       

      (ScopeType.PAGE)

      @Converter

       

      (forClass=BankBrands.class)

      public

       

      class BankBrandsConverter

       

      implements javax.faces.convert.Converter{

       

       

      public Object getAsObject(FacesContext context, UIComponent component,

      String value) {

       

      int index = value.indexOf("}");

      String codeBrand = value.substring(0, index);

      String codeDesc =value.substring(index+1);

      BankBrands bankBrand =

      new BankBrands(codeBrand, codeDesc);

       

      return bankBrand;

      }

       

       

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

       

      return value.toString();

      }

      }