-
1. Re: Hide rich:modalPanel when facescontext.maximumseverity i
timgozag Aug 24, 2009 2:58 PM (in response to asingla4)you might have to break it to a java script... for sure it will work:
<a4j:commandButton value="Add" action="#{acadProgBean.add}" reRender="programTable" oncomplete="if (!hasErrors()) Richfaces.hideModalPanel('addPanel')" /> <script type="text/javascript"> function hasErrors() { return #{rich:element('requestSeverity')}.value == 'Info'; } <h:form prependId="false"> <a4j:outputPanel ajaxRendered="true" id="severityPanel"> <h:inputHidden id="requestSeverity" value="#{facesContext.maximumSeverity}" /> </a4j:outputPanel> </h:form>
-
2. Re: Hide rich:modalPanel when facescontext.maximumseverity i
asingla4 Aug 24, 2009 5:33 PM (in response to asingla4)Thanks buddy,
will try and let you know
Akash -
3. Re: Hide rich:modalPanel when facescontext.maximumseverity i
asingla4 Aug 25, 2009 4:24 AM (in response to asingla4)It worked,
thanks man.
Can you please tell me why it didnt work earlier because you approach was just a breakup of my approach.
TIA
AKash
http://www.thedaedals.com/ -
4. Re: Hide rich:modalPanel when facescontext.maximumseverity is IN
danielk Mar 1, 2011 2:46 PM (in response to asingla4)I know, it is an old thread. But i hope that people, finding this page by searching for maximumSeverity or modalPanel, will not use the explanation because it is like AKash said: "just a brekup of my approach".
The only thing, which is wrong in the frist statement is the JSF EL scope. To fix this the following code should work instead - without the need to change anything else:
<a4j:commandButton value="Add"
action="#{acadProgBean.add}"
reRender="programTable"
oncomplete="if ('#{facesContext.maximumSeverity}' == 'Info') Richfaces.hideModalPanel('addPanel')" />Hope it helps to understand the real problem