MyFaces Tomahawk
  1. MyFaces Tomahawk
  2. TOMAHAWK-1535

t:dataTable detailStamp does not work well with jsf 2 ajax

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.1.9
    • Fix Version/s: 1.1.10
    • Component/s: Extended Datatable, JSF2
    • Labels:
      None

      Description

      t:dataTable detailStamp facet does not work well with jsf 2 ajax.

      The problem is this facet is "special". Other facets are rendered just once, but this one is supposed to be rendered on every row.

      It works more like a h:column that a header facet. Algorithms like visitTree and invokeOnComponent must take into account this effect.

      In some parts there is some code like this:

      Object facet = getFacets().remove(HtmlTableRenderer.DETAIL_STAMP_FACET_NAME);
      super.processDecodes(context);
      if ( facet != null ) getFacets().put(HtmlTableRenderer.DETAIL_STAMP_FACET_NAME, (UIComponent)facet);

      This works well with jsf 1.2 or earlier, but it does not work well with jsf 2 partial state saving. The facet component and its children has its initial state marked, so if the component is removed/added all state that should be restored when the view is built is lost, because the listener that tracks changes on the tree deals with this facet as a new component. In this case, PSS algorithm is correct, so we need to prevent this addition/removal doing it right, that means, do not remove it and check if the facet is a detailStamp facet and process it properly.

      Note it is required to create a fix for that one in tomahawk for jsf 1.2 too but only for invokeOnComponent method.

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Leonardo Uribe
            Reporter:
            Leonardo Uribe
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development