-
1. Re: a4j:push, a4j:poll - onenabled ondisabled
nimo22 Mar 4, 2010 2:34 AM (in response to nimo22)How can I fire a action after push or poll is disabled?
With "oncomplete" the action is fired after each poll/push-request, but I need to fire the action when poll/push is completly disabled.
for example:
java-code:
setPollEnabled(false);
xhtml-code:
<poll: enabled="pollEnabled" ...>
<a4j:support oncomplete=".." reRender=".."/>
You see, the point is, I need to reRender something on my page AFTER the poll/push is completly disabled!
How can I do that?
-
2. Re: a4j:push, a4j:poll - onenabled ondisabled
ilya_shaikovsky Mar 4, 2010 3:05 AM (in response to nimo22)You enabling and disabling poll/push via ajax from some action, isn't it? So why you just can't perform some needed actions during the disablement/enablement? -
3. Re: a4j:push, a4j:poll - onenabled ondisabled
ilya_shaikovsky Mar 4, 2010 3:06 AM (in response to ilya_shaikovsky)in general client event handlers can't exist because switching state not occurs at client side but changed at server side. So see no spot for them. -
4. Re: a4j:push, a4j:poll - onenabled ondisabled
nimo22 Mar 4, 2010 5:00 AM (in response to ilya_shaikovsky)yes, I enable the poll via action - the enablement is triggered via view:
<a4j:commandButton action="doPollWork"/>
yes, I disable the poll via action - but the disablement is not explicitly triggered from the view.
void task(){
//long-running-process
setPollDisabled(true);
}
The poll is getting disabled..and now I need a reRender-Property:
I have no commandButton which disables the poll directly from the view, hence I cannot use reRender which should reRender view AFTER the disablement of the poll.
The only solution I would see, is: to have an additionaly pull, which pulls the update of the view after polling is completly disabled. With pull I can reRender the View from my Java-Code directly. Is there another way?
-
5. Re: a4j:push, a4j:poll - onenabled ondisabled
ilya_shaikovsky Mar 4, 2010 5:54 AM (in response to nimo22)if you need to add some zone for ajax render programatically during ajax request action/listener use :
AjaxContext.getCurrentInstance().addComponentToAjaxRender(FacesContext.getCurrentInstance().getViewRoot(), "someIdToRender");
-
6. Re: a4j:push, a4j:poll - onenabled ondisabled
nimo22 Mar 4, 2010 6:40 AM (in response to ilya_shaikovsky)Hello Ilya,
THANK YOU
!
This Method is exactly what I need!