Reputation: 514
Our project using PF5.1, we have a dataTable in a composite component. So after page rendering. the dataTable's id kind of like j_idt123:tableForm:tableId.
We need to clear the table filter stuff before searching. I tried use the following code to find it in the backing bean but it returns null
.
FacesContext.getCurrentInstance().getViewRoot().findComponent("tableId");
As this component will be used in different xhtml file, this "j_idt123" thing got changed every time. What will be the right way to get the table ?
Upvotes: 0
Views: 472
Reputation: 2861
"j_idt123" is a generated id for components which do not specify their own. Just give the parent-container of "tableForm" an id.
Upvotes: 1