Question

To make it short, in a jsf page, I have 2 rich:dataTable.

The first one is loaded within the onLoad event of the page.

The second one is loaded when a row is clicked within the first.

Both tables have a rich:dataScroller.

Everything is working fine except that I don't find how to make working the actionListener of the dataScroller.

Schematically I have

<rich:collapsiblePanel>
<h:form>
    <h:panelGroup id="table1">
        <rich:dataTable>
            <f:facet name="header">
            </f:facet>
            <rich:column>
            </rich:column>
            <f:facet name="footer">
                <rich:dataScroller reRender="table1,table2" page="1" actionListener="#{mybean.ac}"/>
            </f:facet>
        </rich:dataTable>
    </h:panelGroup>
    <h:panelGroup id="table2">
        <rich:dataTable rendered="#{myBean.rowSelected != null}">
            <f:facet name="header">
            </f:facet>      
            <rich:column>
            </rich:column>
            <f:facet name="footer">
                <rich:dataScroller reRender="table1" page="1" />
            </f:facet>
        </rich:dataTable>
    </h:panelGroup>
</h:form>
</rich:collapsiblePanel>

In my bean I have

Long rowSelected;

public void ac()
{
rowSelected = null;
System.out.println("xxxxxxxxxxxxxxxxxxxxxxxxxx");
}

But nothing to do, never succeeded to make it work.

I also tried without any différence

public void ac(ActionEvent ae)    -  using javax.faces.event.ActionEvent

and

action="#{mybean.ac}"
Was it helpful?

Solution

<rich:dataScroller> has neither action nor actionListener attributes. If you're using RichFaces 4.3 you can use scrollListener. See the docs.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top