This content has been marked as final.
Show 2 replies
-
1. Re: Alternative for Richfaces.hideModalPanel('id')
michpetrov Dec 7, 2012 8:02 AM (in response to robinho)Hi,
if you're not closing the panel when there are errors, why not get rid of the ternary operator?
oncomplete="if(#{facesContext.maximumSeverity != 'Error'})#{rich:component('savePanel'}}.hide();"
this might also work:
data="#{facesContext.maximumSeverity}" oncomplete="if(event.data != 'Error')#{rich:component('savePanel'}}.hide();"
Or you can do it like this:
oncomplete="#{facesContext.maximumSeverity != 'Error'} ? #{rich:component('savePanel'}}.hide(); : return 0"
And if you really want to use rich:component inside the EL expression you can (but I wouldn't do that):
oncomplete="#{facesContext.maximumSeverity != 'Error' ? rich:component('savePanel').concat('.hide()'):'return 0;'}"
-
2. Re: Alternative for Richfaces.hideModalPanel('id')
robinho Dec 7, 2012 9:25 AM (in response to michpetrov)Thanks, works great!