Description
1.- Unzip the attached pageflow into a beehive enabled webapp.
2.- Access the pageflow (e.g. http://<host>:<port>/<webAppContext>/inlineErrorMessages/Controller.jpf)
3.- In the initial page Enter a "1" for the "ValidateMe" field.
Expected: The form validation should fail for the "ValidateMe" property. The following error message should be displayed:
This message for validateMe failing has an arg from message bound from pageFlow context
Actual: Form validation fails. However we get the following message (the ${pageFlow.messageString} expression is not being evaluated):
This message for validateMe failing has an arg from ${pageFlow.messageString}
The Controller.jpf pageflow has the following property:
public class Controller extends PageFlowController
{
public String messageString = "message bound from pageFlow context";
public String getMessageString()
{ return messageString; }public void setMessageString(String value)
{ messageString = value; } ...
}
The Form bean is declared as:
public class MyBean implements java.io.Serializable, Validatable
{
public void validate(ActionMapping am, HttpServletRequest req, ActionMessages errors)
{ if (validateMe==1) {
errors.add("validateMe", new ExpressionMessage ("This message for validateMe failing has an arg from
<br>", new Object[]{ "${pageFlow.messageString}" }));
errors.add("validateMe", new ExpressionMessage ("another message we SHOULD see when validate fails", null));
}
else
}
private int validateMe;
public int getValidateMe()
{return validateMe;}public void setValidateMe(int value)
{validateMe = value;}}