Author: sviluppatorefico
Date: 2008-05-18 07:07:15 -0400 (Sun, 18 May 2008)
New Revision: 10777
Modified:
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-sar/META-INF/jboss-service.xml
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/classes/Resource.properties
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/classes/Resource_fr.properties
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/classes/Resource_it.properties
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/jsp/users/oneUser.jsp
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/jsp/users/users.jsp
Log:
added support for guests and sessions
Modified:
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-sar/META-INF/jboss-service.xml
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-sar/META-INF/jboss-service.xml 2008-05-18
11:06:15 UTC (rev 10776)
+++
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-sar/META-INF/jboss-service.xml 2008-05-18
11:07:15 UTC (rev 10777)
@@ -37,4 +37,17 @@
<attribute
name="ListenerClassName">org.jboss.portal.core.samples.users.event.UserEventListener</attribute>
</mbean>
+ <mbean
+ code="org.jboss.portal.core.event.PortalEventListenerServiceImpl"
+ name="portal:service=ListenerService,type=session_listener"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <depends
+ optional-attribute-name="Registry"
+
proxy-type="attribute">portal:service=ListenerRegistry</depends>
+ <attribute name="RegistryId">session_listener</attribute>
+ <attribute
name="ListenerClassName">org.jboss.portal.core.samples.users.event.PortalSessionEventListener</attribute>
+ </mbean>
+
</server>
Modified:
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/classes/Resource.properties
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/classes/Resource.properties 2008-05-18
11:06:15 UTC (rev 10776)
+++
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/classes/Resource.properties 2008-05-18
11:07:15 UTC (rev 10777)
@@ -23,10 +23,13 @@
NO_USERS_ONLINE=No logged-in user
ONE_USER_ONLINE_0=There is <b>
-ONE_USER_ONLINE_1=</b> logged-in user:
+ONE_USER_ONLINE_1=</b> online user
ONE_USER_IS_0=<b>
ONE_USER_IS_1=</b>
USERS_ONLINE_0=There are <b>
-USERS_ONLINE_1=</b> logged-in users:
+USERS_ONLINE_1=</b> online users
USERS_ARE_0=<b>
-USERS_ARE_1=</b>
\ No newline at end of file
+USERS_ARE_1=</b>
+USERS_WHICH_0=Whose <b>
+USERS_WHICH_1=</b> are logged-in:
+USERS_WHICH_2=</b> is logged-in:
\ No newline at end of file
Modified:
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/classes/Resource_fr.properties
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/classes/Resource_fr.properties 2008-05-18
11:06:15 UTC (rev 10776)
+++
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/classes/Resource_fr.properties 2008-05-18
11:07:15 UTC (rev 10777)
@@ -30,7 +30,7 @@
ONE_USER_ONLINE_0 = Il y a <b>
-ONE_USER_ONLINE_1 = </b> utilisateur en ligne:
+ONE_USER_ONLINE_1 = </b> utilisateur en ligne
USERS_ARE_0 = <b>
@@ -38,4 +38,4 @@
USERS_ONLINE_0 = Il y a <b>
-USERS_ONLINE_1 = </b> utilisateurs en ligne:
+USERS_ONLINE_1 = </b> utilisateurs en ligne
Modified:
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/classes/Resource_it.properties
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/classes/Resource_it.properties 2008-05-18
11:06:15 UTC (rev 10776)
+++
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/classes/Resource_it.properties 2008-05-18
11:07:15 UTC (rev 10777)
@@ -23,10 +23,13 @@
NO_USERS_ONLINE=Nessun utente \u00e8 online
ONE_USER_ONLINE_0=Al momento c'\u00e8 <b>
-ONE_USER_ONLINE_1=</b> utente online:
+ONE_USER_ONLINE_1=</b> utente online
ONE_USER_IS_0=<b>
ONE_USER_IS_1=</b>
USERS_ONLINE_0=Al momento ci sono <b>
-USERS_ONLINE_1=</b> utenti online:
+USERS_ONLINE_1=</b> utenti online
USERS_ARE_0=<b>
-USERS_ARE_1=</b>
\ No newline at end of file
+USERS_ARE_1=</b>
+USERS_WHICH_0=Di cui <b>
+USERS_WHICH_1=</b> sono loggati:
+USERS_WHICH_2=</b> \u00e8 loggato:
\ No newline at end of file
Modified:
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/jsp/users/oneUser.jsp
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/jsp/users/oneUser.jsp 2008-05-18
11:06:15 UTC (rev 10776)
+++
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/jsp/users/oneUser.jsp 2008-05-18
11:07:15 UTC (rev 10777)
@@ -34,11 +34,16 @@
<span class="portlet-text">
${n:i18n("ONE_USER_ONLINE_0")}
${n:out("USERS_COUNT")}
- ${n:i18n("ONE_USER_ONLINE_1")}
+ ${n:i18n("ONE_USER_ONLINE_1")}
+ <% java.util.LinkedList linkedStack =
(java.util.LinkedList)contextStack.get();
+ org.jboss.portal.core.servlet.jsp.taglib.context.Context currentContext =
+
((org.jboss.portal.core.servlet.jsp.taglib.context.NamedContext)linkedStack.getLast()).getContext();
+ if (!currentContext.get("USERS").equals("[]")) {
%>
<br/><br/>
${n:i18n("ONE_USER_IS_0")}
${n:out("USERS")}
${n:i18n("ONE_USER_IS_1")}
+ <% } %>
</span>
</td>
</tr>
Modified:
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/jsp/users/users.jsp
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/jsp/users/users.jsp 2008-05-18
11:06:15 UTC (rev 10776)
+++
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-users-samples-war/WEB-INF/jsp/users/users.jsp 2008-05-18
11:07:15 UTC (rev 10777)
@@ -34,11 +34,26 @@
<span class="portlet-text">
${n:i18n("USERS_ONLINE_0")}
${n:out("USERS_COUNT")}
- ${n:i18n("USERS_ONLINE_1")}
+ ${n:i18n("USERS_ONLINE_1")}
+ <% java.util.LinkedList linkedStack =
(java.util.LinkedList)contextStack.get();
+ org.jboss.portal.core.servlet.jsp.taglib.context.Context currentContext =
+
((org.jboss.portal.core.servlet.jsp.taglib.context.NamedContext)linkedStack.getLast()).getContext();
+ if
(!currentContext.get("USERS_LOGGED_COUNT").equals("0")) { %>
<br/><br/>
+ ${n:i18n("USERS_WHICH_0")}
+ ${n:out("USERS_LOGGED_COUNT")}
+ <% if
(!currentContext.get("USERS_LOGGED_COUNT").equals("1")) { %>
+ ${n:i18n("USERS_WHICH_1")}
+ <% } else { %>
+ ${n:i18n("USERS_WHICH_2")}
+ <% } %>
+ <% }
+ if (!currentContext.get("USERS").equals("[]")) {
%>
+ <br/><br/>
${n:i18n("USERS_ARE_0")}
${n:out("USERS")}
- ${n:i18n("USERS_ARE_1")}
+ ${n:i18n("USERS_ARE_1")}
+ <% } %>
</span>
</td>
</tr>