Commit 753286a6 by Antti Tonkyra

Messagelist realtimeness

1 parent b5600e66
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html" xmlns:users="http://java.sun.com/jsf/composite/cditools/user" xmlns:h="http://java.sun.com/jsf/html" xmlns:users="http://java.sun.com/jsf/composite/cditools/user"
xmlns:tools="http://java.sun.com/jsf/composite/cditools" xmlns:f="http://java.sun.com/jsf/core" xmlns:tools="http://java.sun.com/jsf/composite/cditools" xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.prime.com.tr/ui"
> >
<h:body> <h:body>
...@@ -45,6 +46,8 @@ ...@@ -45,6 +46,8 @@
<div class="clearfix"></div> <div class="clearfix"></div>
<h2>#{i18n['actionlog.tasklist.header']}</h2> <h2>#{i18n['actionlog.tasklist.header']}</h2>
<div id="actionlog"> <div id="actionlog">
<h:form id="refresh">
<p:poll interval="1" update="actionlogtable" />
<h:dataTable styleClass="bordertable" rowClasses="roweven,rowodd" id="actionlogtable" value="#{actionLogMessageView.messages}" var="message"> <h:dataTable styleClass="bordertable" rowClasses="roweven,rowodd" id="actionlogtable" value="#{actionLogMessageView.messages}" var="message">
<h:column> <h:column>
<f:facet name="header"> <f:facet name="header">
...@@ -52,7 +55,6 @@ ...@@ -52,7 +55,6 @@
</f:facet> </f:facet>
<h:outputText value="#{message.time}"> <h:outputText value="#{message.time}">
<f:convertDateTime type="both" pattern="dd.MM.yyyy HH:mm" /> <f:convertDateTime type="both" pattern="dd.MM.yyyy HH:mm" />
<!-- <f:convertDateTime type="both" dateStyle="HH:mm" /> -->
</h:outputText> </h:outputText>
</h:column> </h:column>
<h:column> <h:column>
...@@ -78,6 +80,7 @@ ...@@ -78,6 +80,7 @@
x x
</h:column> </h:column>
</h:dataTable> </h:dataTable>
</h:form>
</div> </div>
</ui:define> </ui:define>
</ui:composition> </ui:composition>
......
...@@ -15,9 +15,19 @@ import fi.insomnia.bortal.web.cdiview.GenericCDIView; ...@@ -15,9 +15,19 @@ import fi.insomnia.bortal.web.cdiview.GenericCDIView;
public class ActionLogMessageView extends GenericCDIView { public class ActionLogMessageView extends GenericCDIView {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private boolean updateEnabled = true;
@EJB @EJB
private ActionLogBeanLocal actionLogBean; private ActionLogBeanLocal actionLogBean;
public boolean getUpdateEnabled() {
return updateEnabled;
}
public void setUpdateEnabled(boolean updateEnabled) {
this.updateEnabled = updateEnabled;
}
public List<ActionLogMessage> getMessages() { public List<ActionLogMessage> getMessages() {
return actionLogBean.getAllActionLogEvents(); return actionLogBean.getAllActionLogEvents();
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!