Commons Digester
  1. Commons Digester
  2. DIGESTER-72

[digester] Allow SetNextRule to fire on begin

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.6
    • Fix Version/s: 3.0
    • Labels:
      None
    • Environment:

      Operating System: other
      Platform: All

      Description

      Currently, SetNextRule always invokes the target method from its end method.

      But there is no reason why it can't invoke the target from begin. This would be
      useful in cases where it is desirable to build the parent/child relationship
      before processing nested xml. In particular, using BeanPropertySetterRule
      against nested xml elements can cause the setter methods to be called on a bean
      before its parent/child relationship is set up and sometimes this is bad.

      It should be possible to add options to the constructor of SetNextRule to
      indicate if fire-at-end (existing) or fire-at-begin (new) behaviour is desired.

      Of course the xmlrules module would need to be updated too.
      And this feature probably could be applied to a few other rules.

        Activity

        Simon Kitching created issue -
        Henri Yandell made changes -
        Field Original Value New Value
        issue.field.bugzillaimportkey 35095 12342263
        Henri Yandell made changes -
        Project Commons [ 12310458 ] Commons Digester [ 12310471 ]
        Component/s Digester [ 12311111 ]
        Key COM-2111 DIGESTER-72
        Affects Version/s 1.6 Final [ 12311666 ]
        Assignee Jakarta Commons Developers Mailing List [ commons-dev@jakarta.apache.org ]
        Henri Yandell made changes -
        Affects Version/s 1.6 Final [ 12311712 ]
        Hide
        Simone Tripodi added a comment -

        Fixed on Digester3 on /trunk, see r1140212

        I added an abstraction layer in order to support the same feature not only for SetNext, also for SetRoot and SetTop.
        xmlrules and annotations are supported as well

        Show
        Simone Tripodi added a comment - Fixed on Digester3 on /trunk, see r1140212 I added an abstraction layer in order to support the same feature not only for SetNext, also for SetRoot and SetTop. xmlrules and annotations are supported as well
        Simone Tripodi made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Simone Tripodi [ simone.tripodi ]
        Fix Version/s 3.0 [ 12316679 ]
        Resolution Fixed [ 1 ]
        Hide
        Simone Tripodi added a comment -

        included in Apache Commons Digester 3.0 release

        Show
        Simone Tripodi added a comment - included in Apache Commons Digester 3.0 release
        Simone Tripodi made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        2222d 7h 35m 1 Simone Tripodi 27/Jun/11 16:46
        Resolved Resolved Closed Closed
        8d 20h 6m 1 Simone Tripodi 06/Jul/11 12:53

          People

          • Assignee:
            Simone Tripodi
            Reporter:
            Simon Kitching
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development