continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r448898 - in /maven/continuum/trunk/continuum-webapp/src/main: java/org/apache/maven/continuum/web/components/ java/org/apache/maven/continuum/web/view/jsp/ui/ resources/template/default/ webapp/ webapp/WEB-INF/
Date Fri, 22 Sep 2006 12:14:00 GMT
Author: evenisse
Date: Fri Sep 22 05:13:59 2006
New Revision: 448898

URL: http://svn.apache.org/viewvc?view=rev&rev=448898
Log:
[CONTINUUM-901] Add support of links in continuum data tag
Submitted by: Marvin King

Modified:
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/components/Data.java
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/jsp/ui/DataTag.java
    maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/data.ftl
    maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/continuum.tld
    maven/continuum/trunk/continuum-webapp/src/main/webapp/projectView.jsp

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/components/Data.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/components/Data.java?view=diff&rev=448898&r1=448897&r2=448898
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/components/Data.java
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/components/Data.java
Fri Sep 22 05:13:59 2006
@@ -30,6 +30,8 @@
     extends UIBean
 {
     private static final String TEMPLATE = "data";
+    
+    protected String valueLink;
 
     public Data( OgnlValueStack stack, HttpServletRequest request, HttpServletResponse response
)
     {
@@ -39,5 +41,24 @@
     protected String getDefaultTemplate()
     {
         return TEMPLATE;
+    }
+    
+    public void setValueLink( String _link )
+    {
+        valueLink = _link;                
+    }
+    
+    public String getValueLink()
+    {
+        return valueLink;
+    }
+    
+    protected void evaluateExtraParams()
+    {
+        if (this.valueLink != null) 
+        {
+            valueLink = findString(this.valueLink);
+            addParameter("valueLink", valueLink);
+        }        
     }
 }

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/jsp/ui/DataTag.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/jsp/ui/DataTag.java?view=diff&rev=448898&r1=448897&r2=448898
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/jsp/ui/DataTag.java
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/jsp/ui/DataTag.java
Fri Sep 22 05:13:59 2006
@@ -31,8 +31,25 @@
 public class DataTag
     extends AbstractUITag
 {
+    
+    protected String valueLink;
+    
     public Component getBean( OgnlValueStack stack, HttpServletRequest req, HttpServletResponse
res )
     {
         return new Data( stack, req, res );
+    }
+    
+    public void setValueLink( String _link )
+    {
+        System.out.println(" link = " + _link);
+        valueLink = _link;    
+    }
+    
+    protected void populateParams()
+    {
+        super.populateParams();
+        
+        Data dataBean = ( Data ) this.component;
+        dataBean.setValueLink( valueLink );
     }
 }

Modified: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/data.ftl
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/data.ftl?view=diff&rev=448898&r1=448897&r2=448898
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/data.ftl (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/data.ftl Fri
Sep 22 05:13:59 2006
@@ -1,3 +1,9 @@
 <#include "/${parameters.templateDir}/${parameters.theme}/controlheader.ftl" />
+<#if parameters.valueLink?exists>
+    <a href="${parameters.valueLink}">    
+</#if>    
 <#if parameters.nameValue?exists>${parameters.nameValue}</#if>
+<#if parameters.valueLink?exists>
+    </a>    
+</#if>    
 <#include "/${parameters.templateDir}/${parameters.theme}/controlfooter.ftl" />

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/continuum.tld
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/continuum.tld?view=diff&rev=448898&r1=448897&r2=448898
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/continuum.tld (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/continuum.tld Fri Sep 22
05:13:59 2006
@@ -43,6 +43,11 @@
       <required>false</required>
       <rtexprvalue>false</rtexprvalue>
     </attribute>
+    <attribute>
+      <name>valueLink</name>
+      <required>false</required>
+      <rtexprvalue>true</rtexprvalue>
+    </attribute>    
   </tag>
 
   <tag>

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/projectView.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/projectView.jsp?view=diff&rev=448898&r1=448897&r2=448898
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/projectView.jsp (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/projectView.jsp Fri Sep 22 05:13:59
2006
@@ -24,20 +24,10 @@
             <c1:data label="%{getText('projectView.project.name')}" name="project.name"/>
             <c1:data label="%{getText('projectView.project.version')}" name="project.version"/>
             <c1:data label="%{getText('projectView.project.scmUrl')}" name="project.scmUrl"/>
-            <tr class="b">
-                <th>
-                    <label for="project_projectGroup_name" class="label">
-                        <ww:text name="%{getText('projectView.project.group')}"/>
-                    </label>
-                </th>
-                <td>
-                    <a href='<ww:url value="/projectGroupSummary.action">
-                                 <ww:param name="projectGroupId" value="%{project.projectGroup.id}"/>
-                             </ww:url>'>
-                    <c:out value="${project.projectGroup.name}"/>
-                    </a>                    
-                </td>
-            </tr>            
+            <ww:url id="projectGroupSummaryUrl" value="/projectGroupSummary.action">
+                <ww:param name="projectGroupId" value="%{project.projectGroup.id}"/>
+            </ww:url>            
+            <c1:data label="%{getText('projectView.project.group')}" name="project.projectGroup.name"
valueLink="%{'${projectGroupSummaryUrl}'}"/>
           </table>
           <!--
             wrap this in security tag



Mime
View raw message