10 Replies Latest reply on Oct 27, 2007 5:22 AM by Dmitry Demyankov

    getting and submitting data in a form in modalPanel

    Arbi Sookazian Master

      the following modalPanel code executes the getNoteText method in the SFSB when the .xhtml page is rendered. It does not get called when the modalPanel opens.

      I need a solution that will call the getter method when the modalPanel opens. There are multiple cells in the dataTable and the modalPanel needs to display different data in the inputText for each cell.

      Is this possible to achieve with JSF/richFaces? Do I have to embed another JSP/XHTML inside my XHTML to get this to work?

      <rich:modalPanel id="mp" minHeight="200" minWidth="450"
       height="200" width="500" zindex="2000">
       <f:facet name="header">
       <h:outputText value="#{noteAction.header}" />
       <f:facet name="controls">
       <h:graphicImage value="/img/icon_edit.gif" style="cursor:pointer" onclick="Richfaces.hideModalPanel('mp')" />
       <a4j:form id="a4jForm">
       <h:inputText id="noteText" value="#{noteAction.noteText}"/>
       <h:inputHidden id="rowIndex" value="noteAction.rowIndex"/>
       <h:inputHidden id="colName" value="noteAction.colName"/>
       <h:inputHidden id="siteId" value="noteAction.siteId"/>
       <h:inputHidden id="employeeNumber" value="noteAction.employeeNumber"/>
       <a4j:commandButton value="submit" action="#{noteAction.submit}" onclick="showNoteGraphic();Richfaces.hideModalPanel('mp')"/>