Skip to content

Commit 7eba97a

Browse files
committed
added polling for status
1 parent dc9b006 commit 7eba97a

File tree

4 files changed

+7
-0
lines changed

4 files changed

+7
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ target
99
**.idea
1010
**nb-configuration.xml
1111
**nbactions.xml
12+
**faces-config.NavData

emailmanager/hope-website/WEB-INF/web.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
xsi:schemaLocation="http://java.sun.com/xml/ns/javaeehttp://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
55
<display-name>Hope</display-name>
66
<distributable/>
7+
<welcome-files>
8+
<welcome-file>emailmanager.xhtml</welcome-file>
9+
</welcome-files>
710
<context-param>
811
<param-name>javax.faces.PROJECT_STAGE</param-name>
912
<param-value>Development</param-value>

emailmanager/hope-website/emailmanager.xhtml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
<h:form id="status">
1717
<h3>E-Mail Operation Status: ${emailManager.emailStatus}</h3>
1818
<p:commandButton value="Log Out" action="#{authc.logout}"/>
19+
<p:poll interval="5" autoStart="false" stop="#{true}" widgetVar="poll" update="status"/>
1920
</h:form>
2021
</h:body>
2122
</html>

emailmanager/src/main/java/com/flowlogix/website/ui/EmailManager.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import lombok.Getter;
88
import org.apache.shiro.authz.annotation.RequiresPermissions;
99
import org.omnifaces.util.JNDIObjectLocator;
10+
import org.primefaces.PrimeFaces;
1011

1112
/**
1213
*
@@ -55,5 +56,6 @@ private void setMockMessage(String junkErasedMessage) {
5556
} else {
5657
emailStatus = junkErasedMessage;
5758
}
59+
PrimeFaces.current().executeScript("PF('poll').start()");
5860
}
5961
}

0 commit comments

Comments
 (0)