-
1. Re: form inside popup dialog
akaine Oct 3, 2011 3:25 AM (in response to madhukarhere)1 of 1 people found this helpfulWhat's your RF version?
1. Normally a popup element should be set on the same level as the forms are to avoid submitting problems.
2. To make a button call for some action or/and submit some data it has to be inside a form. So the standard approach would be to have a popup element under a view level and a separate form inside the popup.
For more detailed analisis please submit some code.
Btw the popup or modal is working just fine in IE6.
-
2. Re: form inside popup dialog
madhukarhere Oct 20, 2011 8:56 AM (in response to akaine)sorry for late reply,I am using Richfaces 4.
-
3. Re: form inside popup dialog
vi_mahe_ka1 Nov 13, 2011 3:31 AM (in response to madhukarhere)here is the sample code to run for
<rich:modalPanel id="newForm" resizeable="false" height="240"
styleClass="customModalClass"><f:facet name="header">
<h:panelGroup layout="block">
<h:outputText value="#{msg['sds.fb.formDetails']}" />
</h:panelGroup>
</f:facet>
<f:facet name="controls">
<h:panelGroup>
<h:graphicImage value="/images/ico_close.gif"
title="#{msg['sds.fb.tooltip.close']}" styleClass="hidelink"
id="hidelink" />
<rich:componentControl for="newFormDetails" attachTo="hidelink"
operation="hide" event="onclick" />
</h:panelGroup>
</f:facet>
<rich:spacer height="25"></rich:spacer>
<a4j:form id="newForm">
<h:panelGrid columns="3">
<h:outputLabel value="#{msg['sds.fb.formname']}"
style="font:bold;" />
<h:outputLabel value=":" style="font:bold;" />
<h:inputText value="#{bean.formName}" maxlength="14"
required="true" id="formName">
<f:attribute name="regularExpression"
value="[a-zA-Z]{1}[a-zA-Z0-9_]*" />
<f:attribute name="errorMessageCode"
value="should start with capital letter and contain only numbers and letters" />
</h:inputText>
</h:panelGrid>
<h:panelGrid columns="2" style="float:right;">
<a4j:commandButton value="#{msg['sds.fb.save']}"
title="#{msg['sds.fb.save']}" styleClass="submitButton"
style="float:right;" action="#{bean.newForm}"></a4j:commandButton>
<a4j:commandButton value="#{msg['sds.fb.cancel']}"
title="#{msg['sds.fb.cancel']}" styleClass="submitButton"
style="float:right;" immediate="true"
onclick="#{rich:component('newFormDetails')}.hide()"></a4j:commandButton>
</h:panelGrid>
</a4j:form>
</rich:modalPanel> -
4. Re: form inside popup dialog
mcmurdosound Nov 13, 2011 4:43 AM (in response to vi_mahe_ka1)The jQuery UI Dialog moves the popup Html to the body of the DOM. Therefore it needs its own form inside the panel. But there are other ways to prevent this behaviour: you could attach the jQuery UI dialog back to its old parent. Then the surrounding form should work.
Since you really want to use IE 6, you have to let the dialog be moved to the body. So you should try the approach above this post but modify it for richfaces 4.