Beehive
  1. Beehive
  2. BEEHIVE-315

Databinding expressions not evalutated for error message args

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: V1Beta
    • Fix Version/s: V1Beta
    • Component/s: NetUI
    • Labels:
      None

      Description

      -The bean below has an example of an ExpressionMessage with an arg using a databinding expression to use a pageFlow member variable

      -There is a <netui:error> and <netui:errors> tag in the JSP page

      -When the passing the string "fail" the validation method on the bean field adds the errors:

      Expected result- This message for validateMe failing validation has - a string databound from pageflow

      Actual result- This message for validateMe failing validation has - $

      {pageFlow.memberString}

      This is also true for errors added with addActionErrorExpression


      package bean;

      import javax.servlet.http.HttpServletRequest;
      import org.apache.beehive.netui.pageflow.ExpressionMessage;
      import org.apache.beehive.netui.pageflow.Validatable;
      import org.apache.struts.action.ActionError;
      import org.apache.struts.action.ActionMapping;
      import org.apache.struts.action.ActionMessages;

      public class MyBean implements Validatable
      {
      public void validate(ActionMapping arg0, HttpServletRequest arg1, ActionMessages errors)
      {
      if (validateMe=="fail")
      {
      errors.add("validateMe", new ExpressionMessage ("This message for validateMe failing validatoin has an arg from {0}", "${pageFlow.memberString}

      "));

      }
      }
      private String validateMe;

      public String getValidateMe()

      {return validateMe;}

      public void setValidateMe(String value)

      {validateMe = value;}

      }

        Activity

        Hide
        Jason Dunckley added a comment -

        Verified fixed using expressions in args for messages in ExpressionMessage, PageFlowUtils.addActionErrorExpression, and addActionErrorExpression within a JPF

        Show
        Jason Dunckley added a comment - Verified fixed using expressions in args for messages in ExpressionMessage, PageFlowUtils.addActionErrorExpression, and addActionErrorExpression within a JPF
        Hide
        Rich Feit added a comment -

        Fixed with revision 154456. This was a good one...

        Show
        Rich Feit added a comment - Fixed with revision 154456. This was a good one...
        Hide
        Rich Feit added a comment -

        This one's mine for now.

        Show
        Rich Feit added a comment - This one's mine for now.
        Hide
        Alejandro Ramirez added a comment -

        I think this might be yours?

        Show
        Alejandro Ramirez added a comment - I think this might be yours?

          People

          • Assignee:
            Jason Dunckley
            Reporter:
            Jason Dunckley
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development