continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r365963 - in /maven/continuum/trunk/continuum-webapp/src/main: java/org/apache/maven/continuum/web/view/jsp/ui/SubmitCancelTag.java resources/template/default/submit_cancel.vm webapp/WEB-INF/continuum.tld
Date Wed, 04 Jan 2006 18:14:57 GMT
Author: evenisse
Date: Wed Jan  4 10:14:48 2006
New Revision: 365963

URL: http://svn.apache.org/viewcvs?rev=365963&view=rev
Log:
Add a submit/cancel tag

Added:
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/jsp/ui/SubmitCancelTag.java
  (with props)
    maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/submit_cancel.vm
  (with props)
Modified:
    maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/continuum.tld

Added: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/jsp/ui/SubmitCancelTag.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/jsp/ui/SubmitCancelTag.java?rev=365963&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/jsp/ui/SubmitCancelTag.java
(added)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/jsp/ui/SubmitCancelTag.java
Wed Jan  4 10:14:48 2006
@@ -0,0 +1,54 @@
+package org.apache.maven.continuum.web.view.jsp.ui;
+
+/*
+ * Copyright 2004-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import com.opensymphony.webwork.views.jsp.ui.SubmitTag;
+import com.opensymphony.xwork.util.OgnlValueStack;
+
+/**
+ * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
+ * @version $Id$
+ */
+public class SubmitCancelTag
+    extends SubmitTag
+{
+    /**
+     * The name of the default template for the SubmitCancelTag
+     */
+    final public static String TEMPLATE = "submit_cancel";
+
+    private String cancel;
+
+    public void setCancel( String cancel )
+    {
+        this.cancel = cancel;
+    }
+
+    protected String getDefaultTemplate()
+    {
+        return TEMPLATE;
+    }
+
+    protected void evaluateParams(OgnlValueStack stack)
+    {
+        super.evaluateParams( stack );
+        if ( cancel != null )
+        {
+            addParameter( "cancel", findString( cancel ) );
+        }
+    }
+}

Propchange: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/jsp/ui/SubmitCancelTag.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/jsp/ui/SubmitCancelTag.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/submit_cancel.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/submit_cancel.vm?rev=365963&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/submit_cancel.vm
(added)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/submit_cancel.vm
Wed Jan  4 10:14:48 2006
@@ -0,0 +1,5 @@
+<tr>
+    <td colspan="2"><div #if ($parameters.align) align="$!webwork.htmlEncode($parameters.align)"
#end
+>#parse("/template/simple/submit.vm")
+#if ($parameters.cancel) &nbsp;<input type="button" name="Cancel" value="$parameters.cancel)"
onClick="history.back()"/> #end
+</div>#parse( "/template/default/controlfooter.vm" )

Propchange: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/submit_cancel.vm
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-webapp/src/main/resources/template/default/submit_cancel.vm
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/continuum.tld
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/continuum.tld?rev=365963&r1=365962&r2=365963&view=diff
==============================================================================
--- 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 Wed Jan 
4 10:14:48 2006
@@ -28,4 +28,66 @@
 		</attribute>
 	</tag>
 
+    <tag>
+        <name>submitcancel</name>
+        <tagclass>org.apache.maven.continuum.web.view.jsp.ui.SubmitCancelTag</tagclass>
+        <bodycontent>JSP</bodycontent>
+        <info>An HTML Submit-Cancel UI widget</info>
+        <attribute>
+            <name>id</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>cssClass</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>cssStyle</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>label</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>labelposition</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>theme</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>template</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>name</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>value</name>
+            <required>true</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>align</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+        <attribute>
+            <name>cancel</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+    </tag>
+
 </taglib>



Mime
View raw message