struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject svn commit: r750173 - in /struts/sandbox/trunk/struts2-jquery-plugin/src/main: java/org/apache/struts2/jquery/components/ java/org/apache/struts2/jquery/views/jsp/ui/ resources/template/jquery/
Date Wed, 04 Mar 2009 21:48:56 GMT
Author: wesw
Date: Wed Mar  4 21:48:55 2009
New Revision: 750173

URL: http://svn.apache.org/viewvc?rev=750173&view=rev
Log:
adding a reset tag

Added:
    struts/sandbox/trunk/struts2-jquery-plugin/src/main/java/org/apache/struts2/jquery/components/JQueryReset.java
    struts/sandbox/trunk/struts2-jquery-plugin/src/main/java/org/apache/struts2/jquery/views/jsp/ui/JQueryResetTag.java
    struts/sandbox/trunk/struts2-jquery-plugin/src/main/resources/template/jquery/empty.ftl
    struts/sandbox/trunk/struts2-jquery-plugin/src/main/resources/template/jquery/reset.ftl

Added: struts/sandbox/trunk/struts2-jquery-plugin/src/main/java/org/apache/struts2/jquery/components/JQueryReset.java
URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-jquery-plugin/src/main/java/org/apache/struts2/jquery/components/JQueryReset.java?rev=750173&view=auto
==============================================================================
--- struts/sandbox/trunk/struts2-jquery-plugin/src/main/java/org/apache/struts2/jquery/components/JQueryReset.java
(added)
+++ struts/sandbox/trunk/struts2-jquery-plugin/src/main/java/org/apache/struts2/jquery/components/JQueryReset.java
Wed Mar  4 21:48:55 2009
@@ -0,0 +1,27 @@
+package org.apache.struts2.jquery.components;
+
+import org.apache.struts2.components.Reset;
+import org.apache.struts2.jquery.JQueryPluginStatics;
+import com.opensymphony.xwork2.util.ValueStack;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: wesw
+ * Date: Mar 4, 2009
+ * Time: 4:01:16 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public class JQueryReset extends Reset {
+
+    public JQueryReset(ValueStack stack, HttpServletRequest request, HttpServletResponse
response) {
+        super(stack, request, response);
+    }
+
+    @Override
+    public String getTheme() {
+        return JQueryPluginStatics.THEME_NAME;
+    }
+}

Added: struts/sandbox/trunk/struts2-jquery-plugin/src/main/java/org/apache/struts2/jquery/views/jsp/ui/JQueryResetTag.java
URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-jquery-plugin/src/main/java/org/apache/struts2/jquery/views/jsp/ui/JQueryResetTag.java?rev=750173&view=auto
==============================================================================
--- struts/sandbox/trunk/struts2-jquery-plugin/src/main/java/org/apache/struts2/jquery/views/jsp/ui/JQueryResetTag.java
(added)
+++ struts/sandbox/trunk/struts2-jquery-plugin/src/main/java/org/apache/struts2/jquery/views/jsp/ui/JQueryResetTag.java
Wed Mar  4 21:48:55 2009
@@ -0,0 +1,37 @@
+package org.apache.struts2.jquery.views.jsp.ui;
+
+import org.apache.struts2.views.jsp.ui.ResetTag;
+import org.apache.struts2.views.annotations.StrutsTag;
+import org.apache.struts2.components.Component;
+import org.apache.struts2.jquery.components.JQueryReset;
+import com.opensymphony.xwork2.util.ValueStack;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: wesw
+ * Date: Mar 4, 2009
+ * Time: 4:02:54 PM
+ * To change this template use File | Settings | File Templates.
+ */
+@StrutsTag(
+    name="reset",
+    tldTagClass="org.apache.struts2.jquery.views.jsp.ui.JQueryResetTag",
+    description="Render a reset button",
+    allowDynamicAttributes=true)
+public class JQueryResetTag extends ResetTag {
+
+    @Override
+    public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse
res) {
+        return new JQueryReset(stack, req, res);
+    }
+
+    @Override
+    protected void populateParams() {
+        super.populateParams();
+        JQueryReset reset = (JQueryReset) component;
+        // add custom params here
+    }
+}

Added: struts/sandbox/trunk/struts2-jquery-plugin/src/main/resources/template/jquery/empty.ftl
URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-jquery-plugin/src/main/resources/template/jquery/empty.ftl?rev=750173&view=auto
==============================================================================
--- struts/sandbox/trunk/struts2-jquery-plugin/src/main/resources/template/jquery/empty.ftl
(added)
+++ struts/sandbox/trunk/struts2-jquery-plugin/src/main/resources/template/jquery/empty.ftl
Wed Mar  4 21:48:55 2009
@@ -0,0 +1,22 @@
+<#--
+/*
+ * $Id: empty.ftl 590812 2007-10-31 20:32:54Z apetrelli $
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+-->

Added: struts/sandbox/trunk/struts2-jquery-plugin/src/main/resources/template/jquery/reset.ftl
URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-jquery-plugin/src/main/resources/template/jquery/reset.ftl?rev=750173&view=auto
==============================================================================
--- struts/sandbox/trunk/struts2-jquery-plugin/src/main/resources/template/jquery/reset.ftl
(added)
+++ struts/sandbox/trunk/struts2-jquery-plugin/src/main/resources/template/jquery/reset.ftl
Wed Mar  4 21:48:55 2009
@@ -0,0 +1,31 @@
+<#--
+/*
+ * $Id: reset.ftl 720258 2008-11-24 19:05:16Z musachy $
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+-->
+<tr>
+    <td colspan="2"><div <#rt/>
+<#if parameters.align??>
+    align="${parameters.align?html}"<#t/>
+</#if>
+><#t/>
+<#include "/${parameters.templateDir}/simple/reset.ftl" />
+</div><#t/>
+<#include "/${parameters.templateDir}/xhtml/controlfooter.ftl" />



Mime
View raw message