svn commit: r1207014 - /struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/TabbedPanel.java

2011-11-28 Thread lukaszlenart
Author: lukaszlenart
Date: Mon Nov 28 08:21:52 2011
New Revision: 1207014

URL: http://svn.apache.org/viewvc?rev=1207014&view=rev
Log:
WW-3611 - solves wrong prefix used in examples

Modified:

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

Modified: 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/TabbedPanel.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/TabbedPanel.java?rev=1207014&r1=1207013&r2=1207014&view=diff
==
--- 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/TabbedPanel.java
 (original)
+++ 
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/TabbedPanel.java
 Mon Nov 28 08:21:52 2011
@@ -21,17 +21,15 @@
 
 package org.apache.struts2.dojo.components;
 
-import java.util.Random;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
+import com.opensymphony.xwork2.util.ValueStack;
 import org.apache.struts2.components.ClosingUIBean;
 import org.apache.struts2.views.annotations.StrutsTag;
 import org.apache.struts2.views.annotations.StrutsTagAttribute;
 import org.apache.struts2.views.annotations.StrutsTagSkipInheritance;
 
-import com.opensymphony.xwork2.util.ValueStack;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.Random;
 
 /**
  * 
@@ -48,35 +46,37 @@ import com.opensymphony.xwork2.util.Valu
  * 
  * 
  * 
- * 
- *
+ * 
+ * 
+ *
  *This is the first pane
* *
* *
- *
- * + * + * *This is the remote tab - * - *
+ * + * * * * + * * * - * - * + * + * *One Tab - * - * + * + * *Another tab - * - * + * + * * */ @StrutsTag(name="tabbedpanel", tldTagClass="org.apache.struts2.dojo.views.jsp.ui.TabbedPanelTag", description="Render a tabbedPanel widget.")

svn commit: r1207576 - in /struts/struts2/trunk/plugins/rest/src: main/java/org/apache/struts2/rest/RestActionInvocation.java test/java/org/apache/struts2/rest/RestActionInvocationTest.java

2011-11-28 Thread lukaszlenart
Author: lukaszlenart
Date: Mon Nov 28 20:34:18 2011
New Revision: 1207576

URL: http://svn.apache.org/viewvc?rev=1207576&view=rev
Log:
WW-3713 allows to return content not only for GET method

Modified:

struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionInvocation.java

struts/struts2/trunk/plugins/rest/src/test/java/org/apache/struts2/rest/RestActionInvocationTest.java

Modified: 
struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionInvocation.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionInvocation.java?rev=1207576&r1=1207575&r2=1207576&view=diff
==
--- 
struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionInvocation.java
 (original)
+++ 
struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionInvocation.java
 Mon Nov 28 20:34:18 2011
@@ -21,34 +21,30 @@
 
 package org.apache.struts2.rest;
 
+import com.opensymphony.xwork2.Action;
 import com.opensymphony.xwork2.ActionInvocation;
 import com.opensymphony.xwork2.DefaultActionInvocation;
-import com.opensymphony.xwork2.Result;
-import com.opensymphony.xwork2.Action;
 import com.opensymphony.xwork2.ModelDriven;
+import com.opensymphony.xwork2.Result;
 import com.opensymphony.xwork2.ValidationAware;
 import com.opensymphony.xwork2.config.ConfigurationException;
-import com.opensymphony.xwork2.config.entities.ResultConfig;
 import com.opensymphony.xwork2.config.entities.ActionConfig;
+import com.opensymphony.xwork2.config.entities.ResultConfig;
 import com.opensymphony.xwork2.inject.Inject;
 import com.opensymphony.xwork2.util.logging.Logger;
 import com.opensymphony.xwork2.util.logging.LoggerFactory;
 import com.opensymphony.xwork2.util.profiling.UtilTimerStack;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.Map;
-import java.util.HashMap;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
 import org.apache.struts2.ServletActionContext;
 import org.apache.struts2.dispatcher.HttpHeaderResult;
 import org.apache.struts2.rest.handler.ContentTypeHandler;
 import org.apache.struts2.rest.handler.HtmlHandler;
 
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.lang.reflect.Field;
+import java.util.HashMap;
+import java.util.Map;
+
 
 /**
  * Extends the usual {@link ActionInvocation} to add support for processing 
the object returned
@@ -64,6 +60,7 @@ public class RestActionInvocation extend
 private ContentTypeHandlerManager handlerSelector;
 private boolean logger;
 private String defaultErrorResultName;
+private boolean restrictToGet = true;
 
 protected HttpHeaders httpHeaders;
 protected Object target;
@@ -84,6 +81,17 @@ public class RestActionInvocation extend
 defaultErrorResultName = value;
 }
 
+/**
+ * If set to true (be default) blocks returning content from any other 
methods than GET,
+ * if set to false, the content can be returned for any kind of method
+ * 
+ * @param value true or false
+ */
+@Inject(value = "struts.rest.content.restrictToGET", required = false)
+public void setRestrictToGet(String value) {
+restrictToGet = "true".equalsIgnoreCase(value);
+}
+
 @Inject
 public void setMimeTypeHandlerSelector(ContentTypeHandlerManager sel) {
 this.handlerSelector = sel;
@@ -345,12 +353,19 @@ public class RestActionInvocation extend
 target = action;
 }
 
-// don't return any content for PUT, DELETE, and POST where there are 
no errors
-if (!hasErrors && 
!"get".equalsIgnoreCase(ServletActionContext.getRequest().getMethod())) {
+if (shouldRestrictToGET()) {
 target = null;
 }
 }
 
+// don't return any content for PUT, DELETE, and POST where there are no 
errors
+// or backward compatible restrictToGET flag is set to true
+private boolean shouldRestrictToGET() {
+return !hasErrors
+&& 
!"get".equalsIgnoreCase(ServletActionContext.getRequest().getMethod())
+&& restrictToGet;
+}
+
 private void disableCatching(HttpServletResponse response) {
 // No cache
 response.setHeader("Cache-Control", "no-cache");

Modified: 
struts/struts2/trunk/plugins/rest/src/test/java/org/apache/struts2/rest/RestActionInvocationTest.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/rest/src/test/java/org/apache/struts2/rest/RestActionInvocationTest.java?rev=1207576&r1=1207575&r2=1207576&view=diff
==
--- 
struts/struts2/trunk/plugins/rest/src/test/java/org/apache/struts2/rest/RestA

[CONF] Confluence Changes in the last 24 hours

2011-11-28 Thread confluence
This is a daily summary of all recent changes in Confluence.

-
Updated Spaces:
-


Apache ActiveMQ (https://cwiki.apache.org/confluence/display/ACTIVEMQ)

Pages
-
Delete Inactive Destinations edited by  gtully  (09:47 AM)
https://cwiki.apache.org/confluence/display/ACTIVEMQ/Delete+Inactive+Destinations



Apache Camel (https://cwiki.apache.org/confluence/display/CAMEL)

Pages
-
Camel 2.9.0 Release edited by  muellerc  (04:45 PM)
https://cwiki.apache.org/confluence/display/CAMEL/Camel+2.9.0+Release

SMPP edited by  muellerc  (10:49 AM)
https://cwiki.apache.org/confluence/display/CAMEL/SMPP



Apache Connectors Framework 
(https://cwiki.apache.org/confluence/display/CONNECTORS)

Pages
-
Debugging Connections edited by  kwri...@metacarta.com  (04:41 AM)
https://cwiki.apache.org/confluence/display/CONNECTORS/Debugging+Connections



Apache CXF (https://cwiki.apache.org/confluence/display/CXF)

Pages
-
People edited by  cohei...@apache.org  (11:43 AM)
https://cwiki.apache.org/confluence/display/CXF/People



Apache Hive (https://cwiki.apache.org/confluence/display/Hive)

Pages
-
Bylaws edited by  jvs  (08:38 PM)
https://cwiki.apache.org/confluence/display/Hive/Bylaws



Apache Kafka (https://cwiki.apache.org/confluence/display/KAFKA)

Pages
-
New Wire Format Proposal edited by  prashanth.menon  (02:18 PM)
https://cwiki.apache.org/confluence/display/KAFKA/New+Wire+Format+Proposal


Comments
https://cwiki.apache.org/confluence/display/KAFKA/New+Wire+Format+Proposal (1)

Apache MRUnit (https://cwiki.apache.org/confluence/display/MRUNIT)

Pages
-
How to Release edited by  bro...@gmail.com  (05:50 PM)
https://cwiki.apache.org/confluence/display/MRUNIT/How+to+Release



OODT (https://cwiki.apache.org/confluence/display/OODT)

Comments
https://cwiki.apache.org/confluence/display/OODT/Getting+products+from+a+remote+FileManager
 (1)

Apache OpenOffice.org Community 
(https://cwiki.apache.org/confluence/display/OOOUSERS)

Pages
-
OpenOffice.org Migration Status edited by  mla  (11:25 AM)
https://cwiki.apache.org/confluence/display/OOOUSERS/OpenOffice.org+Migration+Status

IP_Clearance edited by  af  (05:06 AM)
https://cwiki.apache.org/confluence/display/OOOUSERS/IP_Clearance

Mailing lists edited by  rbircher  (02:56 AM)
https://cwiki.apache.org/confluence/display/OOOUSERS/Mailing+lists



Apache OpenNLP (https://cwiki.apache.org/confluence/display/OPENNLP)

Pages
-
ReleasePlanAndTasks1.5.2 edited by  joern  (09:21 AM)
https://cwiki.apache.org/confluence/display/OPENNLP/ReleasePlanAndTasks1.5.2



Apache Qpid (https://cwiki.apache.org/confluence/display/qpid)

Pages
-
Building edited by  mazzag  (02:31 PM)
https://cwiki.apache.org/confluence/display/qpid/Building

Management Console Security edited by  k-wall  (08:38 AM)
https://cwiki.apache.org/confluence/display/qpid/Management+Console+Security



Apache Sling (https://cwiki.apache.org/confluence/display/SLING)

Pages
-
Content Loading edited by  thecarlhall  (09:58 PM)
https://cwiki.apache.org/confluence/display/SLING/Content+Loading



Apache Sling Website (https://cwiki.apache.org/confluence/display/SLINGxSITE)

Pages
-
Maven Archetypes edited by  justinedelson  (09:46 AM)
https://cwiki.apache.org/confluence/display/SLINGxSITE/Maven+Archetypes



-
Users
-

pablaasmo
https://cwiki.apache.org/confluence/display/~pablaasmo

Change your notification preferences: 
https://cwiki.apache.org/confluence/users/viewnotifications.action