6 Replies Latest reply on Feb 12, 2008 4:00 AM by Taya Yerygina

    How to fix org.richfaces.component.UIDatascroller  class not

    Thiagu Mariappan Novice

      Hi everyone,

      I am using richfaces - 3.1.4.GA in my project

      I need to bind rich:datascroller component in my bean class
      So I tried to create reference for org.richfaces.component.UIDatascroller class.
      But it returns an error msg. :class not found.

      In my project classpath has richfaces-api-3.1.4.GA.jar file.
      But this jar file does not have that particular class
      Help me to resolve this issue

      Thanks in anticipation

      Thiagu. M

        • 1. Re: How to fix org.richfaces.component.UIDatascroller  class
          Thiagu Mariappan Novice

          i got this exception

          Caused by: java.lang.NoClassDefFoundError: org/richfaces/component/UIDatascroller
           at java.lang.Class.getDeclaredMethods0(Native Method)
           at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
           at java.lang.Class.privateGetPublicMethods(Unknown Source)
           at java.lang.Class.getMethods(Unknown Source)
           at org.jboss.seam.Component.hasAnnotation(Component.java:1067)
           at org.jboss.seam.Component.<init>(Component.java:229)
           at org.jboss.seam.Component.<init>(Component.java:217)
           at org.jboss.seam.init.Initialization.addComponent(Initialization.java:961)
          

          by
          Thiagu.m

          • 2. Re: How to fix org.richfaces.component.UIDatascroller  class
            Florian Marwede Expert

            In my opinion you have to bind a HtmlDataScroller object (see Developer Guide). Anyway it is strange that you can't point to UIDatascroller...

            • 3. Re: How to fix org.richfaces.component.UIDatascroller  class
              Daniel Soneira Novice

              You need 3 jars in your WEB-INF/lib:

              richfaces-ui (contains UIDatascroller)
              richfaces-api
              richfaces-impl

              • 4. Re: How to fix org.richfaces.component.UIDatascroller  class
                Alexander Smirnov Master

                All UI... classes placed in the richfaces-ui.jar.
                For access to these classes from a EJB layer, you need to put all richfaces libraries ( as far as all these dependensies ) at the EAR level.
                To avoid classloading problem, you can define binding class as a UIComponent, and access to it attributes by the attributes Map.
                In common, this is a bad architecture solution to manipulate visual representation from a EJB layer. It can be more powerful solution to keep all presentation-layer beans in the web application, and access from them data and business layers EJB beans.

                • 5. Re: How to fix org.richfaces.component.UIDatascroller  class
                  Thiagu Mariappan Novice

                  Thank you for your response! Now I fix that NoClassDefFoundError issue
                  I put 3 jars in your WEB-INF/lib:
                  richfaces-ui
                  richfaces-api
                  richfaces-impl

                  But I got this Exception

                  SEVERE: Error Rendering View[/ProductTableList.xhtml]
                  javax.faces.FacesException: javax.el.ELException: /ProductTableList.xhtml @547,52 binding="#{productsearch.datascroller}": java.lang.IllegalArgumentException: argument type mismatch
                   at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:240)
                   at org.jboss.seam.jsf.SeamApplication.createComponent(SeamApplication.java:327)
                   at com.sun.facelets.tag.jsf.ComponentHandler.createComponent(ComponentHandler.java:224)
                   at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:139)
                   at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
                   at com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:314)
                   at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:169)
                  

                  this my ProductTableList.xhtml code
                  <rich:datascroller binding="#{productsearch.datascroller}" pageIndexVar="pageIndex" pagesVar="pages"
                   AjaxSingle="false" for="prodList" maxPages="10" >
                   <f:facet name="pages">
                   <h:outputText value="#{pageIndex} / #{pages}"/>
                   </f:facet>
                  </rich:datascroller>
                  

                  This is my session bean code
                  @Stateful
                  @Name("productsearch")
                  public class ProductsAction implements ProductsLocal, Serializable
                  {
                   private org.richfaces.component.UIDatascroller datascroller;
                   public org.richfaces.component.UIDatascroller getDatascroller() {
                   return datascroller;
                   }
                  
                  
                   public void setDatascroller(org.richfaces.component.UIDatascroller datascroller) {
                   this.datascroller = datascroller;
                   }
                  }
                  


                  i try with org.richfaces.component.html.HtmlDatascroller class also
                  but i got the same Exception
                  Please help me is there any mistake in my code

                  By
                  Thiagu.m

                  • 6. Re: How to fix org.richfaces.component.UIDatascroller  class
                    Taya Yerygina Newbie

                     

                    "alexsmirnov" wrote:

                    In common, this is a bad architecture solution to manipulate visual representation from a EJB layer. It can be more powerful solution to keep all presentation-layer beans in the web application, and access from them data and business layers EJB beans.


                    But what about using such frameworks as Seam?