You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@empire-db.apache.org by do...@apache.org on 2009/07/18 12:03:08 UTC

svn commit: r795334 - in /incubator/empire-db/trunk: ./ empire-db-examples/empire-db-example-struts2-cxf/src/main/java/org/apache/empire/struts2/websample/web/actions/ empire-db-examples/empire-db-example-struts2-cxf/src/main/resources/ empire-db-examp...

Author: doebele
Date: Sat Jul 18 10:03:08 2009
New Revision: 795334

URL: http://svn.apache.org/viewvc?rev=795334&view=rev
Log:
EMPIREDB-45

Modified:
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/java/org/apache/empire/struts2/websample/web/actions/LoginAction.java
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/resources/struts.xml
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/web/actions/LoginAction.java
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/resources/struts.xml
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/webapp/jsp/employeeDetails.jsp
    incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/action/WebAction.java
    incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/jsp/components/AnchorComponent.java
    incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/jsp/tags/FormSubmitTag.java
    incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/jsp/tags/ItemListTag.java
    incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/jsp/tags/LinkTag.java
    incubator/empire-db/trunk/pom.xml

Modified: incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/java/org/apache/empire/struts2/websample/web/actions/LoginAction.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/java/org/apache/empire/struts2/websample/web/actions/LoginAction.java?rev=795334&r1=795333&r2=795334&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/java/org/apache/empire/struts2/websample/web/actions/LoginAction.java (original)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/java/org/apache/empire/struts2/websample/web/actions/LoginAction.java Sat Jul 18 10:03:08 2009
@@ -145,22 +145,51 @@
      * Implementation of Parameterizable
      */
 
-    private Map<String, Object> actionConfigParams = null;
+    /*
+     * UPGRADE-struts 2.1.6
+     * CHANGE: changed "Map<String, Object>" to "Map<String, String>"
+     * Reason: The interface com.opensymphony.xwork2.config.entities.Parameterizable changed
+     */
+    private Map<String, String> actionConfigParams = null;
 
-    public void addParam(String name, Object value)
+    /*
+     * UPGRADE-struts 2.1.6
+     * CHANGE: changed "String Object" to "String value"
+     * Reason: The interface com.opensymphony.xwork2.config.entities.Parameterizable changed
+     */
+    public void addParam(String name, String value)
     {
         actionConfigParams.put(name, value);
     }
 
-    public Map<String, Object> getParams()
+    /*
+     * UPGRADE-struts 2.1.6
+     * CHANGE: changed "Map<String, Object>" to "Map<String, String>"
+     * Reason: The interface com.opensymphony.xwork2.config.entities.Parameterizable changed
+     */
+    public Map<String, String> getParams()
     {
         return actionConfigParams;
     }
-
-    public void setParams(Map<String, Object> actionConfigParams)
+	
+    /*
+     * UPGRADE-struts 2.1.6
+     * CHANGE: changed "Map<String, Object>" to "Map<String, String>"
+     * Reason: The interface com.opensymphony.xwork2.config.entities.Parameterizable changed
+     */
+    public void setParams(Map<String, String> actionConfigParams)
     {
         this.actionConfigParams = actionConfigParams;
     }
+    
+    /*
+     * UPGRADE-struts 2.1.6
+     * CHANGE: added method "asKey(String key)"
+     * Reason: The interface com.opensymphony.xwork2.config.entities.Parameterizable changed
+     */
+    public boolean hasKey(String key) {
+    	return this.actionConfigParams.containsKey(key);
+    }
 
     public Options getLanguages()
     {

Modified: incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/resources/struts.xml
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/resources/struts.xml?rev=795334&r1=795333&r2=795334&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/resources/struts.xml (original)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2-cxf/src/main/resources/struts.xml Sat Jul 18 10:03:08 2009
@@ -61,7 +61,7 @@
 	    <!-- Static Params Interceptor -->
 		<action name="login" class="org.apache.empire.struts2.websample.web.actions.LoginAction" method="doInit">
 			<result name="input">/jsp/login.jsp</result>
-			<result name="success" type="redirect-action">employeeList!doInit</result>
+			<result name="success" type="redirectAction">employeeList!doInit</result>
 		</action>
 
 		<action name="employeeList" class="org.apache.empire.struts2.websample.web.actions.EmployeeListAction" method="doInit">
@@ -71,7 +71,7 @@
 
 		<action name="employeeDetail" class="org.apache.empire.struts2.websample.web.actions.EmployeeDetailAction" method="doLoad">
 			<result name="input">/jsp/employeeDetails.jsp</result>
-			<result name="return" type="redirect-action">employeeList!doList</result>
+			<result name="return" type="redirectAction">employeeList!doList</result>
 		</action>
 
 	</package>

Modified: incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/web/actions/LoginAction.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/web/actions/LoginAction.java?rev=795334&r1=795333&r2=795334&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/web/actions/LoginAction.java (original)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/web/actions/LoginAction.java Sat Jul 18 10:03:08 2009
@@ -121,9 +121,19 @@
      * Implementation of Parameterizable
      */
      
-    private Map<String, Object> actionConfigParams = null;
+     /*
+      * UPGRADE-struts 2.1.6
+      * CHANGE: changed "Map<String, Object>" to "Map<String, String>"
+      * Reason: The interface com.opensymphony.xwork2.config.entities.Parameterizable changed
+      */
+    private Map<String, String> actionConfigParams = null;
     
-    public void addParam(String name, Object value)
+    /*
+     * UPGRADE-struts 2.1.6
+     * CHANGE: changed "String Object" to "String value"
+     * Reason: The interface com.opensymphony.xwork2.config.entities.Parameterizable changed
+     */
+    public void addParam(String name, String value)
     {
         actionConfigParams.put(name, value);
     }
@@ -133,7 +143,12 @@
         return actionConfigParams;
     }
 
-    public void setParams(Map<String, Object> actionConfigParams)
+    /*
+     * UPGRADE-struts 2.1.6
+     * CHANGE: changed "Map<String, Object>" to "Map<String, String>"
+     * Reason: The interface com.opensymphony.xwork2.config.entities.Parameterizable changed
+     */
+    public void setParams(Map<String, String> actionConfigParams)
     {
         this.actionConfigParams = actionConfigParams; 
     }

Modified: incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/resources/struts.xml
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/resources/struts.xml?rev=795334&r1=795333&r2=795334&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/resources/struts.xml (original)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/resources/struts.xml Sat Jul 18 10:03:08 2009
@@ -61,9 +61,14 @@
 	    <!-- Static Params Interceptor -->
 		<action name="login" class="org.apache.empire.struts2.websample.web.actions.LoginAction" method="doInit">
 			<result name="input">/jsp/login.jsp</result>
-			<result name="success" type="redirect-action">employeeList!doInit</result>
+			<!--
+				* UPGRADE-struts 2.1.6
+				* CHANGE: changed "redirect-action" to "redirectAction"
+     			* Reason: The types are now written in "camelCase"
+			-->
+			<result name="success" type="redirectAction">employeeList!doInit</result>
 		</action>
-
+		
 		<action name="employeeList" class="org.apache.empire.struts2.websample.web.actions.EmployeeListAction" method="doInit">
 			<result name="search">/jsp/employeeSearch.jsp</result>
 			<result name="list">/jsp/employeeList.jsp</result>
@@ -71,7 +76,12 @@
 
 		<action name="employeeDetail" class="org.apache.empire.struts2.websample.web.actions.EmployeeDetailAction" method="doLoad">
 			<result name="input">/jsp/employeeDetails.jsp</result>
-			<result name="return" type="redirect-action">employeeList!doList</result>
+			<!--
+				* UPGRADE-struts 2.1.6
+				* CHANGE: changed "redirect-action" to "redirectAction"
+     			* Reason: The types are now written in "camelCase"
+			-->
+			<result name="return" type="redirectAction">employeeList!doList</result>
 		</action>
 
 	</package>

Modified: incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/webapp/jsp/employeeDetails.jsp
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/webapp/jsp/employeeDetails.jsp?rev=795334&r1=795333&r2=795334&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/webapp/jsp/employeeDetails.jsp (original)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/webapp/jsp/employeeDetails.jsp Sat Jul 18 10:03:08 2009
@@ -60,9 +60,15 @@
     <e:control column="<%= EMP.C_RETIRED %>" />
 	<e:control column="<%= EMP.C_UPDATE_TIMESTAMP %>" />
 
+	
 	<%-- 
     <s:submit value="%{getText('button.label.submit')}"/>
-    <s:submit value="%{getText('button.label.cancel')}" name="redirect-action:employeeDetail!doCancel"/>
+    <!--
+		* UPGRADE-struts 2.1.6
+		* CHANGE: changed "redirect-action" to "redirectAction"
+   		* Reason: The types are now written in "camelCase"
+	-->
+    <s:submit value="%{getText('button.label.cancel')}" name="redirectAction:employeeDetail!doCancel"/>
     --%>
 	
 	<tr style="padding-top:20px">

Modified: incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/action/WebAction.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/action/WebAction.java?rev=795334&r1=795333&r2=795334&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/action/WebAction.java (original)
+++ incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/action/WebAction.java Sat Jul 18 10:03:08 2009
@@ -316,6 +316,15 @@
 
     // ------- Text Provider -------
     
+    /*
+     * UPGRADE-struts 2.1.6
+     * CHANGE: added method "hasKey(String key)"
+     * Reason: The interface com.opensymphony.xwork2.config.entities.Parameterizable changed
+     */
+    public boolean hasKey(String key) {
+    	return textProvider.hasKey(key);
+    }
+    
     public String getText(String aTextName) {
         return textProvider.getText(aTextName);
     }

Modified: incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/jsp/components/AnchorComponent.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/jsp/components/AnchorComponent.java?rev=795334&r1=795333&r2=795334&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/jsp/components/AnchorComponent.java (original)
+++ incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/jsp/components/AnchorComponent.java Sat Jul 18 10:03:08 2009
@@ -40,6 +40,12 @@
     
     private String  action;
     private String  text;
+    /*
+     * EMPIREDB-45 
+     * CHANGE: attribute "target" added
+     * Reason: the Attribute no longer exists in org.apache.struts2.components.Anchor 
+     */
+    private String  target;
     private boolean disabled = false;
     private String  disabledTag = null;
 
@@ -98,7 +104,7 @@
                 HtmlTag a = htmlWriter.startTag("a");
                 a.addAttribute("id",       this.getId());
                 a.addAttribute("href",     url);
-                a.addAttribute("target",   this.targets);
+				a.addAttribute("target",   this.target);
                 a.addAttribute("class",    this.cssClass);
                 a.addAttribute("style",    this.cssStyle);
                 a.addAttribute("onclick",  this.onclick);
@@ -150,4 +156,14 @@
     {
         this.disabledTag = disabledTag;
     }
+
+    public String getTarget()
+    {
+        return target;
+    }
+
+    public void setTarget(String target)
+    {
+        this.target = target;
+    }
 }

Modified: incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/jsp/tags/FormSubmitTag.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/jsp/tags/FormSubmitTag.java?rev=795334&r1=795333&r2=795334&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/jsp/tags/FormSubmitTag.java (original)
+++ incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/jsp/tags/FormSubmitTag.java Sat Jul 18 10:03:08 2009
@@ -160,8 +160,14 @@
         {
             return null;
         }
+		
         // Set Name from method
-        String call = (getBoolean(redirect, false) ? "redirect-action:" : "action:");
+        /*
+         * UPGRADE-struts 2.1.6
+         * CHANGE: changed "redirect-action" to "redirectAction"
+         * Reason: The types are now written in "camelCase"
+         */
+        String call = (getBoolean(redirect, false) ? "redirectAction:" : "action:");
         return call + checkAction(action);
     }
     

Modified: incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/jsp/tags/ItemListTag.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/jsp/tags/ItemListTag.java?rev=795334&r1=795333&r2=795334&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/jsp/tags/ItemListTag.java (original)
+++ incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/jsp/tags/ItemListTag.java Sat Jul 18 10:03:08 2009
@@ -127,7 +127,12 @@
                 if (currentValue!=null)
                 {
                     stack.push(currentValue);
-                    String id = getId();
+				    /*
+				     * UPGRADE-struts 2.1.6
+				     * CHANGE: changed "getId()" to "getVar()"
+				     * Reason: The Funktion no longer exists.
+				     */
+                    String id = getVar();
 
                     if ((id != null))
                     {

Modified: incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/jsp/tags/LinkTag.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/jsp/tags/LinkTag.java?rev=795334&r1=795333&r2=795334&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/jsp/tags/LinkTag.java (original)
+++ incubator/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/jsp/tags/LinkTag.java Sat Jul 18 10:03:08 2009
@@ -94,7 +94,7 @@
         anchor.setAction(action);
         anchor.setText(getString(text));
         anchor.setDisabled(getBoolean(disabled, false));
-        anchor.setTargets(target);
+        anchor.setTarget(target);
         anchor.setOnclick(onclick);
     }
 

Modified: incubator/empire-db/trunk/pom.xml
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/pom.xml?rev=795334&r1=795333&r2=795334&view=diff
==============================================================================
--- incubator/empire-db/trunk/pom.xml (original)
+++ incubator/empire-db/trunk/pom.xml Sat Jul 18 10:03:08 2009
@@ -175,7 +175,7 @@
 			<dependency>
 			    <groupId>org.apache.struts</groupId>
 			    <artifactId>struts2-core</artifactId>
-			    <version>2.0.11</version>
+			    <version>2.1.6</version>
 			</dependency> 
 			<dependency>
 			    <groupId>javax.servlet</groupId>