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

    Backing beans and richfaces ui classes

    Andrej Kovcic Newbie

      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