Uploaded image for project: 'Beehive'
  1. Beehive
  2. BEEHIVE-712

Inline error messages that are bound from a pageflow no longer work

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • v1m1
    • v1m1
    • NetUI
    • None

    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

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

      }

      Attachments

        1. inlineErrorMessages.zip
          6 kB
          Alejandro Ramirez

        Activity

          People

            alramire Alejandro Ramirez
            alramire Alejandro Ramirez
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: