This content has been marked as final.
Show 6 replies
-
1. Re: commandbutton and oncomplete
ilya_shaikovsky Oct 15, 2009 4:48 AM (in response to gvorsterman)I using this in one of the samples to close modal if request successful.
if (#{facesContext.maximumSeverity==null}) #{rich:component('editPanel')}.hide();
-
2. Re: commandbutton and oncomplete
gvorsterman Oct 15, 2009 5:00 AM (in response to gvorsterman)"ilya_shaikovsky" wrote:
I using this in one of the samples to close modal if request successful.if (#{facesContext.maximumSeverity==null}) #{rich:component('editPanel')}.hide();
I use this input field:<a:outputPanel ajaxRendered="true"> <s:decorate> <h:inputText value="#{partyHome.instance.refNo}" required="true" size="10"> </h:inputText> </s:decorate> </a:outputPanel>
I changed the javascript function to:function refresh() { if (#{facesContext.maximumSeverity==null}) { window.opener.refreshTable('${param.tableId}'); window.close(); } }
But it still closes the window even if the input value is not filled in.
When using <h:commandButton> the validation is ok, but I cannot use the oncomplete option. -
3. Re: commandbutton and oncomplete
nbelaevski Oct 15, 2009 6:14 AM (in response to gvorsterman)Hi,
You should moveif (#{facesContext.maximumSeverity==null})
check into "oncomplete". -
4. Re: commandbutton and oncomplete
gvorsterman Oct 15, 2009 8:03 AM (in response to gvorsterman)Hi,
I changed the oncomplete to:oncomplete="if (#{facesContext.maximumSeverity==null}) alert('test')"
But the alert is never called."nbelaevski" wrote:
Hi,
You should moveif (#{facesContext.maximumSeverity==null})
check into "oncomplete". -
5. Re: commandbutton and oncomplete
ilya_shaikovsky Oct 15, 2009 8:26 AM (in response to gvorsterman)Which RF version you using?
http://livedemo.exadel.com/richfaces-demo/richfaces/dataTable.jsf?tab=editDataTable
the sample I'm refering to. -
6. Re: commandbutton and oncomplete
gvorsterman Oct 15, 2009 9:32 AM (in response to gvorsterman)I'm using 3.3.1
"ilya_shaikovsky" wrote:
Which RF version you using?
http://livedemo.exadel.com/richfaces-demo/richfaces/dataTable.jsf?tab=editDataTable
the sample I'm refering to.