Including Form in a Model Panel
bengao Mar 20, 2007 10:56 AMI try to including Form and submit buttion in a Model Panel, it appeals that Panel didn't render Form part, it only render plain text.
included code of model panel
<rich:modalPanel id="mp" minHeight="400" minWidth="500" height="500" width="600" zindex="2000"> <f:facet name="header"> <h:outputText value="Close Current Transaction" /> </f:facet> <f:facet name="controls"> <h:graphicImage value="/images/modal/close.png" style="cursor:pointer" onclick="Richfaces.hideModalPanel('mp')" /> </f:facet> <p>Any JSF content might be inside the panel. In case of using Facelets or JSF 1.2, it might be any mixed content.</p> <p>The RichFaces modal panel is good with <a4j:include> to create a wizard like behavior.</p> <p>The model panel is open and closed from the javascript function on <i>Richfaces</i> object. The following code <a href="javascript:Richfaces.hideModalPanel('mp')">hide this panel</a>: Richfaces.hideModalPanel('mp')</p> <div class="section"> <h:form id="closetx"> <fieldset> <s:validateAll> <div class="entry"> <div class="label"><h:outputLabel for="sirname">Sir Name:</h:outputLabel></div> <div class="input"> <s:decorate> <h:inputText id="sirname" value="#{veteran.vetSirName}" required="false"/> <br/> <h:message for="sirname"/> </s:decorate> </div> </div> <div class="entry"> <div class="label"><h:outputLabel for="suffix">Suffix:</h:outputLabel></div> <div class="input"> <s:decorate> <h:inputText id="suffix" value="#{veteran.vetSuffix}" required="false"/> <br/> <h:message for="suffix"/> </s:decorate> </div> </div> </s:validateAll> <div class="entry errors"> <h:messages globalOnly="true"/> </div> <div class="entry"> <div class="label"> </div> <div class="input"> <h:commandButton id="submitV" value="Submit" action="ViewVeteran"/> <s:button id="goto" value="Go to" action="ViewVeteran"/> <s:button id="tcancel" value="Cancel" onclick="javascript:Richfaces.hideModalPanel('mp')"/> </div> </div> </fieldset> </h:form> </div> </rich:modalPanel>
If you have any examples, please advise.
Thanks
Ben