Uploaded image for project: 'Struts 1'
  1. Struts 1
  2. STR-2739

[extras] ParameterListActionDispatcher

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.3.0
    • Fix Version/s: None
    • Component/s: Extras
    • Labels:
      None
    • Environment:
      Operating System: other
      Platform: Other
    • Bugzilla Id:
      38343

      Description

      The attached ParameterMappingDispatchAction class is a proposed enhancement to
      MappingDispatchAction either as a subclass or a direct replacement. Here are the
      added benefits:

      1) For a form with multiple buttons, the parameter attribute can contain a list
      of appropriate methods to iterate for a match. These methods are matched against
      incoming request parameters (as well as button .x/.y suffixes). For security
      reasons, a developer may want to limit which methods to invoke for a particular
      mapping, unlike DispatchAction which will match any existing method.

      <action ... parameter="save,apply,back"/>

      2) ParameterMappingDispatchAction provided the ability to also obfuscate method
      names, and so does this by providing a key=value mapping. The key will be the
      request parameter name and the value the method name.

      <action ... parameter="save,apply=saveAndReturn,back=goBack"/>

      3) Sometimes the user presses Enter to submit the form and no button is
      explicitly submitted. When this case is important to catch, the action may
      invoke the "default" method if nothing matches. In this example, the default is
      to save.

      <action ... parameter="save,apply,back,default=save"/>

      4) When only one method is listed, the method returns it to equal functionality
      to MappingDispatchAction.

      <action ... parameter="save"/>

        Attachments

          Activity

            People

            • Assignee:
              dsevans93 David Evans
              Reporter:
              paul4christ79@yahoo.com Paul Benedict
            • Votes:
              3 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: