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

[taglib] Ability to extend Struts tags implementation cleanly

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.2.4
    • Fix Version/s: Future
    • Component/s: Tag Libraries
    • Labels:
      None
    • Environment:
      Operating System: All
      Platform: All
    • Bugzilla Id:
      32215

      Description

      For our project, we have created an extension to Struts HTML tags where we copy
      the tag descriptor file and specify a sub-class of the Struts provided tag
      implementation in order to enhance output based on meta-data related to the control.

      For example, the tag may specify that a control is required as part of its
      meta-data. The extended tag then draws a "required" symbol next to the form
      input automatically. This allows the display of the forms to be more
      configurable, rather than hard-coded into the JSP. Other examples include input
      masks, help text, labels, etc.

      I would love to see such a meta-data mechanism provided as part of Struts (I can
      give an example of our implementation if requested). Barring that, I would love
      to see an easier way to extend the widgets in Struts in a uniform and safe way,
      that would not break if the impleemntation of Struts changes. Right now, our
      implementation seems fragile in this regard (over-ride different methods for
      differnet controls).

      This would require a documented, clean way in the API to over-ride a widget's
      drawing method without having to change the Struts tag descriptor file. Perhaps
      a way to specify a widget-drawing helper class in a properties file that is
      deferred to instead of the default widget drawing method, if specified.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              geraldboersma@yahoo.com Gerald Boersma
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: