Skip to content

Commit

Permalink
Documented poll JS start and added demo.
Browse files Browse the repository at this point in the history
  • Loading branch information
jepsar committed May 23, 2017
1 parent 0447f6a commit f703aef
Show file tree
Hide file tree
Showing 3 changed files with 185 additions and 168 deletions.
15 changes: 12 additions & 3 deletions src/main/java/net/bootsfaces/demo/PollDemoBean.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@

import java.io.Serializable;
import java.util.Date;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;
import javax.faces.bean.ViewScoped;
import javax.faces.event.ActionEvent;

@RequestScoped
@ViewScoped
@ManagedBean
public class PollDemoBean implements Serializable {
private static final long serialVersionUID = 1L;

private int counter=0;

private boolean stop;

public Date getCurrentTime() { return new Date(); }

Expand All @@ -24,6 +25,14 @@ public void setCounter(int counter) {
this.counter = counter+1;
}

public boolean isStop() {
return stop;
}

public void setStop(boolean stop) {
this.stop = stop;
}

public void listener(ActionEvent event) {
// System.out.println("Poll called me");
}
Expand Down
5 changes: 0 additions & 5 deletions src/main/webapp/forms/PollAttributes.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,6 @@
<td>(none)</td>
<td>How often is the poll action to be called? Denotes the number of milliseconds between polls. Default value is 1000.</td>
</tr>
<tr>
<td>once</td>
<td>(none)</td>
<td>If true, the poll is called only once. Default value: false.</td>
</tr>
<tr>
<td>rendered</td>
<td>false</td>
Expand Down
Loading

0 comments on commit f703aef

Please sign in to comment.