Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.0
    • Fix Version/s: None
    • Component/s: Ajax/JavaScript
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      658
    • Status Whiteboard:
      Hide

      cat1 frame size_large importance_medium

      Show
      cat1 frame size_large importance_medium

      Description

      Contract of PartialViewContext doesn't give enough freedom for JSF components libraries to override it
      partially. Example: simple addition of "extension" element (or any other that RI's implementation doesn't
      do, but component libraries may need) requires full re-implementation of PartialViewContext class, thus
      making co-existence of different libraries almost impossible. If some AJAX-updated component outputs
      "extension" element, then it appears inside "update" element causing malformed XML error on the client,
      so this approach doesn't work.

        Activity

        nick_belaevski created issue -
        Hide
        Ed Burns added a comment -

        Prepare to delete api subcomponent

        Show
        Ed Burns added a comment - Prepare to delete api subcomponent
        Hide
        Ed Burns added a comment -

        2.0 rev a

        Show
        Ed Burns added a comment - 2.0 rev a
        Hide
        Ed Burns added a comment -

        frame

        Show
        Ed Burns added a comment - frame
        Hide
        rogerk added a comment -

        Just to be clear...
        Are you proposing an API change on PartialViewContext?
        Can you please provide a more concrete example and use case?

        Show
        rogerk added a comment - Just to be clear... Are you proposing an API change on PartialViewContext? Can you please provide a more concrete example and use case?
        Hide
        rogerk added a comment -

        Ownership

        Show
        rogerk added a comment - Ownership
        Hide
        Ed Burns added a comment -

        These are valid 2.0 Rev a issues

        Show
        Ed Burns added a comment - These are valid 2.0 Rev a issues
        Hide
        rogerk added a comment -

        Target 2.1

        Show
        rogerk added a comment - Target 2.1
        Hide
        nick_belaevski added a comment -

        More concrete example can be update/insertion/deletion of component part. Let's
        take filterable data table component. When user types something in filter field,
        live update of table content should be happening, but we aren't going to update
        the whole table, because this will cause loss of user's input focus. So,
        component assigns id="#

        {clientId}:tbody" to <tbody> element with the intention
        to update it later by special event.

        Looking at the API of PartialViewContext, how would component be doing this?
        There's processPartial(PhaseId phaseId) that does the complete processing and in
        Mojarra it is implemented via visiting components tree using either
        PartialVisitContext or FullVisitContext. So, if we add component clientId into
        renderIds, implementation will call component's encodeAll(...) method wrapping
        it into <update id="#{clientId}

        ">...</update> element. If we don't add component
        clientId, then control won't be passed to component at all. If we call
        startUpdate()/endUpdate() for our <tbody> from encodeAll(...), then <update>
        elements are nested and XML is not correct, causing update to fail (this has
        been already discussed in jsr-314 mailing list). The same problem with any
        insert/delete/extension element. Solution: do complete re-write of
        PartialViewContext, but this affects interoperability in a poor way.

        Proposed API change: two methods that will allow users to override creation of
        VisitContext & VisitCallback for the particular phase.

        Show
        nick_belaevski added a comment - More concrete example can be update/insertion/deletion of component part. Let's take filterable data table component. When user types something in filter field, live update of table content should be happening, but we aren't going to update the whole table, because this will cause loss of user's input focus. So, component assigns id="# {clientId}:tbody" to <tbody> element with the intention to update it later by special event. Looking at the API of PartialViewContext, how would component be doing this? There's processPartial(PhaseId phaseId) that does the complete processing and in Mojarra it is implemented via visiting components tree using either PartialVisitContext or FullVisitContext. So, if we add component clientId into renderIds, implementation will call component's encodeAll(...) method wrapping it into <update id="#{clientId} ">...</update> element. If we don't add component clientId, then control won't be passed to component at all. If we call startUpdate()/endUpdate() for our <tbody> from encodeAll(...), then <update> elements are nested and XML is not correct, causing update to fail (this has been already discussed in jsr-314 mailing list). The same problem with any insert/delete/extension element. Solution: do complete re-write of PartialViewContext, but this affects interoperability in a poor way. Proposed API change: two methods that will allow users to override creation of VisitContext & VisitCallback for the particular phase.
        Hide
        sheetalv added a comment -

        triage

        Show
        sheetalv added a comment - triage
        Hide
        rogerk added a comment -

        target

        Show
        rogerk added a comment - target
        Hide
        rogerk added a comment -

        Nick - I need to push this to 2.2 unless you can supply the spec changes.

        Show
        rogerk added a comment - Nick - I need to push this to 2.2 unless you can supply the spec changes.
        Hide
        nick_belaevski added a comment -

        Created an attachment (id=318)
        Proposed patch

        Show
        nick_belaevski added a comment - Created an attachment (id=318) Proposed patch
        Hide
        rogerk added a comment -

        triage

        Show
        rogerk added a comment - triage
        kenaiadmin made changes -
        Field Original Value New Value
        issue.field.bugzillaimportkey 658 20263
        Ed Burns made changes -
        Fix Version/s 2.3 [ 16372 ]
        Fix Version/s 2.2 [ 10403 ]
        Ed Burns made changes -
        Assignee rogerk [ rogerk ]
        Hide
        Ed Burns added a comment -

        Set priority to baseline ahead of JSF 2.3 triage. Priorities will be assigned accurately after this exercise.

        Show
        Ed Burns added a comment - Set priority to baseline ahead of JSF 2.3 triage. Priorities will be assigned accurately after this exercise.
        Ed Burns made changes -
        Priority Major [ 3 ] Trivial [ 5 ]
        Fix Version/s 2.3 [ 16372 ]
        Ed Burns made changes -
        Priority Trivial [ 5 ] Major [ 3 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            nick_belaevski
          • Votes:
            9 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: