1 Reply Latest reply on Jan 23, 2008 11:45 AM by pmuir

    Backing beans and richfaces ui classes

    akovcic

      Hi,

      I want to use some richfaces classes from richfaces-ui.jar on backing beans.
      In my particular case I would like to have richtree component state saved so the state doesn't change on page refresh. To do that it's necessary to have state bound to property of type: org.richfaces.component.state.TreeState
      At the same time I have an action (stateful session) bean that handles node selections. If I have a property of type: org.richfaces.component.state.TreeState on SFSB the deployment fails with ClassNotFoundException.
      This is because I follow packaging as per Seam doc, and richfaces-ui.jar is only packaged in war within ear. Of course this works fine if the ui jar is placed inside ear's lib directory. I have seen other solution where tomcat's class loader configuration is changed... None of this I liked.

      Also I have seen recommendation that classes from ui jar should not be used, but only ones from richfaces-api.jar. So how I save the tree state than?

      The same problem I have with rich tabPanel, when I want to change active tab from backing bean's (SFSB) action method (tabPanel component is bound to a property in SFSB).

      What is best practice for such cases? Maybe to have seam POJO's that would be responsible only for ui component state mangement (as I seen POJO works fine compared to SFSB), or something else?

      Thanks

        • 1. Re: Backing beans and richfaces ui classes
          pmuir

          Ask on the RichFaces forum. There is probably a way of doing this using API classes (otherwise the classes you need should be in the API...). In the short term, you can put a Seam component into the war and use the classes you need there.