Multiple forms on one page.
sensationalist Oct 7, 2011 1:52 PMHi, I have very strange issue. I have very complicated page, so I can't post it all, but I can describe it.
So I have 3 <h:form></h:form> there. First form contains large table with something like schedule. Second form contains information for sending by Email. And third form used to fill some data to table. So I press button in table and it shows third form, it is very simple:
<rich:popupPanel id="homework-panel" autosized="true" modal="true"
moveable="false" resizeable="false">
<f:facet name="header">
<h:graphicImage value="/resources/images/icons/book_open.png" styleClass="icon" />
<h:outputText value="#{msg.homework_header}"/>
<a4j:commandLink onclick="#{rich:component('pupilPanel')}.hide(); return false;" style="float: right;" >
<h:graphicImage value="/resources/images/icons/bullet_arrow_down.png" />
</a4j:commandLink>
</f:facet>
<h:form id="homework-form">
<h:inputTextarea value="#{markBean.currentHomework.text}"
id="homework-text" styleClass="homework-text" />
<a4j:commandButton value="#{msg.save}" action="#{markBean.saveHomework}"
render="marks-grid" execute="@form" id="save-homework-link"
oncomplete="#{rich:component('homework-panel')}.hide();" />
<a4j:commandButton value="#{msg.cancel}" id="cancel-homework-link"
onclick="#{rich:component('homework-panel')}.hide(); return false;" />
</h:form>
</rich:popupPanel>
But it doesn't work! At all... Save button does nothing. I see no error message and back bean markBean.saveHomework method isn't called. At the same time table in first form and form for sending work fine. I tried to change places of form, but it didn't help.
Page structure is something like:
<h:form id="form">
<rich:panel styleClass="large-window">
<rich:dataTable>
...
</rich:dataTable>
</rich:panel>
<h:form>
<rich:popupPanel id="send-panel" autosized="true" modal="true"
moveable="false" resizeable="false">
<h:form id="send-form">
...
</h:form>
</rich:popupPanel>
<rich:popupPanel id="homework-panel" autosized="true" modal="true"
moveable="false" resizeable="false">
<h:form id="homework-form">
...
</h:form>
</rich:popupPanel>