[jboss-user] [JBoss Seam] - Re: NPE in Param.validateConvertedValue

pgmjsd do-not-reply at jboss.com
Mon Jan 28 08:07:44 EST 2008


Okay, I think I've figured out why this NPE only happens sometimes.   The .page.xml file in this case binds a simple expression to the parameter value.  For example:


  |     <param name="windowType" value="#{windowType}"/>
  | 

This value is intended to be passed down through the Facelets templates and turn off nav bars, etc.   With this kind of expression, ValidatingResolver.getInvalidValues() returns null because of the condition in the if statement:

  |       @Override
  |       public void setValue(ELContext context, Object base, Object property, Object value) 
  |             throws NullPointerException, PropertyNotFoundException, PropertyNotWritableException, ELException
  |       {
  |          if (base!=null && property!=null )  // <== This is false, so invalidValues is never set.
  |          {
  |             context.setPropertyResolved(true);
  |             invalidValues = getValidator(base).getPotentialInvalidValues( property.toString(), value );
  |          
  |       }
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4124041#4124041

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4124041



More information about the jboss-user mailing list