This content has been marked as final.
Show 2 replies
-
1. Re: Question about ajax design
parki Dec 30, 2007 4:15 PM (in response to parki)Aha - can I use <a4j:push> ?
Here's part of the xhtml page:<rich:tree id="thermostat" style="width:300px" nodeSelectListener="#{thermostatAdaptor.processSelection}" reRender="province" ajaxSubmitSelection="true" switchType="client" value="#{thermostatAdaptor.treeNode}" var="item"> </rich:tree> <a4j:push reRender="thermostat" eventProducer="#{thermostatAdaptor.addListener}" interval="1000"/>
and part of the model code:public void notifyModified() { loadThermostat(); if(listener_ != null) { listener_.onEvent(new EventObject(this)); } } public void addListener(EventListener listener) { synchronized (listener) { if(listener_ != listener) listener_ = (PushEventsCounter) listener; } }
When I try this, addListener gets called (with a PushEventsCounter). When the tree data is updated (by another process), the notifyModified method is called, but the thermostat is not rerendered.
Methinks something is missing?
Any why is there a polling interval on push - is this the time delay between calls to the server?
Any help is appreciated - the demo doesn't have example code I can steal.
Thanks.
parki... -
2. Re: Question about ajax design
parki Jan 1, 2008 1:41 PM (in response to parki)Doesn't work in FireFox - see:
http://jira.jboss.org/jira/browse/RF-1753
I was using FireFox. In the bug report, alexsmirnox reports "this exception does not occur if the FireBug extension is enabled" which I can confirm - when running FireFox with Firebug, the <a4j:push> element works fine.
Off to check on IE on Windows.
parki...