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

Enhance DynaActionForm and sub-classes to allow normal property access in JSPs

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.3.0
    • 1.3.0
    • Core
    • None
    • Operating System: other
      Platform: Other
    • 36794

    Description

      When using DynaActionForm and its sub-classes, it is necessary to use a
      specialized syntax to refer to the bean's properties in JSPs and JSP 2.0 tag
      files (e.g. form.map['property']). This makes it difficult to create re-usable
      components that must access form beans (and is of particular concern in JSP 2.0
      tag files) since every property access must accomodate both dyna bean access and
      regular property access (e.g. form.property).

      It would improve the usability of DyanBean-based action forms if the dynamically
      generated bean supported regular property access syntax. The attachd patch uses
      CGLIB to provide that capability.

      Also attached are a JSP demonstrating what is possible with this patch applied,
      together with sample configuration and test action code to excercise it.

      Attachments

        1. ASF.LICENSE.NOT.GRANTED--patch-enhanced-dyna.txt
          7 kB
          Laurie Harper
        2. ASF.LICENSE.NOT.GRANTED--dynaTest.jsp
          5 kB
          Laurie Harper
        3. ASF.LICENSE.NOT.GRANTED--DynaTestAction.java
          2 kB
          Laurie Harper
        4. ASF.LICENSE.NOT.GRANTED--struts-config.xml
          2 kB
          Laurie Harper
        5. ASF.LICENSE.NOT.GRANTED--DynaBeanInterceptor.java
          7 kB
          Niall Pemberton

        Activity

          People

            Unassigned Unassigned
            laurie Laurie Harper
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: