-
1. Re: RichFaces MessageBox
ilya_shaikovsky Jun 3, 2008 4:53 AM (in response to daswidanja)1) could be freelly implemented usign EL binding on showWhenRendered attribute and manipulating with this binding on server.
2) You could not perform submit without for in modal. And there is no workaround for this. But why this such a problem for you? -
2. Re: RichFaces MessageBox
daswidanja Jun 3, 2008 4:59 AM (in response to daswidanja)2. Maybe there is no problem to fire a method on the server side using <a4j:commandButton without any form in modalPanel. I don't know. I have to test it.
-
3. Re: RichFaces MessageBox
ilya_shaikovsky Jun 3, 2008 9:00 AM (in response to daswidanja)daswidanja, you can't perfomrm any submit without form. So this is a limitation and there is nothing to try. I mean why the form inside the panel is such a limitation for you?
-
4. Re: RichFaces MessageBox
daswidanja Jun 3, 2008 9:11 AM (in response to daswidanja)Because all pages in hole application has only one main page with <a4j:form> and are included like
<f:subview id="body"> <jsp:include page="/jsf/prodcat/productMain.jsf" flush="false"></jsp:include> </f:subview>
So, when I render a page, the main <a4j:form> is always there. -
5. Re: RichFaces MessageBox
ilya_shaikovsky Jun 3, 2008 9:12 AM (in response to daswidanja)then you need to include the modal also here conditionally ;)
-
6. Re: RichFaces MessageBox
daswidanja Jun 3, 2008 10:07 AM (in response to daswidanja)what about this :
<script language="javascript"> function getAnswer(answer){ var dest = document.getElementById("mainForm:mboxAnswer"); dest.value=answer; alert("dest="+dest.value); Richfaces.hideModalPanel('mp'); var destForm = document.getElementById("mainForm"); destForm.submit(); } </script> <a4j:form id="mainForm"> <h:panelGrid id="_productMainGrid" columnClasses="outer-frame" border="0"> <a4j:commandButton onclick="Richfaces.showModalPanel('mp',{width:450, top:200});" value="showModalPanel" /> <h:inputHidden id="mboxAnswer" value="#{testMBean.mboxAnswer}" /> <rich:modalPanel id="mp" minHeight="200" minWidth="450" height="200" width="500" zindex="2000"> <f:facet name="header"> <h:outputText value="Modal Panel Title" /> </f:facet> <f:facet name="controls"> <h:graphicImage value="/pictures/close.png" style="cursor:pointer" onclick="getAnswer('no');" /> </f:facet> <h:graphicImage value="/pictures/yes.png" style="cursor:pointer" onclick="getAnswer('yes');" /> <h:graphicImage value="/pictures/no.png" style="cursor:pointer" onclick="getAnswer('no');" /> </rich:modalPanel> </h:panelGrid> </a4j:form>