struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From musa...@apache.org
Subject svn commit: r750191 - in /struts/sandbox/trunk/s2-jquery-showcase: ./ src/main/java/org/apache/struts2/jquery/actions/ src/main/java/org/apache/struts2/jquery/actions/form/ src/main/resources/ src/main/resources/org/apache/struts2/jquery/actions/ src/m...
Date Wed, 04 Mar 2009 22:08:49 GMT
Author: musachy
Date: Wed Mar  4 22:08:49 2009
New Revision: 750191

URL: http://svn.apache.org/viewvc?rev=750191&view=rev
Log:
Use convention plugin and rename some files

Added:
    struts/sandbox/trunk/s2-jquery-showcase/src/main/java/org/apache/struts2/jquery/actions/form/
    struts/sandbox/trunk/s2-jquery-showcase/src/main/java/org/apache/struts2/jquery/actions/form/MessageAction.java
      - copied, changed from r750136, struts/sandbox/trunk/s2-jquery-showcase/src/main/java/org/apache/struts2/jquery/actions/MessageAction.java
    struts/sandbox/trunk/s2-jquery-showcase/src/main/resources/org/apache/struts2/jquery/actions/form/
    struts/sandbox/trunk/s2-jquery-showcase/src/main/resources/org/apache/struts2/jquery/actions/form/MessageAction-validation.xml
      - copied unchanged from r750136, struts/sandbox/trunk/s2-jquery-showcase/src/main/resources/org/apache/struts2/jquery/actions/MessageAction-validation.xml
    struts/sandbox/trunk/s2-jquery-showcase/src/main/webapp/WEB-INF/content/form/SimpleFormWithResetGetAjaxResp-input.jsp
      - copied, changed from r750186, struts/sandbox/trunk/s2-jquery-showcase/src/main/webapp/WEB-INF/content/form/FormWithResetGetReqAjaxResp-input.jsp
    struts/sandbox/trunk/s2-jquery-showcase/src/main/webapp/WEB-INF/content/form/SimpleFormWithResetGetAjaxResponse.jsp
      - copied unchanged from r750186, struts/sandbox/trunk/s2-jquery-showcase/src/main/webapp/WEB-INF/content/form/FormWithResetGetReqAjaxResp.jsp
Removed:
    struts/sandbox/trunk/s2-jquery-showcase/src/main/java/org/apache/struts2/jquery/actions/MessageAction.java
    struts/sandbox/trunk/s2-jquery-showcase/src/main/resources/org/apache/struts2/jquery/actions/MessageAction-validation.xml
    struts/sandbox/trunk/s2-jquery-showcase/src/main/webapp/WEB-INF/content/form/FormWithResetGetReqAjaxResp-input.jsp
    struts/sandbox/trunk/s2-jquery-showcase/src/main/webapp/WEB-INF/content/form/FormWithResetGetReqAjaxResp.jsp
Modified:
    struts/sandbox/trunk/s2-jquery-showcase/pom.xml
    struts/sandbox/trunk/s2-jquery-showcase/src/main/resources/struts.xml
    struts/sandbox/trunk/s2-jquery-showcase/src/main/webapp/WEB-INF/content/form/SimpleFormPostAjaxResponse-input.jsp
    struts/sandbox/trunk/s2-jquery-showcase/src/main/webapp/WEB-INF/content/index.jsp

Modified: struts/sandbox/trunk/s2-jquery-showcase/pom.xml
URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/s2-jquery-showcase/pom.xml?rev=750191&r1=750190&r2=750191&view=diff
==============================================================================
--- struts/sandbox/trunk/s2-jquery-showcase/pom.xml (original)
+++ struts/sandbox/trunk/s2-jquery-showcase/pom.xml Wed Mar  4 22:08:49 2009
@@ -18,6 +18,11 @@
         </dependency>
         <dependency>
             <groupId>org.apache.struts</groupId>
+            <artifactId>struts2-convention-plugin</artifactId>
+            <version>2.1.6</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.struts</groupId>
             <artifactId>struts2-jquery-plugin</artifactId>
             <version>1.0-SNAPSHOT</version>
         </dependency>
@@ -42,7 +47,7 @@
     </dependencies>
     <build>
         <finalName>s2-jquery-showcase</finalName>
-	<defaultGoal>install</defaultGoal>
+        <defaultGoal>install</defaultGoal>
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>

Copied: struts/sandbox/trunk/s2-jquery-showcase/src/main/java/org/apache/struts2/jquery/actions/form/MessageAction.java
(from r750136, struts/sandbox/trunk/s2-jquery-showcase/src/main/java/org/apache/struts2/jquery/actions/MessageAction.java)
URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/s2-jquery-showcase/src/main/java/org/apache/struts2/jquery/actions/form/MessageAction.java?p2=struts/sandbox/trunk/s2-jquery-showcase/src/main/java/org/apache/struts2/jquery/actions/form/MessageAction.java&p1=struts/sandbox/trunk/s2-jquery-showcase/src/main/java/org/apache/struts2/jquery/actions/MessageAction.java&r1=750136&r2=750191&rev=750191&view=diff
==============================================================================
--- struts/sandbox/trunk/s2-jquery-showcase/src/main/java/org/apache/struts2/jquery/actions/MessageAction.java
(original)
+++ struts/sandbox/trunk/s2-jquery-showcase/src/main/java/org/apache/struts2/jquery/actions/form/MessageAction.java
Wed Mar  4 22:08:49 2009
@@ -1,18 +1,32 @@
-package org.apache.struts2.jquery.actions;
+package org.apache.struts2.jquery.actions.form;
 
 import com.opensymphony.xwork2.ActionSupport;
 import org.apache.struts2.interceptor.validation.SkipValidation;
+import org.apache.struts2.convention.annotation.Actions;
+import org.apache.struts2.convention.annotation.Action;
+import org.apache.struts2.convention.annotation.Namespace;
+import org.apache.struts2.convention.annotation.InterceptorRef;
 
+
+@Namespace("/form")
+@InterceptorRef("jsonValidationWorkflowStack")
 public class MessageAction extends ActionSupport {
 
-    private String msg ;
+    private String msg;
 
-    @Override
+    @Actions({
+            @Action("SimpleFormWithResetGetAjaxResponse"),
+            @Action("SimpleFormGetAjaxResponse"),
+            @Action("SimpleFormGetAjaxResponse"),
+            @Action("SimpleFormPostAjaxResponse"),
+            @Action("SimpleFormGetNonAjaxResponse"),
+            @Action("SimpleFormPostNonAjaxResponse")
+    })
     public String execute() {
         return ActionSupport.SUCCESS;
     }
 
-    @SkipValidation @Override
+    @SkipValidation
     public String input() {
         return ActionSupport.INPUT;
     }
@@ -22,7 +36,7 @@
     }
 
     public String getMsg() {
-        return msg ;
+        return msg;
     }
 
 }

Modified: struts/sandbox/trunk/s2-jquery-showcase/src/main/resources/struts.xml
URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/s2-jquery-showcase/src/main/resources/struts.xml?rev=750191&r1=750190&r2=750191&view=diff
==============================================================================
--- struts/sandbox/trunk/s2-jquery-showcase/src/main/resources/struts.xml (original)
+++ struts/sandbox/trunk/s2-jquery-showcase/src/main/resources/struts.xml Wed Mar  4 22:08:49
2009
@@ -3,34 +3,14 @@
     "http://struts.apache.org/dtds/struts-2.0.dtd">
 
 <struts>
-
     <package name="s2-jquery-showcase" extends="struts-default" namespace="/">
-        <default-interceptor-ref name="jsonValidationWorkflowStack"/>
-
         <action name="showcase">
             <result>/WEB-INF/content/index.jsp</result>
         </action>
-        <action name="SimpleFormPostNonAjaxResponse_*" method="{1}" class="org.apache.struts2.jquery.actions.MessageAction">
-            <result name="input">/WEB-INF/content/form/SimpleFormPostNonAjaxResponse-input.jsp</result>
-            <result>/WEB-INF/content/form/SimpleFormPostNonAjaxResponse.jsp</result>
-        </action>
-        <action name="SimpleFormGetNonAjaxResponse_*" method="{1}" class="org.apache.struts2.jquery.actions.MessageAction">
-            <result name="input">/WEB-INF/content/form/SimpleFormGetNonAjaxResponse-input.jsp</result>
-            <result>/WEB-INF/content/form/SimpleFormGetNonAjaxResponse.jsp</result>
-        </action>
-        <action name="SimpleFormPostAjaxResponse_*" method="{1}" class="org.apache.struts2.jquery.actions.MessageAction">
-            <result name="input">/WEB-INF/content/form/SimpleFormPostAjaxResponse-input.jsp</result>
-            <result>/WEB-INF/content/form/SimpleFormPostAjaxResponse.jsp</result>
-        </action>
-        <action name="SimpleFormGetAjaxResponse_*" method="{1}" class="org.apache.struts2.jquery.actions.MessageAction">
-            <result name="input">/WEB-INF/content/form/SimpleFormGetAjaxResponse-input.jsp</result>
-            <result>/WEB-INF/content/form/SimpleFormGetAjaxResponse.jsp</result>
-        </action>
 
         <action name="FormWithResetGetReqAjaxResp_*" method="{1}" class="org.apache.struts2.jquery.actions.MessageAction">
-            <result name="input">/WEB-INF/content/form/FormWithResetGetReqAjaxResp-input.jsp</result>
-            <result>/WEB-INF/content/form/FormWithResetGetReqAjaxResp.jsp</result>
+            <result name="input">/WEB-INF/content/form/SimpleFormWithResetGetAjaxResp-input.jsp</result>
+            <result>/WEB-INF/content/form/SimpleFormWithResetGetAjaxResponse.jsp</result>
         </action>
     </package>
-
 </struts>
\ No newline at end of file

Modified: struts/sandbox/trunk/s2-jquery-showcase/src/main/webapp/WEB-INF/content/form/SimpleFormPostAjaxResponse-input.jsp
URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/s2-jquery-showcase/src/main/webapp/WEB-INF/content/form/SimpleFormPostAjaxResponse-input.jsp?rev=750191&r1=750190&r2=750191&view=diff
==============================================================================
--- struts/sandbox/trunk/s2-jquery-showcase/src/main/webapp/WEB-INF/content/form/SimpleFormPostAjaxResponse-input.jsp
(original)
+++ struts/sandbox/trunk/s2-jquery-showcase/src/main/webapp/WEB-INF/content/form/SimpleFormPostAjaxResponse-input.jsp
Wed Mar  4 22:08:49 2009
@@ -12,6 +12,7 @@
 </head>
 <body>
 <sjx:form id="indexForm" method="post" validate="true"
+          namespace="/form"
           action="SimpleFormPostAjaxResponse"
           ajaxResult="true" ajaxResultHandler="handleAjaxResponse" >
 <sjx:textfield key="msg" />

Copied: struts/sandbox/trunk/s2-jquery-showcase/src/main/webapp/WEB-INF/content/form/SimpleFormWithResetGetAjaxResp-input.jsp
(from r750186, struts/sandbox/trunk/s2-jquery-showcase/src/main/webapp/WEB-INF/content/form/FormWithResetGetReqAjaxResp-input.jsp)
URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/s2-jquery-showcase/src/main/webapp/WEB-INF/content/form/SimpleFormWithResetGetAjaxResp-input.jsp?p2=struts/sandbox/trunk/s2-jquery-showcase/src/main/webapp/WEB-INF/content/form/SimpleFormWithResetGetAjaxResp-input.jsp&p1=struts/sandbox/trunk/s2-jquery-showcase/src/main/webapp/WEB-INF/content/form/FormWithResetGetReqAjaxResp-input.jsp&r1=750186&r2=750191&rev=750191&view=diff
==============================================================================
--- struts/sandbox/trunk/s2-jquery-showcase/src/main/webapp/WEB-INF/content/form/FormWithResetGetReqAjaxResp-input.jsp
(original)
+++ struts/sandbox/trunk/s2-jquery-showcase/src/main/webapp/WEB-INF/content/form/SimpleFormWithResetGetAjaxResp-input.jsp
Wed Mar  4 22:08:49 2009
@@ -12,6 +12,7 @@
 </head>
 <body>
 <sjx:form id="indexForm" method="get" validate="true"
+          namespace="/form"
           action="SimpleFormPostAjaxResponse"
           ajaxResult="true" ajaxResultHandler="handleAjaxResponse" >
 <sjx:textfield key="msg" />

Modified: struts/sandbox/trunk/s2-jquery-showcase/src/main/webapp/WEB-INF/content/index.jsp
URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/s2-jquery-showcase/src/main/webapp/WEB-INF/content/index.jsp?rev=750191&r1=750190&r2=750191&view=diff
==============================================================================
--- struts/sandbox/trunk/s2-jquery-showcase/src/main/webapp/WEB-INF/content/index.jsp (original)
+++ struts/sandbox/trunk/s2-jquery-showcase/src/main/webapp/WEB-INF/content/index.jsp Wed
Mar  4 22:08:49 2009
@@ -7,19 +7,19 @@
 <body>
    <ul>
        <li>
-           <s:url var="url" namespace="/" action="SimpleFormPostNonAjaxResponse_input"/>
+           <s:url var="url" namespace="/form" action="SimpleFormPostNonAjaxResponse-input"/>
            <s:a href="%{#url}">Simple Form Post No Ajax</s:a>
        </li>
        <li>
-           <s:url var="url" namespace="/" action="SimpleFormGetNonAjaxResponse_input"/>
+           <s:url var="url" namespace="/form" action="SimpleFormGetNonAjaxResponse-input"/>
            <s:a href="%{#url}">Simple Form Get No Ajax</s:a>
        </li>
        <li>
-           <s:url var="url" namespace="/" action="SimpleFormPostAjaxResponse_input"/>
+           <s:url var="url" namespace="/form" action="SimpleFormPostAjaxResponse-input"/>
            <s:a href="%{#url}">Simple Form Post Ajax</s:a>
        </li>
        <li>
-           <s:url var="url" namespace="/" action="SimpleFormGetAjaxResponse_input"/>
+           <s:url var="url" namespace="/form" action="SimpleFormGetAjaxResponse-input"/>
            <s:a href="%{#url}">Simple Form Get Ajax</s:a>
        </li>
    </ul>



Mime
View raw message