IngoHofmann
|
Posted: July 28, 2009 11:27 by IngoHofmann
|
|
Hi, I am facing a gap for that I could not find a workaround. Perhaps you can help me. FacesPage.getFormById(String id) can only find a form that is on the current JSF page, since it looks for the children of the current page. for (UIComponent each : component.getChildren()) { ... This looks reasonable, but we have now the problem that the <h:form tag is within the template page, not on the actual JSF page. Example: page.xhtml contains some input fields (but no form) and uses template.xhtml as template file that contains the form with id "testForm". In my test class I figured out the following: Works fine and returns the HtmlForm: facesPage.getComponentWithId("testForm").getWrappedComponent(); Does not work and brings up a AssertionError("HtmlForm 'testForm' does not exist on page."): facesPage.getFormById("testForm"); How can I submit the form without using the FacesForm? Or would it be possible to use the facesPage.getComponentWithId() method instead of parsing the children tree at getFormById() ? This should fix my issue, right? Thanks and regards, Ingo |
getFormById() can only find forms that are on the current page
Replies: 2 - Last Post: July 28, 2009 14:41
by: IngoHofmann
by: IngoHofmann
« Older Topic
» Newer Topic
showing 1 - 3 of 3
IngoHofmann
|
Posted: July 28, 2009 14:41 by IngoHofmann
|
|
Thank you, Jason. I filed an "improvement". Let me know if I can provide any further information on that. At the end of the day I would like to have the possibility to access a form of the page's template page. |
Replies: 2 - Last Post: July 28, 2009 14:41
by: IngoHofmann
by: IngoHofmann
« Older Topic
» Newer Topic







