ICEfaces
  1. ICEfaces
  2. ICE-8459

ace:dataTable - commandButton in columnGroup header does not work

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: EE-3.0.0.GA_P01, 3.2
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      All
    • Workaround Exists:
      Yes
    • Workaround Description:
      Hide
      Include the commandButton in the header facet.

      <ace:column>
           <f:facet name="header">
                <h:commandButton>
                     <f:ajax>
                </h:commandButton>
           </f:facet >
      </ace:column>
      Show
      Include the commandButton in the header facet. <ace:column>      <f:facet name="header">           <h:commandButton>                <f:ajax>           </h:commandButton>      </f:facet > </ace:column>

      Description

      If an h:commandButton is used in an ace:column that is defined in a columnGroup, the button action/actionListener is not called.

      Sample code:

      <ace:dataTable>
           <ace:columnGroup type="header">
                <ace:row>
                     <ace:column>
                          <h:commandButton>
                               <f:ajax>
                          </h:commandButton>
                     </ace:column>
                </ace:row>
           </ace:columnGroup>
           ....
      </ace:dataTable

        Activity

        Arran Mccullough created issue -
        Hide
        Arran Mccullough added a comment -

        Attached test case that shows issue.

        Steps:

        • Load welcomeICEfaces.jsf
        • Clicking on "Working" button will show output in server logs.
        • Clicking on "Broken" button will show nothing.
        Show
        Arran Mccullough added a comment - Attached test case that shows issue. Steps: Load welcomeICEfaces.jsf Clicking on "Working" button will show output in server logs. Clicking on "Broken" button will show nothing.
        Arran Mccullough made changes -
        Field Original Value New Value
        Attachment Case11544Example.war [ 14796 ]
        Attachment Case11544Example.zip [ 14797 ]
        Arran Mccullough made changes -
        Salesforce Case [5007000000NIuuv]
        Ken Fyten made changes -
        Fix Version/s 3.2 [ 10338 ]
        Assignee Priority P1
        Assignee Nils Lundquist [ nils.lundquist ]
        Hide
        Nils Lundquist added a comment -

        worth noting that this is only if f:ajax is used- a regular action listener on that button works as expected.

        Show
        Nils Lundquist added a comment - worth noting that this is only if f:ajax is used- a regular action listener on that button works as expected.
        Hide
        Nils Lundquist added a comment -

        looking through the UIComponentBase implementation of f:ajax events, the components themselves are responsible for state saving the behaviors objects that are attached to them (unclear about when this occurs), rather inspecting the component tree for attached f:ajax component objects. My guess is that this is the failure point that makes this case differ from the plain actionListener case. I am investigating further.

        Show
        Nils Lundquist added a comment - looking through the UIComponentBase implementation of f:ajax events, the components themselves are responsible for state saving the behaviors objects that are attached to them (unclear about when this occurs), rather inspecting the component tree for attached f:ajax component objects. My guess is that this is the failure point that makes this case differ from the plain actionListener case. I am investigating further.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #30513 Wed Aug 15 16:08:46 MDT 2012 nils.lundquist ICE-8459 - Fixed ColumnGroup column children excluded in visitTree.
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/datatable/DataTable.java
        Hide
        Nils Lundquist added a comment -

        ICE-8459 - Fixed ColumnGroup column children excluded in DataTable visitTree.

        Previously only column header facets defined in the header ColumnGroup were rendered, and as such were the only subcomponent visited.

        Revision #30513
        Committed by nils.lundquist
        A minute ago
        ICE-8459 - Fixed ColumnGroup column children excluded in visitTree.

        Show
        Nils Lundquist added a comment - ICE-8459 - Fixed ColumnGroup column children excluded in DataTable visitTree. Previously only column header facets defined in the header ColumnGroup were rendered, and as such were the only subcomponent visited. Revision #30513 Committed by nils.lundquist A minute ago ICE-8459 - Fixed ColumnGroup column children excluded in visitTree.
        Nils Lundquist made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Ken Fyten made changes -
        Fix Version/s EE-3.0.0.GA_P01 [ 10327 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #30552 Mon Aug 20 10:28:29 MDT 2012 nils.lundquist ICE-8459 - Backporting fix to ace:dataTable visitTree.
        Files Changed
        Commit graph MODIFY /icefaces3/branches/icefaces-3.0.x-maintenance/icefaces/ace/component/src/org/icefaces/ace/component/datatable/DataTable.java
        Hide
        Nils Lundquist added a comment -

        ICE-8459 - Backported fix to ace:dataTable visitTree.

        Show
        Nils Lundquist added a comment - ICE-8459 - Backported fix to ace:dataTable visitTree.
        Nils Lundquist made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Priority P1 [ 10010 ]
        Hide
        Evgheni Sadovoi added a comment -

        I am adding this comment for the sake of completeness.

        The workaround provided above have a limitation. It will not be functional if we need to re-render and execute more then 1 component upon button click.
        If you extend <f:ajax /> to <f:ajax execute="@all" render="@all" /> the button will stop working again.
        If you reduce it to <f:ajax render="@all" /> the button will work but then we have another problem: Only the button gets executed which means the rest of the viewstate (inputtexts etc.) will be ignored.

        To overcome this difficulty the following approach must be taken:

        <f:facet name="header">
        <h:commandButton value="Broken" actionListener="#

        {testBean.test2}

        ">
        <f:ajax render="@all" execute="#

        {testBean.fullyQualfiedComponentNames}

        "/>
        </h:commandButton>
        </f:facet>

        In other words instead of using @all in execute parameter of the f:ajax tag you'll need to use id's of the components and/or containers which you need to run through JSF lifecycle. Here fullyQualfiedComponentNames variable will resolve to the following upon bean construction: fullyQualfiedComponentNames = ":myFormId:myComponentId :myFormId:myContainerId:myComponent2Id @this";

        Show
        Evgheni Sadovoi added a comment - I am adding this comment for the sake of completeness. The workaround provided above have a limitation. It will not be functional if we need to re-render and execute more then 1 component upon button click. If you extend <f:ajax /> to <f:ajax execute="@all" render="@all" /> the button will stop working again. If you reduce it to <f:ajax render="@all" /> the button will work but then we have another problem: Only the button gets executed which means the rest of the viewstate (inputtexts etc.) will be ignored. To overcome this difficulty the following approach must be taken: <f:facet name="header"> <h:commandButton value="Broken" actionListener="# {testBean.test2} "> <f:ajax render="@all" execute="# {testBean.fullyQualfiedComponentNames} "/> </h:commandButton> </f:facet> In other words instead of using @all in execute parameter of the f:ajax tag you'll need to use id's of the components and/or containers which you need to run through JSF lifecycle. Here fullyQualfiedComponentNames variable will resolve to the following upon bean construction: fullyQualfiedComponentNames = ":myFormId:myComponentId :myFormId:myContainerId:myComponent2Id @this";

          People

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

            Dates

            • Created:
              Updated:
              Resolved: