-
1. Re: showing modal panel with onblur
ilya_shaikovsky Aug 26, 2009 5:42 AM (in response to jamesjmp)move modal call from action to oncomplete.
-
2. Re: showing modal panel with onblur
jamesjmp Aug 26, 2009 6:32 AM (in response to jamesjmp)thank you very much for your quick response!
It works but I need something more.
I want an action to be performed when onblur event is fired, and a modal panel to be displayed while the action is executed. When the action has finished I would like the modal panel to be closed. With a link or button I open the model panel with onclick and close with oncomplete, but in this case onclick is no possible.
So I would like something like this, with xxx being a suitable way.<a4j:support event="onblur" xxx="Richfaces.showModalPanel('internationalForm:panel')" action="#{internationalOrderManager.findIsin}" oncomplete="Richfaces.hideModalPanel('internationalForm:panel')" />
-
3. Re: showing modal panel with onblur
ilya_shaikovsky Aug 26, 2009 6:52 AM (in response to jamesjmp)so you just want request status panel?
but in this case onclick is no possible.
I'm lost there :/ -
4. Re: showing modal panel with onblur
jamesjmp Aug 26, 2009 7:18 AM (in response to jamesjmp)Thanks again, I´ll explain it deeply:
I have this:<a4j:region id="isinReg"> <s:decorate id="c4" template="layout/edit.xhtml" > <ui:define name="label">#{messages['view.internationalorderedit.isin']}</ui:define> <h:inputText id="isin" size="16" maxlength="12" style="text-transform:uppercase" value="#{order.asset.asset.isin}" required="#{!internationalOrderManager.newEmission}" disabled="#{internationalOrderManager.newEmission}" label="#{messages['view.internationalorderedit.isin']}" > <a4j:support event="onblur" action="#{internationalOrderManager.findIsin}"/> <f:validator validatorId="boleta.ISINValidator" /> </h:inputText> <h:outputText value="#{assetName}" /> </s:decorate> <a4j:status startText="Performing action..." stopText="" for="isinReg"/> </a4j:region>
It works, the matter is that while the action is performing I would like to prevent the user from doing anything in the form until the action has finished. That´s why I thought using a modal panel was a good idea.
I already use that with ajax links or buttons and it´s a fine solution.
For instance:<a4j:commandButton onclick="#{rich:component('login:panel')}.show()" oncomplete="#{rich:component('login:panel')}.hide()" action="#{internationalOrderManager.confirmWithoutConfirm()}" value="#{messages['Confirwithoutconfirm']}" />
But in my current case action is fired with an onblur event, and a:support has no "onclick", it has "action" to launch teh action, "complete" where I could hide the panel, but no "onclick" to show it.
Is there a way to prevent the user from doing anything in the form until the onblur action has finished? -
5. Re: showing modal panel with onblur
ilya_shaikovsky Aug 26, 2009 7:49 AM (in response to jamesjmp)finally got it :) for support - use onsubmit event. And b.t.w. as described in our wiki - status component usage for such case implementation - much more easier.
-
6. Re: showing modal panel with onblur
jamesjmp Aug 26, 2009 11:19 AM (in response to jamesjmp)thank you, that´s what I was looking for. I´ve checked wiki, I guess you mean thie following, don´t you?
http://www.jboss.org/community/wiki/RichFacesPleaseWaitBox -
7. Re: showing modal panel with onblur
ilya_shaikovsky Aug 27, 2009 4:12 AM (in response to jamesjmp)yup! Ping us if any problem will appears.