Hi all,
not sure I'm asking this question in the right place, so please point
me to a more correct place if needed :) ( had a look at the oracle
forums but they seemed very quiet, and a similar question to mine was
never answered).
I am using ADF Faces (EA19) with myfaces (1.1.1) and Facelets (1.0.4),
and I can not get the poll tag to work correctly, it will just poll
once and then nothing!
The processPollEvent method gets called int the one poll that occurs,
and the 'action' to be triggered when the poll reaches its goal is not
triggered.
I think the attribute for setting the poll interval is 'interval', and not 'pollInterval' like it says in the ADF Faces docs?
======== html :
<form jsfc="h:form" id="pollForm">
<af:poll id="poller"
immediate="false"
interval="2000"
pollListener="#{poller.processPollEvent}"/>
<af:progressIndicator id="progress_widget"
action=""
value="#{poller.rangeModel}"
partialTriggers="poller"/>
..........
======= bean :
ublic class PollBean {
private static Logger log = Logger.getLogger( PollBean.class );
private BoundedRangeModel rangeModel = new DefaultBoundedRangeModel(0,10);
public BoundedRangeModel getRangeModel() {
return rangeModel;
}
public void setRangeModel(BoundedRangeModel rangeModel) {
this.rangeModel = rangeModel;
}
public void processPollEvent(PollEvent pe){
if( jobId == null || jobId.length() == 0){
getReqParameters();
}
log.info("=============== In poll event");
rangeModel = new
DefaultBoundedRangeModel( rangeModel.getValue()+1,
rangeModel.getMaximum() );
log.info("processPollEvent: JobId=" +jobId +", toolName=" +toolName);
status = "JobId=" +jobId +",
toolName=" +toolName +"rangeModel value: " +rangeModel.getValue();
}
....
}
Regards, Mikael

