[jboss-user] [JBoss Seam] - Page Parameter validation - Bug in org.jboss.seam.navigation

wschwendt do-not-reply at jboss.com
Sun Dec 2 04:04:59 EST 2007


is the code in org.jboss.seam.navigation.Pages.convertAndValidateStringValuesInPageContext() really correct?

The order in which the conversion and validation of page parameters is done, looks to me like a bug. 


  | // org.jboss.seam.navigation.Pages.convertAndValidateStringValuesInPageContext()
  | 
  | 
  | 
  | String value = (String) Contexts.getPageContext().get( pageParameter.getName() );
  |                if (value!=null)
  |                {
  |                   pageParameter.validateConvertedValue(facesContext, value);
  |                   Object convertedValue = pageParameter.convertValueFromString(facesContext, value);
  |                   Contexts.getEventContext().set( pageParameter.getName(), convertedValue );
  |                }
  | 


Shouldn't conversion and validation occur in the order as follows?


  | // org.jboss.seam.navigation.Pages.convertAndValidateStringValuesInPageContext()
  | 
  | 
  | String value = (String) Contexts.getPageContext().get( pageParameter.getName() );
  |                if (value!=null)
  |                {
  |                   Object convertedValue = pageParameter.convertValueFromString(facesContext, value);
  |                   pageParameter.validateConvertedValue(facesContext, convertedValue);
  |                   Contexts.getEventContext().set( pageParameter.getName(), convertedValue );
  |                }
  | 


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

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



More information about the jboss-user mailing list