Commit 753286a6 by Antti Tonkyra

Messagelist realtimeness

1 parent b5600e66
......@@ -4,6 +4,7 @@
<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: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>
......@@ -45,6 +46,8 @@
<div class="clearfix"></div>
<h2>#{i18n['actionlog.tasklist.header']}</h2>
<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:column>
<f:facet name="header">
......@@ -52,7 +55,6 @@
</f:facet>
<h:outputText value="#{message.time}">
<f:convertDateTime type="both" pattern="dd.MM.yyyy HH:mm" />
<!-- <f:convertDateTime type="both" dateStyle="HH:mm" /> -->
</h:outputText>
</h:column>
<h:column>
......@@ -78,6 +80,7 @@
x
</h:column>
</h:dataTable>
</h:form>
</div>
</ui:define>
</ui:composition>
......
......@@ -15,9 +15,19 @@ import fi.insomnia.bortal.web.cdiview.GenericCDIView;
public class ActionLogMessageView extends GenericCDIView {
private static final long serialVersionUID = 1L;
private boolean updateEnabled = true;
@EJB
private ActionLogBeanLocal actionLogBean;
public boolean getUpdateEnabled() {
return updateEnabled;
}
public void setUpdateEnabled(boolean updateEnabled) {
this.updateEnabled = updateEnabled;
}
public List<ActionLogMessage> getMessages() {
return actionLogBean.getAllActionLogEvents();
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!