4 Replies Latest reply on Dec 9, 2010 12:22 PM by commondialog

    TreeStateAdvisor is never created as component in Seam

    erace

      Hi,

      I have takes the example from richfaces demo, the one with TreeStateAdvisor. I have just changed the name to OrganizationUnitTreeStateAdvisor and added Seam @Name annotation.

      For some reason this component is never created - at least this is what log on the console is showing.

      Any ideas why?

      /p

        • 1. Re: TreeStateAdvisor is never created as component in Seam
          erace

          Well I know why:

          richfaces-impl-3.1.1* was not in the lib dir of ear that is containing my implementation of TreeStateAdisor.

          Now I have another problem which I believe is more JBoss AS related:

          SEVERE: Error Rendering View[/organizationUnitTree.xhtml]
          java.lang.ClassCastException: com.vdel.erm.beans.organization.tree.OrganizationUnitTreeStateAdvisor_$$_javassist_2 cannot be cast to org.richfaces.component.state.TreeStateAdvisor
          at org.richfaces.renderkit.TreeRendererBase$DataVisitorWithLastElement.processAdvisors(TreeRendererBase.java:302)
          at org.richfaces.renderkit.TreeRendererBase$DataVisitorWithLastElement.process(TreeRendererBase.java:239)
          at org.richfaces.model.AbstractTreeDataModel.processElement(AbstractTreeDataModel.java:127)


          ehh... 'Why it never gets any easier?!' ;-)

          /p

          • 2. Re: TreeStateAdvisor is never created as component in Seam
            erace

            Guess what: all the jar's from WEB-INF/lib should go to ear's lib dir.

            Now works.

            BTW. upgraded to richfaces-3.1.2 - still works.

            /p

            • 3. Re: TreeStateAdvisor is never created as component in Seam
              sweetlandj

              Another solution is to move the TreeStateAdvisor implementations into the web module, which makes sense considering they are only useful to the UI. (Seam will still deploy them as POJO components.)

              • 4. Re: TreeStateAdvisor is never created as component in Seam
                commondialog

                Okay, still a bit of a Seam n00b, but I'm not sure what "into the web module" means.  With the standard Seam shell that gets created, I don't have a directory structure that gets compiled down and put into WEB-INF/classes.

                 

                Should I assume this means create a separate project for all my UI components, compile that down into a JAR file and then put that in WEB-INF/lib for the Seam EAR?