svn commit: r441572 - in /struts/struts2/trunk/core/src/main/java/org/apache/struts2/jsf: FacesInterceptor.java FacesSetupInterceptor.java FacesSupport.java

2006-09-08 Thread mrdon
Author: mrdon
Date: Fri Sep  8 09:56:01 2006
New Revision: 441572

URL: http://svn.apache.org/viewvc?view=rev&rev=441572
Log:
Changed jsf warning to occur only when trying to use interceptors, not on 
startup

Modified:

struts/struts2/trunk/core/src/main/java/org/apache/struts2/jsf/FacesInterceptor.java

struts/struts2/trunk/core/src/main/java/org/apache/struts2/jsf/FacesSetupInterceptor.java

struts/struts2/trunk/core/src/main/java/org/apache/struts2/jsf/FacesSupport.java

Modified: 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/jsf/FacesInterceptor.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/jsf/FacesInterceptor.java?view=diff&rev=441572&r1=441571&r2=441572
==
--- 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/jsf/FacesInterceptor.java
 (original)
+++ 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/jsf/FacesInterceptor.java
 Fri Sep  8 09:56:01 2006
@@ -31,12 +31,6 @@
 
 private static final long serialVersionUID = -5418255964277566516L;
 
-/** 
- * Marker key for the ActionContext to dictate whether to treat the request
- * as a JSF faces request and therefore process the Faces phases
- */
-protected static final String FACES_ENABLED = "facesEnabled";
-
 /**
  * Not used
  */

Modified: 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/jsf/FacesSetupInterceptor.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/jsf/FacesSetupInterceptor.java?view=diff&rev=441572&r1=441571&r2=441572
==
--- 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/jsf/FacesSetupInterceptor.java
 (original)
+++ 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/jsf/FacesSetupInterceptor.java
 Fri Sep  8 09:56:01 2006
@@ -133,11 +133,6 @@
 log.debug("Unable to initialize faces", ex);
 }
 
-if (facesContextFactory == null) {
-log
-.info("Unable to initialize jsf interceptors probably due 
missing JSF framework initialization");
-return;
-}
 // Javadoc says: Lifecycle instance is shared across multiple
 // simultaneous requests, it must be implemented in a thread-safe
 // manner.
@@ -213,26 +208,30 @@
  *The action invocation
  */
 public String intercept(ActionInvocation invocation) throws Exception {
-if (facesContextFactory != null && isFacesAction(invocation)) {
-
-invocation.getInvocationContext().put(
-FacesInterceptor.FACES_ENABLED, Boolean.TRUE);
-
-FacesContext facesContext = facesContextFactory.getFacesContext(
-ServletActionContext.getServletContext(),
-ServletActionContext.getRequest(), ServletActionContext
-.getResponse(), lifecycle);
-
-setLifecycle(lifecycle);
-
-try {
-return invocation.invoke();
-} finally {
-facesContext.release();
+if (facesContextFactory != null)
+{
+if (isFacesAction(invocation)) {
+
+invocation.getInvocationContext().put(
+FacesInterceptor.FACES_ENABLED, Boolean.TRUE);
+
+FacesContext facesContext = 
facesContextFactory.getFacesContext(
+ServletActionContext.getServletContext(),
+ServletActionContext.getRequest(), ServletActionContext
+.getResponse(), lifecycle);
+
+setLifecycle(lifecycle);
+
+try {
+return invocation.invoke();
+} finally {
+facesContext.release();
+}
 }
 } else {
-return invocation.invoke();
+log.error("Unable to initialize jsf interceptors probably due 
missing JSF implementation libraries");
 }
+return invocation.invoke();
 }
 
 /**

Modified: 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/jsf/FacesSupport.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/jsf/FacesSupport.java?view=diff&rev=441572&r1=441571&r2=441572
==
--- 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/jsf/FacesSupport.java
 (original)
+++ 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/jsf/FacesSupport.java
 Fri Sep  8 09:56:01 2006
@@ -38,14 +38,20 @@
/** Log instance for each class */
protected Log log;
 
-   /** Initializes log instance for the instance object */
-   protected FacesSupport() {
-   log = Lo

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

2006-09-08 Thread tmjee
Author: tmjee
Date: Fri Sep  8 11:04:50 2006
New Revision: 441596

URL: http://svn.apache.org/viewvc?view=rev&rev=441596
Log:
WW-1340
  - updated javadoc with example and description of request parameter passing 
in a redirect-action result type


Modified:

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

Modified: 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ServletActionRedirectResult.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ServletActionRedirectResult.java?view=diff&rev=441596&r1=441595&r2=441596
==
--- 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ServletActionRedirectResult.java
 (original)
+++ 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ServletActionRedirectResult.java
 Fri Sep  8 11:04:50 2006
@@ -40,6 +40,23 @@
  * configuration files. This means you can change your URL patterns at any 
point and your application will still work.
  * It is strongly recommended that if you are redirecting to another action, 
you use this result rather than the
  * standard redirect result.
+ * 
+ * 
+ * 
+ * To pass parameters, the  ...  tag. The following 
parameters will not be 
+ * passable becuase they are part of the config param for this particular 
result.
+ * 
+ * 
+ * actionName
+ *  namespace
+ *  method
+ *  encode
+ *  parse
+ *  location
+ *  prependServletContext
+ * 
+ * 
+ * See examples below for an example of how request parameters could be passed 
in.
  *
  * 
  *
@@ -82,6 +99,25 @@
  * error.jsp
  * 
  * 
+ * 
+ * 
+ *   <-- Pass parameters (reportType, width and height) -->
+ *
+ *
+ *   
+ * generateReport
+ *  /genReport
+ *  pie
+ *  100
+ *  100
+ *   
+ *
+ * 
+ * 
+ * 
  * 
  *
  * @see ActionMapper




svn commit: r441606 - /struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/StrutsTypeConverter.java

2006-09-08 Thread tmjee
Author: tmjee
Date: Fri Sep  8 11:37:54 2006
New Revision: 441606

URL: http://svn.apache.org/viewvc?view=rev&rev=441606
Log:
WW-1340
 - updated javadoc indicating that if Struts2 were to made known that a 
conversion error has occurred, the
   converter should throw either an XWorkException or TypeConversionException 
(preferably the later)


Modified:

struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/StrutsTypeConverter.java

Modified: 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/StrutsTypeConverter.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/StrutsTypeConverter.java?view=diff&rev=441606&r1=441605&r2=441606
==
--- 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/StrutsTypeConverter.java
 (original)
+++ 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/StrutsTypeConverter.java
 Fri Sep  8 11:37:54 2006
@@ -34,6 +34,9 @@
  * could be used to perform some fallback conversion if 
convertValue method of this 
  * failed. By default it just ask its super class (Ognl's 
DefaultTypeConverter) to do the conversion.
  *
+ *  To allow WebWork to recongnize that a converison error has occurred, 
throw an XWorkException or 
+ * preferable a TypeConversionException.
+ *
  * 
  * 
  */




svn commit: r441724 - in /struts/struts2/trunk/core/src: main/java/org/apache/struts2/components/Debug.java main/java/org/apache/struts2/dispatcher/ServletActionRedirectResult.java main/java/org/apach

2006-09-08 Thread husted
Author: husted
Date: Fri Sep  8 19:00:09 2006
New Revision: 441724

URL: http://svn.apache.org/viewvc?view=rev&rev=441724
Log:
WW-1349 Update site menu to omit reference to obsolete TLD docs. Update some 
remaining WW references. 

Modified:

struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Debug.java

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

struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/StrutsTypeConverter.java
struts/struts2/trunk/core/src/site/site.xml

Modified: 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Debug.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Debug.java?view=diff&rev=441724&r1=441723&r2=441724
==
--- 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Debug.java
 (original)
+++ 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Debug.java
 Fri Sep  8 19:00:09 2006
@@ -33,7 +33,7 @@
  * 
  * 
  *
- * @s.tag name="debug" tld-body-content="JSP" 
tld-tag-class="com.opensymphony.webwork.views.jsp.ui.DebugTag"
+ * @s.tag name="debug" tld-body-content="JSP" 
tld-tag-class="org.apache.struts2.views.jsp.ui.DebugTag"
  * description="Render debug tag"
   */
 public class Debug extends UIBean {

Modified: 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ServletActionRedirectResult.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ServletActionRedirectResult.java?view=diff&rev=441724&r1=441723&r2=441724
==
--- 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ServletActionRedirectResult.java
 (original)
+++ 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ServletActionRedirectResult.java
 Fri Sep  8 19:00:09 2006
@@ -40,12 +40,12 @@
  * configuration files. This means you can change your URL patterns at any 
point and your application will still work.
  * It is strongly recommended that if you are redirecting to another action, 
you use this result rather than the
  * standard redirect result.
- * 
+ *
  * 
- * 
- * To pass parameters, the  ...  tag. The following 
parameters will not be 
+ *
+ * To pass parameters, the  ...  tag. The following 
parameters will not be
  * passable becuase they are part of the config param for this particular 
result.
- * 
+ *
  * 
  * actionName
  *  namespace
@@ -55,7 +55,7 @@
  *  location
  *  prependServletContext
  * 
- * 
+ *
  * See examples below for an example of how request parameters could be passed 
in.
  *
  * 
@@ -99,11 +99,11 @@
  * error.jsp
  * 
  * 
- * 
- * 
+ *
+ * 
  *   <-- Pass parameters (reportType, width and height) -->
- *
  *
@@ -116,14 +116,14 @@
  *   
  *
  * 
- * 
- * 
+ *
+ *
  * 
  *
  * @see ActionMapper
  */
 public class ServletActionRedirectResult extends ServletRedirectResult {
-   
+
private static final long serialVersionUID = -9042425229314584066L;
 
 /** The default parameter */
@@ -132,11 +132,11 @@
 protected String actionName;
 protected String namespace;
 protected String method;
-
-protected List prohibitedResultParam = Arrays.asList(new String[] 
{ 
-   DEFAULT_PARAM, "namespace", "method", "encode", "parse", 
"location", 
+
+protected List prohibitedResultParam = Arrays.asList(new String[] {
+   DEFAULT_PARAM, "namespace", "method", "encode", "parse", 
"location",
"prependServletContext" });
-
+
 /**
  * @see 
com.opensymphony.xwork2.Result#execute(com.opensymphony.xwork2.ActionInvocation)
  */
@@ -161,24 +161,24 @@
 for (Iterator i = resultConfigParams.entrySet().iterator(); 
i.hasNext(); ) {
Map.Entry e = (Map.Entry) i.next();
if (! prohibitedResultParam.contains(e.getKey())) {
-   requestParameters.put(e.getKey().toString(), 
-   e.getValue() == null ? "": 
+   requestParameters.put(e.getKey().toString(),
+   e.getValue() == null ? "":