[ http://issues.apache.org/jira/browse/BEEHIVE-712?page=all ] Rich Feit resolved BEEHIVE-712: -------------------------------
Assign To: Alejandro Ramirez (was: Rich Feit) Resolution: Fixed There actually wasn't a bug here, only some silly legacy design. There were *two* constructors for ExpressionMessage, one that evaluated expressions in the message-args (and thus required some additional parameters), and one that didn't. You were using the one that didn't. This confusion was unnecessary, though, since an earlier refactor made it possible to evaluate expressions in args without the extra parameters to the ExpressionMessage constructor. I removed the large constructor and made the smaller one expression-aware, so your repro case now works as-is. Revision 169958. Thanks for bringing this up. > Inline error messages that are bound from a pageflow no longer work > ------------------------------------------------------------------- > > Key: BEEHIVE-712 > URL: http://issues.apache.org/jira/browse/BEEHIVE-712 > Project: Beehive > Type: Bug > Components: NetUI > Versions: V1 > Reporter: Alejandro Ramirez > Assignee: Alejandro Ramirez > Fix For: V1 > Attachments: inlineErrorMessages.zip > > 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 {0} <br>", new Object[]{ > "${pageFlow.messageString}" })); > errors.add("validateMe", new ExpressionMessage ("another message we > SHOULD see when validate fails", null)); > } > else{ > inlineErrorMessages.bean.addErrorFromPageFlowUtils.addThem(req); > } > } > private int validateMe; > public int getValidateMe(){return validateMe;} > public void setValidateMe(int value){validateMe = value;} > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira