Uploaded image for project: 'Velocity Tools'
  1. Velocity Tools
  2. VELTOOLS-51

Support for "non-resource" ActionMessage's introduced in Struts 1.2.7

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: VelocityStruts
    • Labels:
      None

      Description

      Struts 1.2.7 introduced "non-resource" ActionMessage's. Rather than the ActionMessage containing a key to a message in a resource bundle it contains the actual message itself.

      • ActionMessage.isResource() returns false for "non-resource" messages.
      • ActionMessage.getKey() returns the actual message for "non-resource" messages.

      The main motivation for the Struts change were the previously ignored Commons Validator's "bundle" and "resource" attributes - now Struts resolves the message during validation using those attributes if specified - creating a "non-resource" ActionMessage. For this to work in Struts 1.2.7 - Commons Validator 1.1.4 is also required.

      The way Velocity's tools are coded it should work anyway in most cases - but for completeness I'm attaching a patch.

        Activity

        Hide
        niallp Niall Pemberton added a comment -

        Patch for ActionMessagesTool and StrutsUtils to cater for "non-resource" ActionMessage's

        Show
        niallp Niall Pemberton added a comment - Patch for ActionMessagesTool and StrutsUtils to cater for "non-resource" ActionMessage's
        Hide
        niallp Niall Pemberton added a comment -

        P.S. Sorry I don't use Velocity - the patch I just attached is un-tested.

        Show
        niallp Niall Pemberton added a comment - P.S. Sorry I don't use Velocity - the patch I just attached is un-tested.
        Show
        nbubna Nathan Bubna added a comment - Thanks! http://svn.apache.org/viewcvs?rev=321277&view=rev

          People

          • Assignee:
            nbubna Nathan Bubna
            Reporter:
            niallp Niall Pemberton
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development