-
1. Re: a4j:support reRender after action delayed
harut Mar 15, 2010 8:54 AM (in response to 0vermind)use <a4j:commandButton .../> instead of <h:commandButton .../> (no need for a4j:support if needed component already exists in component library...) -
2. Re: a4j:support reRender after action delayed
0vermind Mar 15, 2010 10:13 AM (in response to harut)yes, i know this works, but if i have a standard jsf component without ajax support, i need this a4j:support tag to work.
is there a way to simulate a click on an a4j:commandButton through a4j:support?
-
3. Re: a4j:support reRender after action delayed
ilya_shaikovsky Mar 15, 2010 1:09 PM (in response to 0vermind)again.. just replace h:command with a4j:comand. And that is all. -
4. Re: a4j:support reRender after action delayed
ilya_shaikovsky Mar 15, 2010 1:09 PM (in response to 0vermind)and additional support not needded in this case for sure. -
5. Re: a4j:support reRender after action delayed
0vermind Mar 16, 2010 12:29 PM (in response to 0vermind)okay, to clarify this: i DON'T want a button, this was just for the example
actually, i have checkbox with a4j:support that produces this behavior, so how to solve this?
-
6. Re: a4j:support reRender after action delayed
ilya_shaikovsky Mar 17, 2010 3:55 AM (in response to 0vermind)Please be patient and realize that if you trying to use some pseudocode to illustrate the problem - it should be accurate as the real code is. Because in other case as you see it's highly possible that you will be just pointed to some mistakes in it. And that is not because we do not want to help and investigate the case - but just beacuse we can't imagine the real code used in your app.
About the problem i checked with
<h:form id="myform"> <h:panelGrid columns="2"> <h:inputText id="myinput" value="#{userBean.job}"> <a4j:support event="onkeyup" reRender="outtext" action="#{userBean.action}"/> </h:inputText> <h:outputText id="outtext" value="#{userBean.name}" /> </h:panelGrid> </h:form>
and
public void action() throws InterruptedException { this.name="start"; Thread.sleep(5000); this.name="finish"; }
And in the 5 sec I see just "finish" word. Actually there could not be any update till request actually finished. So you should never see the "start" text set in this case.
-
7. Re: a4j:support reRender after action delayed
pomcompot Apr 30, 2010 8:13 AM (in response to ilya_shaikovsky)I got exactly the same problem with this code :
<h:form>
<rich:extendedDataTable>
[…]
<a4j:support id="takeLivraisonSelection"
event="onselectionchange"
reRender="actionButtons"
action="#{choixLivraison.takeLivraisonSelection}" />
</rich:extendedDataTable><div id="actionButtons">
<s:button view="/ChoixEnvironnement.xhtml"
propagation="join"
value="Sélectionner la cible du déploiement"
disabled="#{choixLivraison.selectedLivraison}">
<f:param name="from" value="ChoixLivraison" />
</s:button>
</div>
</h:form>getSelectedLivraison is called before choixLivraison.takeLivraisonSelection, so selectedLivraison is empty and my button is never enabled. Don’t understand anything… What can change the order of reRender and action phases?
Thanks in advance.
-
8. Re: a4j:support reRender after action delayed
ekric Feb 7, 2012 7:42 AM (in response to pomcompot)Since a4j:support doesn't work anymore in Rich Faces 4. Can anybody tell me how to do this with a4j:ajax?
EDIT: Got it working with:
<h:form id="myform"> <h:panelGrid columns="2"> <a4j:queue requestDelay="500" /> <h:inputText id="myinput" value="#{fileSystemBean.name}"> <a4j:ajax event="keyup" render="outtext" /> </h:inputText> <h:outputText id="outtext" value="#{fileSystemBean.name}" /> </h:panelGrid> </h:form>
But my problem is, I want my rendering to wait after a commandlink is clicked. This way it doesn't work. Can anybody help?
<h:form id="searchresultnodeform"> <a4j:queue requestDelay="5000" /> <h:commandLink id="searchResultLink" action="#{fileSystemBean.processSelectionSearch}"> <a4j:ajax event="action" render="wholeContent" /> <h:graphicImage value="/img/searchresult.png" /> </h:commandLink> </h:form>