0

I have a webbpage designed with primefaces layout. There are different layout units and in each layout unit, here is a form called "form". depends on the page. Now I want to reload only these forms and not the whole page. How do I find only the forms with the pattern "form" in the id ?

I tried to use:

FacesContext.getCurrentInstance().getViewRoot()
            .getChildren()

But there I only get the components of this layout unit / form and not from the whole page.

Every help is more than welcome.

(Technologies: JSF 2.2, Tomcat 7, Primefaces 4.0)

1 Answers1

0

Try to create a common layout under the forms layouts with anid. Then try to invoke the appropriate method of viewroot to find element by id - it will be this common layout. Next step, iterations over child elements to find your forms. You know forms is a second level child for common layout. Iterate over common layout child of childs.

Rory McCrossan
  • 331,213
  • 40
  • 305
  • 339