[richfaces-issues] [JBoss JIRA] (RF-12684) The last page shows rows from the page before if rich:collapsibleSubTable is included in rich:dataTable with rich:dataScroller.

Brian Leathem (JIRA) jira-events at lists.jboss.org
Thu Jan 3 01:30:08 EST 2013


    [ https://issues.jboss.org/browse/RF-12684?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12743304#comment-12743304 ] 

Brian Leathem commented on RF-12684:
------------------------------------

When the _<rich:collapsibleSubTable />_ tag is removed, the final page renders as expected.  Comparing the ajax response for the two scenarios (with and without the _<rich:collapsibleSubTable />_ tag) shows:

{code:title = Ajax response *with no* _<rich:collapsibleSubTable />_ tag}
<partial-response>
<changes>
    <update id="tableId:datascrollerId"><![CDATA[<span class="rf-ds " id="tableId:datascrollerId"><a class="rf-ds-btn rf-ds-btn-first" href="javascript:void(0);" id="tableId:datascrollerId_ds_f">««««</a><a class="rf-ds-btn rf-ds-btn-prev" href="javascript:void(0);" id="tableId:datascrollerId_ds_prev">«</a><a class="rf-ds-nmb-btn " href="javascript:void(0);" id="tableId:datascrollerId_ds_1">1</a><a class="rf-ds-nmb-btn " href="javascript:void(0);" id="tableId:datascrollerId_ds_2">2</a><a class="rf-ds-nmb-btn " href="javascript:void(0);" id="tableId:datascrollerId_ds_3">3</a><span class="rf-ds-nmb-btn rf-ds-act " id="tableId:datascrollerId_ds_4">4</span><span class="rf-ds-btn rf-ds-btn-next rf-ds-dis" id="tableId:datascrollerId_ds_next">»</span><span class="rf-ds-btn rf-ds-btn-last rf-ds-dis" id="tableId:datascrollerId_ds_l">»»»»</span><script type="text/javascript">new RichFaces.ui.DataScroller("tableId:datascrollerId",function(event,element,data){RichFaces.ajax("tableId:datascrollerId",event,{"parameters":{"tableId:datascrollerId:page":data.page} ,"incId":"1"} )},{"digitals":{"tableId:datascrollerId_ds_3":"3","tableId:datascrollerId_ds_4":"4","tableId:datascrollerId_ds_1":"1","tableId:datascrollerId_ds_2":"2"} ,"buttons":{"left":{"tableId:datascrollerId_ds_f":"first","tableId:datascrollerId_ds_prev":"previous"} } ,"currentPage":4} )</script></span>]]></update>
    <update id="tableId:tb"><![CDATA[<tbody id="tableId:tb" class="rf-dt-b"><tr id="tableId:0" class="rf-dt-r rf-dt-fst-r"><td id="tableId:9:j_idt6" class="rf-dt-c">0</td></tr></tbody>]]></update>
    <update id="tableId:sc"><![CDATA[<tbody id="tableId:sc"><tr><td style="display: none"><script type="text/javascript">new RichFaces.ui.DataTable("tableId",{"ajaxEventOptions":{} } )</script></td></tr></tbody>]]></update>
    <update id="javax.faces.ViewState"><![CDATA[6956703921228165600:3503406941817336999]]></update>
    <extension id="org.richfaces.extension">
        <render>tableId:datascrollerId tableId at body</render>
    </extension>
</changes>
</partial-response>
{code}

{code:title = Ajax response *with* _<rich:collapsibleSubTable />_ tag}
<partial-response>
    <changes>
        <update id="tableId:datascrollerId"><![CDATA[<span class="rf-ds " id="tableId:datascrollerId"><a class="rf-ds-btn rf-ds-btn-first" href="javascript:void(0);" id="tableId:datascrollerId_ds_f">««««</a><a class="rf-ds-btn rf-ds-btn-prev" href="javascript:void(0);" id="tableId:datascrollerId_ds_prev">«</a><a class="rf-ds-nmb-btn " href="javascript:void(0);" id="tableId:datascrollerId_ds_1">1</a><a class="rf-ds-nmb-btn " href="javascript:void(0);" id="tableId:datascrollerId_ds_2">2</a><a class="rf-ds-nmb-btn " href="javascript:void(0);" id="tableId:datascrollerId_ds_3">3</a><span class="rf-ds-nmb-btn rf-ds-act " id="tableId:datascrollerId_ds_4">4</span><span class="rf-ds-btn rf-ds-btn-next rf-ds-dis" id="tableId:datascrollerId_ds_next">»</span><span class="rf-ds-btn rf-ds-btn-last rf-ds-dis" id="tableId:datascrollerId_ds_l">»»»»</span><script type="text/javascript">new RichFaces.ui.DataScroller("tableId:datascrollerId",function(event,element,data){RichFaces.ajax("tableId:datascrollerId",event,{"parameters":{"tableId:datascrollerId:page":data.page} ,"incId":"1"} )},{"digitals":{"tableId:datascrollerId_ds_3":"3","tableId:datascrollerId_ds_4":"4","tableId:datascrollerId_ds_1":"1","tableId:datascrollerId_ds_2":"2"} ,"buttons":{"left":{"tableId:datascrollerId_ds_f":"first","tableId:datascrollerId_ds_prev":"previous"} } ,"currentPage":4} )</script></span>]]></update>
        <update id="tableId:0:collapsibleTableId:c"><![CDATA[<tbody id="tableId:0:collapsibleTableId:c" class="rf-cst"><tr style="display: none;" id="tableId:9:collapsibleTableId"><td></td></tr><tr class="rf-cst-nd"><td colspan="0" class="rf-cst-nd-c" style="display: none;"></td></tr><tr id="tableId:9:collapsibleTableId:sc" style="display: none;"><td><script type="text/javascript">new RichFaces.ui.CollapsibleSubTable("tableId:9:collapsibleTableId","form",{"optionsInput":"tableId:9:collapsibleTableId:options","expandMode":null,"stateInput":"tableId:9:collapsibleTableId:state","eventOptions":{"incId":"1"} } )</script><input id="tableId:9:collapsibleTableId:state" name="tableId:9:collapsibleTableId:state" type="hidden" value="1" /><input id="tableId:9:collapsibleTableId:options" name="tableId:9:collapsibleTableId:options" type="hidden" /></td></tr></tbody>]]></update>
        <update id="tableId:0:tb"><![CDATA[<tbody id="tableId:0:tb" class="rf-dt-b"><tr id="tableId:0" class="rf-dt-r rf-dt-fst-r"><td id="tableId:9:j_idt6" class="rf-dt-c">0</td></tr></tbody>]]></update>
        <update id="tableId:sc"><![CDATA[<tbody id="tableId:sc"><tr><td style="display: none"><script type="text/javascript">new RichFaces.ui.DataTable("tableId",{"ajaxEventOptions":{} } )</script></td></tr></tbody>]]></update>
        <update id="javax.faces.ViewState"><![CDATA[1159211808346085478:1584930212626416917]]></update>
        <extension id="org.richfaces.extension">
            <render>tableId:datascrollerId tableId at body</render>
        </extension>
    </changes>
</partial-response>
{code}

Notice how the presence of the _<rich:collapsibleSubTable />_ tag changes the response to update only the affected row, rather than the whole table.  This is why the extra rows are displayed, bot because they are included in the response, but rather because they are not removed by the response.
                
> The last page shows rows from the page before if rich:collapsibleSubTable is included in rich:dataTable with rich:dataScroller.
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: RF-12684
>                 URL: https://issues.jboss.org/browse/RF-12684
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: component-tables
>    Affects Versions: 4.2.3.Final
>            Reporter: Ilia Vassilev
>            Assignee: Brian Leathem
>             Fix For: 4.3.0.CR1
>
>         Attachments: BackingBean.java, dataScroller_RF-12684.xhtml, page1.png, page3.png
>
>   Original Estimate: 1 day
>  Remaining Estimate: 1 day
>
> The last page shows rows from the page before if rich:collapsibleSubTable is included in rich:dataTable with rich:dataScroller. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the richfaces-issues mailing list