-
1. Keep open modal dialog after pressing h:commandLink
ilya_shaikovsky Mar 10, 2011 5:29 AM (in response to xmdx)your code actually rises two concurrent requests - normal one and ajax one in the same time. And that's not correct design anyway.
So please return just a4j:command without any support inside back. And just wrap your decorate with ajax rendered outputPanel or point with reRender. I believe validation is working with a4j:command, just nothing updated so you not seeing ther results.
-
2. Re: Keep open modal dialog after pressing h:commandLink
xmdx Mar 10, 2011 6:58 AM (in response to ilya_shaikovsky)Hi Ilya,
Thanks for the answer, but it doesnt work for me with a4j:commandLink.
If you use h:commandLink, it doesn't start action method if there are any validation errors. But with a4j:commandLink it doesn't try make validation, just starts the action method. And the values of input fields in the modalPanel does not go to our bean (tradingForm) when we press the commandLink.
Here is the code with a4j, maybe you see any mistakes in it:
<rich:modalPanel id="modalTrading">
<h:form id="formModalTrading">
<s:validateAll>
<s:decorate template="/components/inputField.xhtml">
<h:inputText value="#{tradingForm.value}"
requiredMessage="#{msg.trading_error}" required="true" />
</s:decorate>
<a4j:commandLink action="#{tradingAction.toStep2()}"
oncomplete="Richfaces.showModalPanel('modalTrading')"
reRender="modalTrading"
ajaxSingle="true"
value="#{msg.tradingOrder_next}">
</a4j:commandLink>
</s:validateAll>
</h:form>
</rich:modalPanel>
Thank you!
-
3. Re: Keep open modal dialog after pressing h:commandLink
ilya_shaikovsky Mar 10, 2011 8:04 AM (in response to xmdx)1 of 1 people found this helpfuljust remove ajaxSingle = true. If it present nothing except the submitting component are decoded.