Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Bean
- {
- public void test()
- {
- System.out.println(System.currentTimeMillis());
- }
- }
- <script>
- window.setInterval(function()
- {
- //bean.test()
- }, 1000);
- </script>
- <h:form id="form">
- <h:outputText id="txt_count" value="#{counterBean.count}" />
- <p:poll interval="3"
- listener="#{counterBean.increment}" update="txt_count" />
- </h:form>
- <p:remoteCommand name="callback" actionListener="#{bean.test}"/>
- <h:outputScript>
- window.setInterval(function() {
- callback();
- }, 1000);
- </h:outputScript>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement