datatable datascroller delete row
fipp Apr 5, 2012 7:55 AMhi,
i've got a problem with rich:dataTable together with rich:dataScroller.
the last colum should call a popup (deletePopup). this works fine as long as i am on the first page of the table (datascroller->page 1). if i scroll to another page withe the datascroller the action to call the popup does not work.
RF 4.2.0
<h:form>
<rich:dataTable binding="#{toolListBean.dataTable}"
value="#{toolListBean.toolList}" var="tool" id="toolsTable"
rows="3" rowClasses="even-row,odd-row" styleClass="stable">
<f:facet name="header">
<rich:dataScroller for="toolsTable" page="#{toolListBean.curPage}"
renderIfSinglePage="false" fastControls="hide"
boundaryControls="hide" />
</f:facet>
<rich:column sortBy="#{tool.toolName}"
sortOrder="#{toolsSortingBean.namesOrder}" id="column">
<f:facet name="header">
<a4j:commandLink value="Name"
render="toolsTable@header toolsTable@body"
action="#{toolsSortingBean.sortByNames}" />
<h:graphicImage name="images/bullet_arrow_down.png"
rendered="#{toolsSortingBean.namesOrder=='descending'}" />
<h:graphicImage name="images/bullet_arrow_up.png"
rendered="#{toolsSortingBean.namesOrder=='ascending'}" />
</f:facet>
<h:outputText value="#{tool.toolName}" />
</rich:column>
<rich:column sortBy="#{tool.toolNum}"
sortOrder="#{toolsSortingBean.numbersOrder}"
filter="#{toolsFilteringBean.filterNumberImpl}">
<f:facet name="header">
<h:panelGrid columns="1">
<a4j:commandLink value="Number" render="toolsTable@body"
action="#{toolsSortingBean.sortByNumbers}" />
<h:inputText value="#{toolsFilteringBean.numberFilter}">
<a4j:ajax event="keyup" render="toolsTable@body"
execute="@this" />
</h:inputText>
</h:panelGrid>
</f:facet>
<h:outputText value="#{tool.toolNum}" />
</rich:column>
<rich:column>
<a4j:commandLink execute="@this" render="@none"
oncomplete="#{rich:component('deletePopup')}.show()">
<h:graphicImage value="resources/images/cross.png" alt="delete"
style="border:none;" />
</a4j:commandLink>
</rich:column>
<f:facet name="footer">
<rich:dataScroller for="toolsTable" page="#{toolListBean.curPage}"
renderIfSinglePage="false" fastControls="hide"
boundaryControls="hide" />
</f:facet>
</rich:dataTable>
<a4j:jsFunction name="remove" action="#{toolListBean.remove}"
render="toolsTable" execute="@this"
oncomplete="#{rich:component('deletePopup')}.hide();" />
<rich:popupPanel id="deletePopup" autosized="true">
Are you sure you want to delete the row?
<a4j:commandButton value="Cancel"
onclick="#{rich:component('deletePopup')}.hide(); return false;" />
<a4j:commandButton value="Delete" onclick="remove(); return false;" />
</rich:popupPanel>
</h:form>
any suggestions?
regards
steffen