Revision: 13756
          http://gate.svn.sourceforge.net/gate/?rev=13756&view=rev
Author:   valyt
Date:     2011-04-26 10:39:59 +0000 (Tue, 26 Apr 2011)

Log Message:
-----------
Allow overriding the server name by supplying an attribute value. 

Modified Paths:
--------------
    
mimir/trunk/grails-plugin-mimir/grails-app/taglib/gate/mimir/web/MimirTagLib.groovy

Modified: 
mimir/trunk/grails-plugin-mimir/grails-app/taglib/gate/mimir/web/MimirTagLib.groovy
===================================================================
--- 
mimir/trunk/grails-plugin-mimir/grails-app/taglib/gate/mimir/web/MimirTagLib.groovy
 2011-04-26 10:34:09 UTC (rev 13755)
+++ 
mimir/trunk/grails-plugin-mimir/grails-app/taglib/gate/mimir/web/MimirTagLib.groovy
 2011-04-26 10:39:59 UTC (rev 13756)
@@ -58,10 +58,17 @@
 '''
   }
   
+  /**
+   * Creates an Index URL value by generating a link to the "index" 
+   * action of the "indexManagement" controller.
+   * 
+   * If provided, the <code>serverName</code> attribute is used to override 
the 
+   * the host name part of the produced URL.
+   */
   def createIndexUrl = { attrs, body ->
     out << request.scheme
     out << "://"
-    out << request.serverName
+    out << attrs?.serverName?: request.serverName
     if((request.scheme == "https" && request.serverPort != 443) ||
        (request.scheme == "http" && request.severPort != 80)) {
       out << ":${request.serverPort}"


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs

Reply via email to