0 Replies Latest reply on Apr 17, 2008 12:16 PM by BC Holmes

    RichFaces + Jetty + isRendered()

    BC Holmes Newbie

      I've been having a problem using RichFaces, MyFaces, Facelets and Jetty. I've seen a number of references to a similar problem, but I think mine is a bit different. When I apply RichFaces, I frequently get the following exception when I have a dataTable:

      javax.el.PropertyNotFoundException: /secure/admin/administration.xhtml @66,59 re
      ndered="#{userProfile.user.inactive}": ELResolver cannot handle a null base Object with identifier 'userProfile'
      at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:73)
      at javax.faces.component._ComponentUtils.getExpressionValue(_ComponentUtils.java:233)
      at javax.faces.component.UIComponentBase.getExpressionValue(UIComponentBase.java:1069)
      at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:1089)
      at org.richfaces.component.DataScrollerViewPhaseListener.updateScrollers(DataScrollerViewPhaseListener.java:51)
      at org.richfaces.component.DataScrollerViewPhaseListener.updateScrollers(DataScrollerViewPhaseListener.java:59)

      In this example, "userProfile" happens to be the iterating variable of the dataTable, and it only seems to happen when that variable is invoked from the rendered="x" clause. It doesn't look to me like the variable "exists" at the time the listener is doing its work (and since it is a listener, I suppose I understand).

      This results in a quiet background exception in cases where I'm doing a simple initial render of a page, but it breaks the web app if it manifests while RichFaces is trying to reRender a segment of a page.

      It appears that the DataScrollerViewPhaseListener is trying to do some work related to setting up scroll information.

      I'm using the latest version of RichFaces (3.2.0) and Jetty 6.1H.5. I've also seen the same problem manifest under 6.1.9. My current work-around is to downgrade to Jetty 6.1.1 (which does not manifest the problem).

      I launch Jetty using the Maven Jetty plug-in. As I said, I can bypass the problem by downgrading Jetty, but I'm still nervous about root causes. My suspicion is that the older version of Jetty just sort of leaves a variable lying around in the EL variable namespace, which is why the problem doesn't manifest.

      Any thoughts on this?