[CONF] Confluence Changes in the last 24 hours

2007-04-19 Thread confluence
-
This is a daily summary of all recent changes in Confluence.

-
Updated Spaces:
-

Apache Camel (CAMEL) http://cwiki.apache.org/confluence/display/CAMEL
|
|-Pages Added or Edited in This Space
 |-- Idempotent Consumer was created by jstrachan (09:09 AM).
 |   http://cwiki.apache.org/confluence/display/CAMEL/Idempotent+Consumer
 |-- QuickLinks was last edited by jstrachan (09:04 AM).
 |   http://cwiki.apache.org/confluence/display/CAMEL/QuickLinks
 |-- Support was created by jstrachan (09:02 AM).
 |   http://cwiki.apache.org/confluence/display/CAMEL/Support
 |-- Enterprise Integration Patterns was last edited by jstrachan (08:48 AM).
 |   
http://cwiki.apache.org/confluence/display/CAMEL/Enterprise+Integration+Patterns
 |-- What is Camel was last edited by jstrachan (02:21 AM).
 |   http://cwiki.apache.org/confluence/display/CAMEL/What+is+Camel

Apache ActiveMQ (ACTIVEMQ) http://cwiki.apache.org/confluence/display/ACTIVEMQ
|
|-Pages Added or Edited in This Space
 |-- How can I send a message to multiple Destinations using a MessageProducer 
was created by jstrachan (12:39 PM).
 |   
http://cwiki.apache.org/confluence/display/ACTIVEMQ/2007/04/18/How+can+I+send+a+message+to+multiple+Destinations+using+a+MessageProducer
 |-- ActiveMQ C++ Clients was last edited by nmittler (12:17 PM).
 |   http://cwiki.apache.org/confluence/pages/viewpage.action?pageId=36191

Apache Struts 2 Plugin Registry (S2PLUGINS) 
http://cwiki.apache.org/confluence/display/S2PLUGINS
|
|-Pages Added or Edited in This Space
 |-- JSON Plugin was last edited by musachy (11:01 AM).
 |   http://cwiki.apache.org/confluence/display/S2PLUGINS/JSON+Plugin

Apache ActiveMQ CPP (AMQCPP) http://cwiki.apache.org/confluence/display/AMQCPP
|
|-Pages Added or Edited in This Space
 |-- Download was last edited by nmittler (04:46 PM).
 |   http://cwiki.apache.org/confluence/display/AMQCPP/Download
 |-- ActiveMQ-CPP 2.0 Release was created by nmittler (03:06 PM).
 |   http://cwiki.apache.org/confluence/display/AMQCPP/ActiveMQ-CPP+2.0+Release
 |-- ActiveMQ-CPP 1.1 Release was created by nmittler (03:05 PM).
 |   http://cwiki.apache.org/confluence/display/AMQCPP/ActiveMQ-CPP+1.1+Release
 |-- ActiveMQ-CPP 1.0 Release was created by nmittler (03:04 PM).
 |   http://cwiki.apache.org/confluence/display/AMQCPP/ActiveMQ-CPP+1.0+Release
 |-- OpenWire Support was created by nmittler (10:23 AM).
 |   http://cwiki.apache.org/confluence/display/AMQCPP/OpenWire+Support
 |-- Index was last edited by nmittler (11:39 AM).
 |   http://cwiki.apache.org/confluence/display/AMQCPP/Index
 |-- Configuring was created by nmittler (08:28 AM).
 |   http://cwiki.apache.org/confluence/display/AMQCPP/Configuring
 |-- Using ActiveMQ-CPP was created by nmittler (10:34 AM).
 |   http://cwiki.apache.org/confluence/display/AMQCPP/Using+ActiveMQ-CPP
 |-- Stomp Support was created by nmittler (10:26 AM).
 |   http://cwiki.apache.org/confluence/display/AMQCPP/Stomp+Support
 |-- Navigation was last edited by nmittler (10:31 AM).
 |   http://cwiki.apache.org/confluence/display/AMQCPP/Navigation
 |-- Connectivity was created by nmittler (10:29 AM).
 |   http://cwiki.apache.org/confluence/display/AMQCPP/Connectivity
 |-- ActiveMQ-CPP Stomp was created by nmittler (08:33 AM).
 |   http://cwiki.apache.org/confluence/display/AMQCPP/ActiveMQ-CPP+Stomp
 |-- News was created by nmittler (08:51 AM).
 |   http://cwiki.apache.org/confluence/display/AMQCPP/News
 |-- ActiveMQ-CPP 1.1 Released was created by nmittler (08:18 AM).
 |   
http://cwiki.apache.org/confluence/display/AMQCPP/2007/04/18/ActiveMQ-CPP+1.1+Released
 |-- ActiveMQ-CPP 2.0 RC1 Now Available! was created by nmittler (08:16 AM).
 |   
http://cwiki.apache.org/confluence/display/AMQCPP/2007/04/18/ActiveMQ-CPP+2.0+RC1+Now+Available%21
 |-- Overview was last edited by nmittler (06:22 AM).
 |   http://cwiki.apache.org/confluence/display/AMQCPP/Overview
 |-- Example was created by nmittler (06:17 AM).
 |   http://cwiki.apache.org/confluence/display/AMQCPP/Example
 |-- Building was last edited by nmittler (06:16 AM).
 |   http://cwiki.apache.org/confluence/display/AMQCPP/Building

Apache Directory SandBox (DIRxSBOX) 
http://cwiki.apache.org/confluence/display/DIRxSBOX
|
|-Pages Added or Edited in This Space
 |-- Add your first elements to the schema was last edited by szoerner (02:17 
PM).
 |   
http://cwiki.apache.org/confluence/display/DIRxSBOX/Add+your+first+elements+to+the+schema

Apache ServiceMix (SM) http://cwiki.apache.org/confluence/display/SM
|
|-Pages Added or Edited in This Space
 |-- Team was last edited by gnodet (02:00 AM).
 |   http://cwiki.apache.org/confluence/display/SM/Team

Apache Struts 2 Documentation (WW) http://cwiki.apache.org/confluence/display/WW
|
|-Pages Added or Edited in This Space
 |-- Spring Plugin was last edited 

svn commit: r530357 - in /struts/struts2/branches/STRUTS_2_0_X: assembly/pom.xml core/pom.xml core/src/site/resources/tags/autocompleter.html pom.xml

2007-04-19 Thread hermanns
Author: hermanns
Date: Thu Apr 19 03:06:32 2007
New Revision: 530357

URL: http://svn.apache.org/viewvc?view=rev&rev=530357
Log:
Updated xwork dependency to release 2.0.2

Modified:
struts/struts2/branches/STRUTS_2_0_X/assembly/pom.xml
struts/struts2/branches/STRUTS_2_0_X/core/pom.xml

struts/struts2/branches/STRUTS_2_0_X/core/src/site/resources/tags/autocompleter.html
struts/struts2/branches/STRUTS_2_0_X/pom.xml

Modified: struts/struts2/branches/STRUTS_2_0_X/assembly/pom.xml
URL: 
http://svn.apache.org/viewvc/struts/struts2/branches/STRUTS_2_0_X/assembly/pom.xml?view=diff&rev=530357&r1=530356&r2=530357
==
--- struts/struts2/branches/STRUTS_2_0_X/assembly/pom.xml (original)
+++ struts/struts2/branches/STRUTS_2_0_X/assembly/pom.xml Thu Apr 19 03:06:32 
2007
@@ -103,7 +103,7 @@
 opensymphony
 xwork
 javadoc
-2.0.2-SNAPSHOT
+2.0.2
 
 
 
${project.build.directory}/xwork-apidocs

Modified: struts/struts2/branches/STRUTS_2_0_X/core/pom.xml
URL: 
http://svn.apache.org/viewvc/struts/struts2/branches/STRUTS_2_0_X/core/pom.xml?view=diff&rev=530357&r1=530356&r2=530357
==
--- struts/struts2/branches/STRUTS_2_0_X/core/pom.xml (original)
+++ struts/struts2/branches/STRUTS_2_0_X/core/pom.xml Thu Apr 19 03:06:32 2007
@@ -35,7 +35,7 @@
 
 opensymphony
 xwork
-2.0.2-SNAPSHOT
+2.0.2
 sources
 
 
@@ -252,7 +252,7 @@
 
 opensymphony
 xwork
-2.0.2-SNAPSHOT
+2.0.2
 
 
 

Modified: 
struts/struts2/branches/STRUTS_2_0_X/core/src/site/resources/tags/autocompleter.html
URL: 
http://svn.apache.org/viewvc/struts/struts2/branches/STRUTS_2_0_X/core/src/site/resources/tags/autocompleter.html?view=diff&rev=530357&r1=530356&r2=530357
==
--- 
struts/struts2/branches/STRUTS_2_0_X/core/src/site/resources/tags/autocompleter.html
 (original)
+++ 
struts/struts2/branches/STRUTS_2_0_X/core/src/site/resources/tags/autocompleter.html
 Thu Apr 19 03:06:32 2007
@@ -428,12 +428,12 @@
Define 
required position of required form element (left|right)


-   searchLimit
+   resultsLimit
false
30
true
String
-   Limit the 
size of text to be matched agains the avilable options for autocompletion
+   Limit how 
many results are shown as autocompletion options


searchType

Modified: struts/struts2/branches/STRUTS_2_0_X/pom.xml
URL: 
http://svn.apache.org/viewvc/struts/struts2/branches/STRUTS_2_0_X/pom.xml?view=diff&rev=530357&r1=530356&r2=530357
==
--- struts/struts2/branches/STRUTS_2_0_X/pom.xml (original)
+++ struts/struts2/branches/STRUTS_2_0_X/pom.xml Thu Apr 19 03:06:32 2007
@@ -222,10 +222,6 @@
 xwork
 file://$xwork$/src/java
 
-
-xwork-tiger
-
file://$xwork$/tiger/src/java
-
 
 -->
 




svn commit: r530439 - /struts/struts2/branches/STRUTS_2_0_X/core/src/main/java/org/apache/struts2/dispatcher/FilterDispatcher.java

2007-04-19 Thread hermanns
Author: hermanns
Date: Thu Apr 19 08:00:20 2007
New Revision: 530439

URL: http://svn.apache.org/viewvc?view=rev&rev=530439
Log:
FilterDispatcher not always calling ActionContextCleanUp.cleanUp(Request)
o applied patch submitted by Jasper Rosenberg

Issue Number: WW-1816

Modified:

struts/struts2/branches/STRUTS_2_0_X/core/src/main/java/org/apache/struts2/dispatcher/FilterDispatcher.java

Modified: 
struts/struts2/branches/STRUTS_2_0_X/core/src/main/java/org/apache/struts2/dispatcher/FilterDispatcher.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/branches/STRUTS_2_0_X/core/src/main/java/org/apache/struts2/dispatcher/FilterDispatcher.java?view=diff&rev=530439&r1=530438&r2=530439
==
--- 
struts/struts2/branches/STRUTS_2_0_X/core/src/main/java/org/apache/struts2/dispatcher/FilterDispatcher.java
 (original)
+++ 
struts/struts2/branches/STRUTS_2_0_X/core/src/main/java/org/apache/struts2/dispatcher/FilterDispatcher.java
 Thu Apr 19 08:00:20 2007
@@ -379,7 +379,7 @@
  */
 public void doFilter(ServletRequest req, ServletResponse res, FilterChain 
chain) throws IOException, ServletException {
 
-   
+
 HttpServletRequest request = (HttpServletRequest) req;
 HttpServletResponse response = (HttpServletResponse) res;
 ServletContext servletContext = getServletContext();
@@ -394,7 +394,6 @@
 } catch (Exception ex) {
 LOG.error("error getting ActionMapping", ex);
 dispatcher.sendError(request, response, servletContext, 
HttpServletResponse.SC_INTERNAL_SERVER_ERROR, ex);
-ActionContextCleanUp.cleanUp(req);
 return;
 }
 
@@ -417,14 +416,14 @@
 return;
 }
 
+dispatcher.serviceAction(request, response, servletContext, 
mapping);
+
+} finally {
 try {
-dispatcher.serviceAction(request, response, servletContext, 
mapping);
-} finally {
 ActionContextCleanUp.cleanUp(req);
+} finally {
+UtilTimerStack.pop(timerKey);
 }
-}
-finally {
-UtilTimerStack.pop(timerKey);
 }
 }
 




svn commit: r530440 - /struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/FilterDispatcher.java

2007-04-19 Thread hermanns
Author: hermanns
Date: Thu Apr 19 08:02:43 2007
New Revision: 530440

URL: http://svn.apache.org/viewvc?view=rev&rev=530440
Log:
FilterDispatcher not always calling ActionContextCleanUp.cleanUp(Request)
o applied patch submitted by Jasper Rosenberg

Issue Number: WW-1816

Modified:

struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/FilterDispatcher.java

Modified: 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/FilterDispatcher.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/FilterDispatcher.java?view=diff&rev=530440&r1=530439&r2=530440
==
--- 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/FilterDispatcher.java
 (original)
+++ 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/FilterDispatcher.java
 Thu Apr 19 08:02:43 2007
@@ -379,7 +379,6 @@
  */
 public void doFilter(ServletRequest req, ServletResponse res, FilterChain 
chain) throws IOException, ServletException {
 
-
 HttpServletRequest request = (HttpServletRequest) req;
 HttpServletResponse response = (HttpServletResponse) res;
 ServletContext servletContext = getServletContext();
@@ -394,7 +393,6 @@
 } catch (Exception ex) {
 LOG.error("error getting ActionMapping", ex);
 dispatcher.sendError(request, response, servletContext, 
HttpServletResponse.SC_INTERNAL_SERVER_ERROR, ex);
-ActionContextCleanUp.cleanUp(req);
 return;
 }
 
@@ -417,14 +415,14 @@
 return;
 }
 
+dispatcher.serviceAction(request, response, servletContext, 
mapping);
+
+} finally {
 try {
-dispatcher.serviceAction(request, response, servletContext, 
mapping);
-} finally {
 ActionContextCleanUp.cleanUp(req);
+} finally {
+UtilTimerStack.pop(timerKey);
 }
-}
-finally {
-UtilTimerStack.pop(timerKey);
 }
 }
 




svn commit: r530595 - in /struts/struts2/trunk/plugins/dojo/src: main/java/org/apache/struts2/dojo/components/ main/java/org/apache/struts2/dojo/views/jsp/ui/ main/resources/org/apache/struts2/static/

2007-04-19 Thread musachy
Author: musachy
Date: Thu Apr 19 17:47:12 2007
New Revision: 530595

URL: http://svn.apache.org/viewvc?view=rev&rev=530595
Log:
WW-1867 onchange is not getting called when value changes in datetimepicker

Modified:

struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/DateTimePicker.java

struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/DateTimePickerTag.java

struts/struts2/trunk/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsDatePicker.js

struts/struts2/trunk/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsTimePicker.js

struts/struts2/trunk/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts_dojo.js

struts/struts2/trunk/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts_dojo.js.uncompressed.js

struts/struts2/trunk/plugins/dojo/src/main/resources/template/ajax/datetimepicker.ftl

struts/struts2/trunk/plugins/dojo/src/test/java/org/apache/struts2/dojo/views/jsp/ui/DateTimePickerTagTest.java

struts/struts2/trunk/plugins/dojo/src/test/resources/org/apache/struts2/dojo/views/jsp/ui/DateTimePickerTagTest-1.txt

Modified: 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/DateTimePicker.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/DateTimePicker.java?view=diff&rev=530595&r1=530594&r2=530595
==
--- 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/DateTimePicker.java
 (original)
+++ 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/DateTimePicker.java
 Thu Apr 19 17:47:12 2007
@@ -20,9 +20,12 @@
  */
 package org.apache.struts2.dojo.components;
 
+import java.text.DateFormat;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
+import java.util.ArrayList;
 import java.util.Date;
+import java.util.List;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
@@ -151,6 +154,7 @@
 protected String dayWidth;
 protected String language;
 protected String templateCssPath;
+protected String valueNotifyTopics;
 
 public DateTimePicker(ValueStack stack, HttpServletRequest request, 
HttpServletResponse response) {
 super(stack, request, response);
@@ -198,6 +202,8 @@
 addParameter("type", "date");
 if(templateCssPath != null)
 addParameter("templateCssPath", findString(templateCssPath));
+if(valueNotifyTopics != null)
+addParameter("valueNotifyTopics", findString(valueNotifyTopics));
 
 // format the value to RFC 3399
 if(parameters.containsKey("value")) {
@@ -307,6 +313,11 @@
 super.setValue(arg0);
 }
 
+@StrutsTagAttribute(description="Comma delimmited list of topics that will 
published when a value is selected")
+public void setValueNotifyTopics(String valueNotifyTopics) {
+this.valueNotifyTopics = valueNotifyTopics;
+}
+
 private String format(Object obj) {
 if(obj == null)
 return null;
@@ -319,21 +330,36 @@
 if(dateStr.equalsIgnoreCase("today"))
 return RFC3339_FORMAT.format(new Date());
 
-try {
-Date date = null;
-if(this.displayFormat != null) {
-SimpleDateFormat format = new SimpleDateFormat(
-(String) getParameters().get("displayFormat"));
+
+Date date = null;
+//formats used to parse the date
+List formats = new ArrayList();
+if (this.displayFormat != null) {
+SimpleDateFormat displayFormat = new SimpleDateFormat(
+(String) getParameters().get("displayFormat"));
+formats.add(displayFormat);
+}
+formats.add(RFC3339_FORMAT);
+formats.add(SimpleDateFormat.getTimeInstance(DateFormat.SHORT));
+formats.add(SimpleDateFormat.getDateInstance(DateFormat.SHORT));
+formats.add(SimpleDateFormat.getDateInstance(DateFormat.MEDIUM));
+formats.add(SimpleDateFormat.getDateInstance(DateFormat.FULL));
+formats.add(SimpleDateFormat.getDateInstance(DateFormat.LONG));
+
+for (DateFormat format : formats) {
+try {
 date = format.parse(dateStr);
-return RFC3339_FORMAT.format(date);
-} else {
-// last resource to assume already in correct/default 
format
-return dateStr;
+if (date != null)
+return RFC3339_FORMAT.format(date);
+} catch (Exception

svn commit: r530613 - in /struts/struts2/trunk/plugins/dojo/src: main/java/org/apache/struts2/dojo/components/ test/java/org/apache/struts2/dojo/views/jsp/ui/ test/resources/org/apache/struts2/dojo/vi

2007-04-19 Thread musachy
Author: musachy
Date: Thu Apr 19 19:29:31 2007
New Revision: 530613

URL: http://svn.apache.org/viewvc?view=rev&rev=530613
Log:
Add testcases and improve javadoc for DateTimePicker

Modified:

struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/DateTimePicker.java

struts/struts2/trunk/plugins/dojo/src/test/java/org/apache/struts2/dojo/views/jsp/ui/DateTimePickerTagTest.java

struts/struts2/trunk/plugins/dojo/src/test/resources/org/apache/struts2/dojo/views/jsp/ui/DateTimePickerTagTest-1.txt

Modified: 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/DateTimePicker.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/DateTimePicker.java?view=diff&rev=530613&r1=530612&r2=530613
==
--- 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/DateTimePicker.java
 (original)
+++ 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/DateTimePicker.java
 Thu Apr 19 19:29:31 2007
@@ -21,7 +21,6 @@
 package org.apache.struts2.dojo.components;
 
 import java.text.DateFormat;
-import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Date;
@@ -92,13 +91,23 @@
  * 
  * 
  * 
- * The value sent to the server is
- * typically a locale-independent value in a hidden field as defined by the 
name
- * attribute. RFC3339 representation is the format used.
+ * The value sent to the server is a locale-independent value, in a hidden 
field as defined 
+ * by the name attribute. The value will be formatted conforming to RFC3 339 
+ * (-MM-dd'T'HH:mm:ss)
  * 
- *
- * 
- *
+ * 
+ * The following formats(in order) will be used to parse the values of the 
attributes 'value', 
+ * 'startDate' and 'endDate':
+ * 
+ * 
+ *   RFC 3339
+ *   SimpleDateFormat.getTimeInstance(DateFormat.SHORT
+ *   SimpleDateFormat.getDateInstance(DateFormat.SHORT
+ *   SimpleDateFormat.getDateInstance(DateFormat.MEDIUM
+ *   SimpleDateFormat.getDateInstance(DateFormat.FULL
+ *   SimpleDateFormat.getDateInstance(DateFormat.LONG
+ *   'displayFormat' attribute value
+ * 
  * 
  *
  * Examples
@@ -109,26 +118,13 @@
  * Example 1:
  * 
  * Example 2:
- * 
- *
+ * 
+ * Example 3:
+ *  
  * 
  * 
  * 
  *
- * 
- *
- * The css could be changed by using the following :-
- *
- * 
- *
- * 
- * 
- *
- * 
- *
- * 
- * 
- *
  */
 @StrutsTag(name="datetimepicker", 
tldTagClass="org.apache.struts2.dojo.views.jsp.ui.DateTimePickerTag", 
description="Render datetimepicker")
 public class DateTimePicker extends UIBean {
@@ -172,9 +168,9 @@
 if(adjustWeeks != null)
 addParameter("adjustWeeks", findValue(adjustWeeks, Boolean.class));
 if(startDate != null)
-addParameter("startDate", findString(startDate));
+addParameter("startDate", format(findString(startDate)));
 if(endDate != null)
-addParameter("endDate", findString(endDate));
+addParameter("endDate", format(findString(endDate)));
 if(weekStartsOn != null)
 addParameter("weekStartsOn", findString(weekStartsOn));
 if(staticDisplay != null)
@@ -334,17 +330,17 @@
 Date date = null;
 //formats used to parse the date
 List formats = new ArrayList();
-if (this.displayFormat != null) {
-SimpleDateFormat displayFormat = new SimpleDateFormat(
-(String) getParameters().get("displayFormat"));
-formats.add(displayFormat);
-}
 formats.add(RFC3339_FORMAT);
 formats.add(SimpleDateFormat.getTimeInstance(DateFormat.SHORT));
 formats.add(SimpleDateFormat.getDateInstance(DateFormat.SHORT));
 formats.add(SimpleDateFormat.getDateInstance(DateFormat.MEDIUM));
 formats.add(SimpleDateFormat.getDateInstance(DateFormat.FULL));
 formats.add(SimpleDateFormat.getDateInstance(DateFormat.LONG));
+if (this.displayFormat != null) {
+SimpleDateFormat displayFormat = new SimpleDateFormat(
+(String) getParameters().get("displayFormat"));
+formats.add(displayFormat);
+}
 
 for (DateFormat format : formats) {
 try {

Modified: 
struts/struts2/trunk/plugins/dojo/src/test/java/org/apache/struts2/dojo/views/jsp/

svn commit: r530654 - in /struts/struts2/trunk/core/src: main/java/org/apache/struts2/dispatcher/mapper/Restful2ActionMapper.java test/java/org/apache/struts2/dispatcher/mapper/Restful2ActionMapperTes

2007-04-19 Thread mrdon
Author: mrdon
Date: Thu Apr 19 22:25:44 2007
New Revision: 530654

URL: http://svn.apache.org/viewvc?view=rev&rev=530654
Log:
Improve documentation, add more tests, fix put accepting creations
WW-1475

Modified:

struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/Restful2ActionMapper.java

struts/struts2/trunk/core/src/test/java/org/apache/struts2/dispatcher/mapper/Restful2ActionMapperTest.java

Modified: 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/Restful2ActionMapper.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/Restful2ActionMapper.java?view=diff&rev=530654&r1=530653&r2=530654
==
--- 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/Restful2ActionMapper.java
 (original)
+++ 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/Restful2ActionMapper.java
 Thu Apr 19 22:25:44 2007
@@ -58,14 +58,14 @@
  * 
  * The following URL's will invoke its methods:
  * 
- * 
- *  GET:/movie   => method="index"
+ *  
+ *  GET:/movie=> method="index"
  *  GET:/movie/Thrillers  => method="view", 
id="Thrillers"
  *  GET:/movie/Thrillers!edit => method="edit", 
id="Thrillers"
- *  GET:/movie/new   => method="editNew"
- *  POST:   /movie/Thrillers  => method="create"
- *  PUT:/movie/Thrillers  => method="update", 
id="Thrillers""
- *  DELETE: /movie/Thrillers  => method="remove"
+ *  GET:/movie/new=> method="editNew"
+ *  POST:   /movie/   => method="create"
+ *  PUT:/movie/Thrillers  => method="update", 
id="Thrillers"
+ *  DELETE: /movie/Thrillers  => method="remove", 
id="Thrillers"
  * 
  * 
  * To simulate the HTTP methods PUT and DELETE, since they aren't supported by 
HTML,
@@ -83,7 +83,7 @@
 public class Restful2ActionMapper extends DefaultActionMapper {
 
 protected static final Log LOG = 
LogFactory.getLog(Restful2ActionMapper.class);
-private static final String HTTP_METHOD_PARAM = "__http_method";
+public static final String HTTP_METHOD_PARAM = "__http_method";
 
 /*
 * (non-Javadoc)
@@ -116,10 +116,6 @@
 // Creating a new entry on POST e.g. foo/
 } else if (isPost(request)) {
 mapping.setMethod("create");
-
-// Updating an item e.g. foo/1
-}  else if (isPut(request)) {
-mapping.setMethod("update");
 }
 
 } else if (lastSlashPos > -1) {
@@ -136,6 +132,10 @@
 // Removing an item e.g. foo/1
 } else if (isDelete(request)) {
 mapping.setMethod("remove");
+
+// Updating an item e.g. foo/1
+}  else if (isPut(request)) {
+mapping.setMethod("update");
 }
 }
 }

Modified: 
struts/struts2/trunk/core/src/test/java/org/apache/struts2/dispatcher/mapper/Restful2ActionMapperTest.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/java/org/apache/struts2/dispatcher/mapper/Restful2ActionMapperTest.java?view=diff&rev=530654&r1=530653&r2=530654
==
--- 
struts/struts2/trunk/core/src/test/java/org/apache/struts2/dispatcher/mapper/Restful2ActionMapperTest.java
 (original)
+++ 
struts/struts2/trunk/core/src/test/java/org/apache/struts2/dispatcher/mapper/Restful2ActionMapperTest.java
 Thu Apr 19 22:25:44 2007
@@ -88,18 +88,94 @@
 assertEquals("1", mapping.getParams().get("bar"));
 }
 
-public void testPutCreate() throws Exception {
+public void testPostCreate() throws Exception {
 req.setupGetRequestURI("/my/namespace/bar/1/foo/");
 req.setupGetServletPath("/my/namespace/bar/1/foo/");
 req.setupGetAttribute(null);
 req.addExpectedGetAttributeName("javax.servlet.include.servlet_path");
-req.setupGetMethod("PUT");
+req.setupGetMethod("POST");
 
 ActionMapping mapping = mapper.getMapping(req, configManager);
 
 assertEquals("/my/namespace", mapping.getNamespace());
 assertEquals("foo/", mapping.getName());
+assertEquals("create", mapping.getMethod());
+assertEquals(1, mapping.getParams().size());
+assertEquals("1", mapping.getParams().get("bar"));
+}
+ 
+public void testPutUpdate() throws Exception {
+
+mapper.setSlashesInActionNames("true");
+req.setupGetRequestURI("/my/namespace/bar/1/foo/2");
+req.setupGetServletPath("/my/namespace/bar/1/foo/2");
+req.setupGetAttribute(null);
+req.addExpectedGetAt