Changed wayf page to display first alias in sites file instead of name.
authorwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Fri, 30 Aug 2002 05:52:46 +0000 (05:52 +0000)
committerwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Fri, 30 Aug 2002 05:52:46 +0000 (05:52 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@271 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/edu/internet2/middleware/shibboleth/wayf/Origin.java
webApplication/wayf.jsp

index 31d69d0..53c1269 100755 (executable)
@@ -66,9 +66,9 @@ import org.apache.log4j.Logger;
 public class Origin {
 
        private static Logger log = Logger.getLogger(Origin.class.getName());
-    private String name;
+    private String name = "";
     private ArrayList aliases = new ArrayList();
-    private String handleService;
+    private String handleService = "";
 
     /**
      * Gets the handleService for this origin.
@@ -93,6 +93,14 @@ public class Origin {
     public String getName() {
         return name;
     }
+    
+    public String getDisplayName() {
+       if (aliases.get(0) != null) {
+               return (String) aliases.get(0);
+       } else {
+               return getName();
+       }
+    }
 
     public String getUrlEncodedName() {
 
index 9007adb..1aceabb 100755 (executable)
@@ -42,7 +42,7 @@
                <ul>
                <logic:iterate id="currResult" name="searchresults">
                        <li>
-                       <a href="<bean:write name="requestURL" />?action=selection&amp;origin=<jsp:getProperty name="currResult" property="urlEncodedName" />&amp;shire=<bean:write name="encodedShire" />&amp;target=<bean:write name="encodedTarget" />"><jsp:getProperty name="currResult" property="name" /></a>
+                       <a href="<bean:write name="requestURL" />?action=selection&amp;origin=<jsp:getProperty name="currResult" property="urlEncodedName" />&amp;shire=<bean:write name="encodedShire" />&amp;target=<bean:write name="encodedTarget" />"><jsp:getProperty name="currResult" property="displayName" /></a>
                        </li>
                </logic:iterate>
                </ul>           
@@ -70,8 +70,8 @@
 <input type="hidden" name="action" value="selection" />
 <select name="origin">
        <logic:iterate id="origin" name="originset" property="origins">
-               <option value="<jsp:getProperty name="origin" property="name" />">
-               <jsp:getProperty name="origin" property="name" />
+               <option value="<jsp:getProperty name="origin" property="displayName" />">
+               <jsp:getProperty name="origin" property="displayName" />
                </option>
        </logic:iterate>
 </select>