You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by sm...@apache.org on 2022/04/11 05:04:31 UTC

[directory-fortress-commander] branch wicket9 updated: added a label to launch page for logged in user

This is an automated email from the ASF dual-hosted git repository.

smckinney pushed a commit to branch wicket9
in repository https://gitbox.apache.org/repos/asf/directory-fortress-commander.git


The following commit(s) were added to refs/heads/wicket9 by this push:
     new 908aeeb  added a label to launch page for logged in user
908aeeb is described below

commit 908aeebeb898a9996c2ce713b8c6d043a94dc2ba
Author: Shawn McKinney <sm...@symas.com>
AuthorDate: Mon Apr 11 00:04:25 2022 -0500

    added a label to launch page for logged in user
---
 .../java/org/apache/directory/fortress/web/LaunchPage.java    | 11 +++++++++--
 .../org/apache/directory/fortress/web/LaunchPage.html         |  1 +
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/directory/fortress/web/LaunchPage.java b/src/main/java/org/apache/directory/fortress/web/LaunchPage.java
index 42eefd0..e87f813 100644
--- a/src/main/java/org/apache/directory/fortress/web/LaunchPage.java
+++ b/src/main/java/org/apache/directory/fortress/web/LaunchPage.java
@@ -20,6 +20,7 @@
 package org.apache.directory.fortress.web;
 
 
+import org.apache.directory.fortress.web.common.GlobalIds;
 import org.apache.wicket.markup.html.basic.Label;
 
 import javax.servlet.http.HttpServletRequest;
@@ -38,12 +39,18 @@ public class LaunchPage extends FortressWebBasePage
 
     public LaunchPage()
     {
+        String label2 = "";
         HttpServletRequest servletReq = ( HttpServletRequest ) getRequest().getContainerRequest();
         Principal principal = servletReq.getUserPrincipal();
         if ( principal == null )
         {
             setResponsePage( LoginPage.class );
         }
-        add( new Label( "label1", "Click on a link above." ) );
+        else
+        {
+            label2 = "Signed on user: " + principal.getName();
+        }
+        add( new Label( "label1", "Select a program link." ) );
+        add( new Label( "label2", label2 ) );
     }
-}
\ No newline at end of file
+}
diff --git a/src/main/resources/org/apache/directory/fortress/web/LaunchPage.html b/src/main/resources/org/apache/directory/fortress/web/LaunchPage.html
index 546e1bc..f9f9466 100644
--- a/src/main/resources/org/apache/directory/fortress/web/LaunchPage.html
+++ b/src/main/resources/org/apache/directory/fortress/web/LaunchPage.html
@@ -22,6 +22,7 @@
 <wicket:extend>
     <h3>Apache Fortress Web Launch Page</h3>
     <strong><span wicket:id="label1"></span></strong>
+    <br><br><span wicket:id="label2"></span><br><br>
 </wicket:extend>
 </body>
 </html>