ICEfaces
  1. ICEfaces
  2. ICE-7239

ace:DataTable Page Attribute Value Incorrectly State Saved

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1-Beta
    • Fix Version/s: 2.1-Beta2, 3.0
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      IF2.1
    • Assignee Priority:
      P2
    • Workaround Exists:
      Yes
    • Workaround Description:
      Bind page.

      Description

      The ace:dataTable should be able to hold an internal indicator of the current page, this is done via the page attribute, which may be optionally bound to. However when the page attribute is unbound, pagination occurs correctly, but subsequent requests don't have updated value. The value returned by getPage() stays at 1, the value supplied to setPage() during the first calculation of the 'first' value.

        Activity

        Hide
        Nils Lundquist added a comment -

        This issue should still be present. When this issue was investigated there was a separate pagination issue presenting in the POC.
        I will test later today to confirm.

        Show
        Nils Lundquist added a comment - This issue should still be present. When this issue was investigated there was a separate pagination issue presenting in the POC. I will test later today to confirm.
        Hide
        Nils Lundquist added a comment - - edited

        An issue very much like this one appears to be effecting the decoding of components in pages greater than 1.

        This is because visitTree is receiving the incorrect value from getFirst(). visitTree relies on getFirst() to tell it where to begin per-row visiting, and getRows() to determine row far to iterate.

        At the end of a request that causes pagination, getFirst() returns the correct value, at the beginning of following requests, getFirst() returns 0, and visitTree incorrectly performs per-row visits for the first page of components.

        The easiest way to reproduce this error is by adding pagination to an example of row editing, like the Row State example on the comp-suite.

        Show
        Nils Lundquist added a comment - - edited An issue very much like this one appears to be effecting the decoding of components in pages greater than 1. This is because visitTree is receiving the incorrect value from getFirst(). visitTree relies on getFirst() to tell it where to begin per-row visiting, and getRows() to determine row far to iterate. At the end of a request that causes pagination, getFirst() returns the correct value, at the beginning of following requests, getFirst() returns 0, and visitTree incorrectly performs per-row visits for the first page of components. The easiest way to reproduce this error is by adding pagination to an example of row editing, like the Row State example on the comp-suite.
        Hide
        Deryk Sinotte added a comment -

        Debugging the DOMPartialViewContext.processPartial method:

        if (phaseId == PhaseId.RENDER_RESPONSE) {
        try {
        PartialResponseWriter partialWriter = getPartialResponseWriter();

        ...
        if ((null == oldDOM) && isRenderAll())

        { ... renderState(); renderExtensions(); } else if (null != diffs) { ... renderState(); renderExtensions(); }

        partialWriter.endDocument();

        When use the ACE paginator, neither the "if" or "else if" section is meeting the condition so the renderState() and renderExtensions() are never called. It looks like it's a result of the custom update processing that the ACE components do to calculate their own updates. The renderState() section is what calls getViewState and triggers the view state to be saved. By factoring the renderState() and renderExtension() calls so that they are always invoked, the problem goes away.

        if (phaseId == PhaseId.RENDER_RESPONSE) {
        try {
        PartialResponseWriter partialWriter = getPartialResponseWriter();

        ...
        if ((null == oldDOM) && isRenderAll())

        { ... } else if (null != diffs) { ... }

        renderState();
        renderExtensions();
        partialWriter.endDocument();

        Show
        Deryk Sinotte added a comment - Debugging the DOMPartialViewContext.processPartial method: if (phaseId == PhaseId.RENDER_RESPONSE) { try { PartialResponseWriter partialWriter = getPartialResponseWriter(); ... if ((null == oldDOM) && isRenderAll()) { ... renderState(); renderExtensions(); } else if (null != diffs) { ... renderState(); renderExtensions(); } partialWriter.endDocument(); When use the ACE paginator, neither the "if" or "else if" section is meeting the condition so the renderState() and renderExtensions() are never called. It looks like it's a result of the custom update processing that the ACE components do to calculate their own updates. The renderState() section is what calls getViewState and triggers the view state to be saved. By factoring the renderState() and renderExtension() calls so that they are always invoked, the problem goes away. if (phaseId == PhaseId.RENDER_RESPONSE) { try { PartialResponseWriter partialWriter = getPartialResponseWriter(); ... if ((null == oldDOM) && isRenderAll()) { ... } else if (null != diffs) { ... } renderState(); renderExtensions(); partialWriter.endDocument();
        Hide
        Deryk Sinotte added a comment -

        Checked in change (r25908) to DOMPartialViewContext.

        Show
        Deryk Sinotte added a comment - Checked in change (r25908) to DOMPartialViewContext.

          People

          • Assignee:
            Nils Lundquist
            Reporter:
            Nils Lundquist
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: