3 Replies Latest reply on Dec 7, 2011 11:45 AM by Tomas B

    ArrangeableModel with Errors

    Dominik Mueller Newbie

      Hi There,

       

      i implemented the ArrangeableModel as shown in the demo application. But i get the following error, while calling the page with the table:

       

      java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.lang.String

          at com.arvato.rewards.sumas.ui.utils.JPADataModel.createFilterCriteria(JPADataModel.java:180)

       

      The Problem is at this poin (last line):

       

       

       private Expression<Boolean> createFilterCriteria(CriteriaBuilder criteriaBuilder, Root<T> root)
        {
          Expression<Boolean> filterCriteria = null;
          List<FilterField> filterFields = arrangeableState.getFilterFields();
          if (filterFields != null && !filterFields.isEmpty())
          {
            FacesContext facesContext = FacesContext.getCurrentInstance();
      
            for (FilterField filterField : filterFields)
            {
              String propertyName = (String) filterField.getFilterExpression().getValue(facesContext.getELContext());
      

       

      he tries to determined the EL value: "#{property}" which is used in the including "jpaColumn.xhtml".

      But the ELContext can't resolve the value for this property! I debugged the application and tested other EL-Values. The "property" and "bean" values from the include-page can't be resolved, all other references (the managedbeans for example) worked well...

       

      Any ideas? Help?

       

      Thanks a lot

      d.müller

       

      System:

      Richfaces 4.0.0.Final

      Hibernate 3.6.6.

      Glassfish 3.1

        • 1. Re: ArrangeableModel with Errors
          fremak Newbie

          Any news? I'm experiencing the same issue...

          • 2. Re: ArrangeableModel with Errors
            Tomas B Newbie

            Hello, have you resolved it yet? ... I have the same issue .-(

            • 3. Re: ArrangeableModel with Errors
              Tomas B Newbie

              Perhaps I've found the solution(s) but I don't know which one of them is the right:

               

              if you are using maven, try this one: Add Exclusions tag with all exclusions.

               

              {code:xml}

              <dependency>

                          <groupId>org.richfaces.ui</groupId>

                          <artifactId>richfaces-components-ui</artifactId>

                          <version>${org.richfaces.bom.version}</version>

                          <exclusions>

                              <exclusion>

                                  <artifactId>jsf-api</artifactId>

                                  <groupId>com.sun.faces</groupId>

                              </exclusion>

                              <exclusion>

                                  <artifactId>jsf-impl</artifactId>

                                  <groupId>com.sun.faces</groupId>

                              </exclusion>

                          </exclusions>

                      </dependency>

               

              {code}

               

               

              The second one solution maybe is to change version of RF to 4.1.0.CR2.

               

              In both cases don't forget to clean your project.