こんにちは、tr:poll を使用しようとしていますが、うまくいきません。私のjspxはbodyタグ内のように見えますが、
<f:view>
<tr:document></tr:document>
<tr:form>
<tr:poll id="poller" interval="500" pollListener="#{sessionScope.mainBean.polled}" ></tr:poll>
<tr:outputText value="#{sessionScope.mainBean.count }" partialTriggers="poller"></tr:outputText>
</tr:form>
メインビーンは次のようになります
public class MainBean
{
private String user;
private int count = 0;
public MainBean(String user)
{
this.user = user;
}
public void polled(org.apache.myfaces.trinidad.event.PollEvent poe)
{
System.out.println(count + "polled by "+user);
++count;
}
public int getCount()
{
return count;
}
}
ただし、 polled は 1 回だけ呼び出されます。
ここで何が問題なのですか?
編集:
こんにちは、みんな、
私はあまりにも足が不自由なようで、ppr をまったく機能させることができません。投票はそのままにしておきます。ここにアーカイブされたEclipseプロジェクトをアップロードしました.JSF 2.0とトリニダード2.0、jstl 1.2を使用しています。 http://www.mediafire.com/?u35h0k65qh5ed71 上記とほぼ同じです。