This content has been marked as final.
Show 3 replies
-
1. Re: oncomplete action occurs even after valitation failed
ilya_shaikovsky Apr 1, 2008 6:45 AM (in response to fabulous)use something like
<a4j:commandButton value="Validate" oncomplete="if (#{facesContext.maximumSeverity==null}){alert('Hi')}"/>
-
2. Re: oncomplete action occurs even after valitation failed
ilya_shaikovsky Apr 1, 2008 6:46 AM (in response to fabulous)call the modal instead alert
-
3. Re: oncomplete action occurs even after valitation failed
fabulous Apr 7, 2008 1:49 PM (in response to fabulous)Many thanks. But I've already sort it out.
function showModalForm(mainPanel, modalShow, messageId) { if ($(messageId).textContent == "") { $(mainPanel).style.display = 'none'; $(modalShow).style.display = 'block'; } }
I call this method on oncomlpete action of the ajax button<a4j:commandButton oncomplete="showModalForm('jobTicketMain', 'jobTicketModal','jobTicketForm:error')" value="#{jobTicketMsg['jobticket.edit.btn.carFind']}"/>
where the last parameter is for rich:message<rich:messages style="color:red;" ajaxRendered="true" id="error"/>
I was very pleased that my sole helper is my fellow-townsman...
Привет, земл�к! Спа�ибо за помощь!