-
1. Re: Ajax push not working.
ilya40umov Jan 4, 2011 4:41 AM (in response to deeps83)Look at http://docs.jboss.org/richfaces/latest_3_3_X/en/devguide/html/a4j_push.html. I guess you can find the answer there.
-
2. Re: Ajax push not working.
ilya_shaikovsky Jan 4, 2011 4:49 AM (in response to deeps83)and here is iteration component partial updates sample.
-
3. Re: Ajax push not working.
deeps83 Jan 4, 2011 6:03 AM (in response to ilya40umov)Hi,
I have already gone through this and felt that using push is better than using poll and that is why I tried using push.But what can be the reason why the rerendering is not working ?My related xhtml code is :
<h:form id="mhForm15">
<a:outputPanel id="gridopanel">
<a:push interval="10000"
eventProducer="#{myhome.myHmChartPushListener}"
reRender="chg,mhpush" enabled="#{myhome.mhPushEnabled}"
id="mhpush" />
<h:panelGrid id="chg" binding="#{myhome.chartPanelGrid}">
</h:panelGrid>
</a:outputPanel>
</h:form>The chartPanelGrid child components are being changed each time.But when rerendered the chartPanelGrid in the response will have the old child components.
Thanks,Deeps.
-
4. Re: Ajax push not working.
deeps83 Jan 4, 2011 6:04 AM (in response to ilya_shaikovsky)Hi Ilya,
Sorry I didnt get what you meant.
Deeps.
-
5. Re: Ajax push not working.
deeps83 Jan 4, 2011 7:02 AM (in response to ilya_shaikovsky)Hi Ilya Shaikovsky,
Could you please make it clear what you meant.Is there anything wrong with my code?
Thanks,Deeps.
-
6. Re: Ajax push not working.
ilya40umov Jan 4, 2011 7:27 AM (in response to deeps83)From link I added:
IMHO a4j:push can not be used in your case.
-
7. Re: Ajax push not working.
deeps83 Jan 5, 2011 12:47 AM (in response to ilya40umov)Hi,
Yes I have read this.But once some messages or objects are present in the queue it will rerender the components which are given to rerender wright? In that way it should rerender the HTMLPanelGrid which is given to rerender wright?
Or can you please make it a bit more clear, why push doesn't work in my case?
Thanks,
Deeps.
-
8. Re: Ajax push not working.
ilya40umov Jan 5, 2011 1:04 AM (in response to deeps83)IMHO: I think so because a4j:push does not request JSF tree. So when you are adding some elements in your bean dinamically to JSF tree it does not work.
-
9. Re: Ajax push not working.
deeps83 Jan 5, 2011 1:21 AM (in response to ilya40umov)It says :
That means initially to check for the queue it will make request to minimal code only (not to JSF tree) and once it finds some messages in the queue it will make completerequest wright?
Thanks,
Deeps.
-
10. Re: Ajax push not working.
ilya40umov Jan 5, 2011 2:07 AM (in response to deeps83)May be I'm wrong that's why I used "IMHO" =)
I think that there could be another cause:
Thus, component 'push' uses asynchronous model instead of polls
It means that push works in another, asynchronous way. It looks like it's very different from a4j:poll. Could you post a code sample how you are using push instead of poll?
P.S. Have you looked at http://livedemo.exadel.com/richfaces-demo/richfaces/push.jsf?tab=usage&cid=1108855?
-
11. Re: Ajax push not working.
deeps83 Jan 5, 2011 2:51 AM (in response to ilya40umov)Hi,
Code I have already posted.Here it is once again :
I have gone through the documentation as well as the live demo page.But could not find what is wrong in my code.
<h:form id="mhForm15">
<a:outputPanel id="gridopanel">
<a:push interval="10000"
eventProducer="#{myhome.myHmChartPushListener}"
reRender="chg,mhpush" enabled="#{myhome.mhPushEnabled}"
id="mhpush" />
<h:panelGrid id="chg" binding="#{myhome.chartPanelGrid}">
</h:panelGrid>
</a:outputPanel>
</h:form>Thanks,
Deeps.
-
12. Re: Ajax push not working.
ilya40umov Jan 5, 2011 3:17 AM (in response to deeps83)What is your implementation of #{myhome.myHmChartPushListener}?
-
13. Re: Ajax push not working.
deeps83 Jan 5, 2011 3:48 AM (in response to ilya40umov)public void myHmChartPushListener(EventListener mhChartListener) {
if (this.mhChartListener != mhChartListener)
setMhChartListener((PushEventListener) mhChartListener);
}Thanks,
Deeps.
-
14. Re: Ajax push not working.
ilya40umov Jan 5, 2011 3:52 AM (in response to deeps83)So where and when do you change #{myhome.chartPanelGrid} ? Could you also post this code, please?