[jboss-user] Re: how to handle a form with input in modalPanel?
samk at twinix.com
samk at twinix.com
Tue Apr 29 11:20:06 EDT 2008
See Thread at: http://www.techienuggets.com/Detail?tx=16326 Posted on behalf of a User
Is this problem solved??? If so can you pl share your code
In Response To:
I was posting on richFaces users forum but no luck. How can I implement this use case in JSF/Seam? Does anybody else use a modalPanel with inputText populated on open?
Is there a Seam example of the following use case?:
1) multiple column dataTable
2) user clicks 'no' on a radioButton in a cell
3) rich:modalPanel pops up with inputText and submit button in an
a4j:form
4) inputText is populated with data return by getter method of inputText (if possible???)
5) setter method is called when user inputs data and submits
6) XHTML page should not refresh (a4j:form solved this, h:form re-renders XHTML)
7) For that particular cell in the dataTable, store the inputted data for note in a 2D array of entity beans in the appropriate NoteArray[row][col] location for retrieval later
8) repeat as many times as required by user...
The a4j:form is calling the getter method for the inputText when the XHTML is rendered. That getter method is NOT being called when the modalPanel opens. I need to populate the modalPanel when it opens. How can I do this? The functional requirement here is that the user needs to be able to edit a previously entered note in a particular cell in the dataTable.
Do I need to use another XHTML page to solve this use case? (the popup must be modal, so if I popped up another XHTML/browser, that probably won't work...)
Any help would be much appreciated, as this use case is becoming too much work for a simple concept/use case... thx.
<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>
| <f:facet name="controls">
| <h:graphicImage value="/img/icon_edit.gif" style="cursor:pointer" onclick="Richfaces.hideModalPanel('mp')" />
| </f:facet>
|
| <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')"/>
| </a4j:form>
|
| </rich:modalPanel>
More information about the jboss-user
mailing list