3 Replies Latest reply on Dec 2, 2007 3:07 PM by Wolfgang Schwendt

    Page Parameter validation - Bug in org.jboss.seam.navigation

    Wolfgang Schwendt Newbie

      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 );
       }