posted 16 years ago
Hi,
I have a situation where I have an index.jsp with teh following declarations:
<h:datatable id="tiger" rows="10" ...>
...
</h:datatable>
<h:commandButton id="alterMe" actionListener="#{myForm.togglePagination}"/>
In the backing bean, I have the code for the actionListener as follows:
void togglePagination(ActionEvent e)
{
}
What I'm trying to do is modify the <h:dataTable> element from the command button declared in the actionListner to re-set the rows="10" to something else.
Ideally, get a reference to something like:
HtmlDataTable myPointer = (HtmlDataTable)e.getComponent.getAttributes("tiger");
myPointer.Rows = 80;
or some variation. I can find the id of the command button easily enough, but in this case the command button is a sibling of the datatable element as it's laid out on the page. (It's not a child declared inside.)
How might I go about setting this up ?
Apprciate any advice.
Thanks,
Chad