DO NOT REPLY [Bug 38007] - duplicate processing instructions when using jspx

2006-03-07 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38007





--- Additional Comments From [EMAIL PROTECTED]  2006-03-08 07:57 ---
OK, don't know much about this, but I found the following on "Generating XML 
Declarations":

http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSPX3.html#wp118286

>From this it looks like modifying your default.jspx in one of the following 
ways may resolve this...

1) Set "omit-xml-declaration" attribute to true/yes on the  tag.
2) Include a jsp:root element.
3) Remove the XML declaration.

Since I don't use jspx, you'll have to try this yourself to see if this 
resolves the issue.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 34750] - Provide better support for dialogs; avoid POSTDATA situations

2006-03-07 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34750


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WONTFIX




--- Additional Comments From [EMAIL PROTECTED]  2006-03-08 07:31 ---
(In reply to comment #3)
> Yes, please close this bug, it is not relevant anymore.

Thanks, closing as WONTFIX.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 34750] - Provide better support for dialogs; avoid POSTDATA situations

2006-03-07 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34750





--- Additional Comments From [EMAIL PROTECTED]  2006-03-08 07:22 ---
(In reply to comment #2)
> I just closed  Bug 30292 in favour of Bug 38343 as requested - as this bug 
> has 
> a dependency it, does it mean we can also close this one as WONTFIX as well 
> or 
> is there additional functionality here that is still relevant?
> 
> If there is a reason to keep it open then the attached patch needs revising 
> since it depends on the class submitted in Bug 30292.

Yes, please close this bug, it is not relevant anymore.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[Struts Wiki] Update of "DataEntryForm" by MichaelJouravlev

2006-03-07 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Struts Wiki" for change 
notification.

The following page has been changed by MichaelJouravlev:
http://wiki.apache.org/struts/DataEntryForm

--
  
  Therefore I recommend using EventActionDispatcher to dispatch events to any 
arbitrary action class.
  
- == Step 7: Reduce number of actions down to one ==
+ == Step 7 (optional): Reduce number of actions down to one ==
  
  EventActionDispatcher mentioned in the previous section, is pretty smart. It 
can detect the logical type of request that it receives: is it a render request 
or submit request. It does this by looking for event in the request. 
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[Struts Wiki] Update of "EventActionDispatcher" by MichaelJouravlev

2006-03-07 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Struts Wiki" for change 
notification.

The following page has been changed by MichaelJouravlev:
http://wiki.apache.org/struts/EventActionDispatcher

--
  == Action Dispatcher ==
  Struts 1.2.7+ distribution includes !ActionDispatcher class that combines 
features of all dispatch actions. It allows to select a particular behavior or 
flavor and, what is the most appealing, it allows to dispatch events to any 
action class.
  
- !ActionDispatcher does not improve event-handling features of the three 
aforementioned dispatch classes, so it has been extended. The extended version 
is called [http://issues.apache.org/bugzilla/attachment.cgi?id=17724 
ParameterListActionDispatcher] and solves all known dispatch issues:
+ !ActionDispatcher does not improve event-handling features of the three 
aforementioned dispatch classes, so it has been extended. The extended version 
is called EventActionDispatcher. It is included in Struts 1.2.9 and 1.3.1+ and 
solves all known dispatch issues:
  
 * Any arbitrary action class can handle several events.
 * One action mapping can contain several event definitions.
@@ -30, +30 @@

 * If event is not recognized and default method is not defined, the 
dispatcher invokes {{{unspecified}}} method.
 * Standard Cancel buttons is hooked up to {{{cancelled}}} method and does 
not have to be defined explicitly.
  
- == Dispatching events using ParameterListActionDispatcher ==
+ == Dispatching events using EventActionDispatcher ==
  
  Dispatching events is now easy. Usually, you will define two action classes: 
''submit action'' will handle all input events , while ''setup/render action'' 
will choose an appropriate page and display it. In some cases you can get by 
with only one action that handles events as well as renders a view. 
  
@@ -53, +53 @@

  import org.apache.struts.action.ActionForward;
  import org.apache.struts.action.Action;
  import org.apache.struts.actions.ActionDispatcher;
- import org.apache.struts.actions.ParameterListActionDispatcher;
+ import org.apache.struts.actions.EventActionDispatcher;
  
  public class DispatcherSampleAction extends Action {
  
@@ -61, +61 @@

 * Instantiate event dispatcher
 */
protected ActionDispatcher dispatcher =
-   new ParameterListActionDispatcher (this, false);
+   new EventActionDispatcher (this, false);
  
/**
 * Use event dispatcher to call an appropriate event handler. 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[Struts Wiki] Update of "DataEntryForm" by MichaelJouravlev

2006-03-07 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Struts Wiki" for change 
notification.

The following page has been changed by MichaelJouravlev:
http://wiki.apache.org/struts/DataEntryForm

--
  
  !ActionForm should be populated only on submit phase. To protect !ActionForm 
from unintended modification by setup action, do not set "name" attribute in 
setup action mapping. This will prevent Struts from instantiating and 
populating the !ActionForm. To setup !ActionForm data you need to instantiate 
it yourself and to put in into appropriate scope, either into request or into 
session. You will also have to refer to the !ActionForm explicitly using "name" 
attribute of your input elements.
  
- == Step 6: Consolidate your actions; use DispatchAction flavor for submit 
action ==
+ == Step 6: Consolidate your actions; use DispatchAction flavor or action 
dispatcher for submit action ==
  
  A simple web resource like {{{Customer}}} can have couple of setup action 
mappings like {{{viewCustomer.do}}} and {{{editCustomer.do}}} and several 
submit action mappings like {{{addCustomer.do}}}, {{{updateCustomer.do}}} and 
{{{deleteCustomer.do}}}.  Of course, this does not mean that you need to define 
five corresponding Java classes. It would be great if you could reduce number 
of action classes down to two: one setup action and one submit action per web 
resource. It would be also great to reduce number of action mappings in 
struts-config.xml file.
  
@@ -98, +98 @@

   * !LookupDispatchAction is heavy, uses inverted reference to resource files.
   * !MappingDispatchAction can be used to dispatch only one method.
  
- Therefore I recommend using ActionDispatcher to dispatch events to any 
arbitrary action class.
+ Therefore I recommend using EventActionDispatcher to dispatch events to any 
arbitrary action class.
  
  == Step 7: Reduce number of actions down to one ==
  
- !ParameterMappingDispatchAction mentioned in the previous section, is pretty 
smart. It can detect the logical type of request that it receives: is it a 
render request or submit request. It does this by looking for event in the 
request. 
+ EventActionDispatcher mentioned in the previous section, is pretty smart. It 
can detect the logical type of request that it receives: is it a render request 
or submit request. It does this by looking for event in the request. 
  
+ If !EventActionDispatcher finds event in the request, it calls the 
corresponding method handler. This is a submit phase. If dispatcher cannot find 
event in the request, it calls default method. This request is supposed to 
belong to render phase, so you can prepare the !ActionForm and render a page.
- If !ParameterMappingDispatchAction finds event in the request, it calls the 
corresponding method handler. This is a submit phase. 
- 
- If !ParameterMappingDispatchAction cannot find event in the request, it calls 
default method. This is a render phase, so you can prepare the !ActionForm and 
render a page.
  
  inline:setup_submit_05.gif
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 38343] - [extras] ParameterListActionDispatcher

2006-03-07 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38343





--- Additional Comments From [EMAIL PROTECTED]  2006-03-08 06:50 ---
(In reply to comment #27)
> 2) The JavaDoc reads in regards to not finding a match: "null is returned
> which means the unspecified method will be invoked." I believe you have
> changed the functionality so null is no longer returned, which
> means "unspecified" is no longer invoked. Can you confirm this?

I've removed the "incorrect" check from getMethodName (it no longer throws an 
exception if the method is null) and implemented the "unspecified" method to 
log/throw an exception which doesn't expose the mapping's parameter. Thanks for 
spotting this.

Also when I looked at it, the getParameter() method was unecessary - I modified 
your version to throw an exception if the parameter was missing - but the 
inherited versions of this method were already doing that.

http://svn.apache.org/viewcvs?rev=384133&view=rev
http://svn.apache.org/viewcvs?rev=384134&view=rev

Thanks Paul.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[Struts Wiki] Trivial Update of "StrutsExtrasRelease131" by MichaelJouravlev

2006-03-07 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Struts Wiki" for change 
notification.

The following page has been changed by MichaelJouravlev:
http://wiki.apache.org/struts/StrutsExtrasRelease131

--
  
  || '''ID''' || '''Summary''' || '''Status''' ||
  || [http://issues.apache.org/bugzilla/show_bug.cgi?id=30292 30292] || 
Replacement of LookupDispatchAction || WONTFIX (superceded by 38343) ||
- || [http://issues.apache.org/bugzilla/show_bug.cgi?id=38343 38343] || 
ParameterListActionDispatcher || Patch Applied. ||
+ || [http://issues.apache.org/bugzilla/show_bug.cgi?id=38343 38343] || Added 
EventActionDispatcher || Patch Applied. ||
  || [http://issues.apache.org/bugzilla/show_bug.cgi?id=38749 38749] || XSS 
vulnerability in LookupDispatchAction || Fixed ||
  
  == Preparation Checklist ==

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[Struts Wiki] Trivial Update of "StrutsCatalogBaseAction" by MichaelJouravlev

2006-03-07 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Struts Wiki" for change 
notification.

The following page has been changed by MichaelJouravlev:
http://wiki.apache.org/struts/StrutsCatalogBaseAction

--
  
  -- Hubert Rabago
  
- For those wanting more than !DispatchAction can provide the solution is 
[http://wiki.apache.org/struts/ActionDispatcher ParameterListActionDispatcher] 
class.  It provides all !DispatchAction functionality and more:
+ For those wanting more than !DispatchAction can provide the solution is 
EventActionDispatcher class (Struts 1.2.9, Struts 1.3.1+)  It provides all 
!DispatchAction functionality and more:
 * One action mapping can contain several event definitions.
 * Submit buttons can have any caption; caption can be changed in runtime.
 * No event-to-method map is needed.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[Struts Wiki] Trivial Update of "StrutsCatalog" by MichaelJouravlev

2006-03-07 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Struts Wiki" for change 
notification.

The following page has been changed by MichaelJouravlev:
http://wiki.apache.org/struts/StrutsCatalog

--
   *  StrutsCatalogVariableScreenFields
   *  StrutsCatalogLazyList
   *  DataEntryForm
-  *  ActionDispatcher
+  *  EventActionDispatcher
   *  StrutsDesignPatterns
   *  StrutsFileUpload
   *  StrutsFileDownload

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r384134 - in /struts/action/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/actions: EventActionDispatcher.java EventDispatchAction.java

2006-03-07 Thread niallp
Author: niallp
Date: Tue Mar  7 22:43:55 2006
New Revision: 384134

URL: http://svn.apache.org/viewcvs?rev=384134&view=rev
Log:
Port to 1.2.x branch. Implement unspecified method in EventDispatchAction and 
EventActionDispatcher and remove check/exception from getMethodName() method, 
which was preventing "unspecified" from ever being called - thanks to Paul 
Benedict for pointing this out.

Also, remove unecessary getParameter() method (duplicates inherited version) 
from EventDispatchAction and EventActionDispatcher.

Modified:

struts/action/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/actions/EventActionDispatcher.java

struts/action/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/actions/EventDispatchAction.java

Modified: 
struts/action/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/actions/EventActionDispatcher.java
URL: 
http://svn.apache.org/viewcvs/struts/action/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/actions/EventActionDispatcher.java?rev=384134&r1=384133&r2=384134&view=diff
==
--- 
struts/action/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/actions/EventActionDispatcher.java
 (original)
+++ 
struts/action/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/actions/EventActionDispatcher.java
 Tue Mar  7 22:43:55 2006
@@ -19,6 +19,7 @@
 package org.apache.struts.actions;
 
 import java.util.StringTokenizer;
+import java.lang.reflect.Method;
 
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
@@ -29,6 +30,7 @@
 import org.apache.struts.action.Action;
 import org.apache.struts.action.ActionForm;
 import org.apache.struts.action.ActionMapping;
+import org.apache.struts.action.ActionForward;
 
 /**
  * An Action helper class that dispatches to to one of the public methods
@@ -109,7 +111,47 @@
  * @param action the action
  */
 public EventActionDispatcher(Action action) {
-super(action, -1);
+// N.B. MAPPING_FLAVOR causes the getParameter() method
+//  in ActionDispatcher to throw an exception if the
+//  parameter is missing
+super(action, ActionDispatcher.MAPPING_FLAVOR);
+}
+
+/**
+ * Dispatches to the target class' unspecified method, if
+ * present, otherwise throws a ServletException. Classes utilizing
+ * EventActionDispatcher should provide an 
unspecified
+ * method if they wish to provide behavior different than throwing a
+ * ServletException.
+ *
+ * @param mapping  The ActionMapping used to select this instance
+ * @param form The optional ActionForm bean for this request (if any)
+ * @param request  The non-HTTP request we are processing
+ * @param response The non-HTTP response we are creating
+ * @return The forward to which control should be transferred, or
+ * null if the response has been completed.
+ * @throws Exception if the application business logic throws an
+ *   exception.
+ */
+protected ActionForward unspecified(ActionMapping mapping, ActionForm form,
+HttpServletRequest request, HttpServletResponse response)
+throws Exception {
+// Identify if there is an "unspecified" method to be dispatched to
+String name = "unspecified";
+Method method = null;
+
+try {
+method = getMethod(name);
+} catch (NoSuchMethodException e) {
+String message =
+messages.getMessage("event.parameter", mapping.getPath());
+
+LOG.error(message + " " + mapping.getParameter());
+
+throw new ServletException(message);
+}
+
+return dispatchMethod(mapping, form, request, response, name, method);
 }
 
 /**
@@ -156,42 +198,6 @@
 }
 }
 
-if (defaultMethodName == null || defaultMethodName.length() == 0) {
-String message =
-messages.getMessage("event.parameter", mapping.getPath());
-LOG.error(message + " " + parameter);
-throw new ServletException(message);
-}
-
 return defaultMethodName;
-}
-
-/**
- * Returns the parameter.
- *
- * @param mapping  The ActionMapping used to select this instance
- * @param form The optional ActionForm bean for this request (if any)
- * @param request  The HTTP request we are processing
- * @param response The HTTP response we are creating
- * @return The ActionMapping parameter's value
- * @throws Exception if the parameter is missing.
- */
-protected String getParameter(ActionMapping mapping, ActionForm form,
-HttpServletRequest request, HttpServletResponse response)
-throws Exception {
-
-String parameter = mapping.getParameter();
-if ("".equals(parameter)) {
-parameter = null;
-}
-
-if (param

svn commit: r384133 - in /struts/extras/trunk/src/java/org/apache/struts/actions: EventActionDispatcher.java EventDispatchAction.java

2006-03-07 Thread niallp
Author: niallp
Date: Tue Mar  7 22:42:48 2006
New Revision: 384133

URL: http://svn.apache.org/viewcvs?rev=384133&view=rev
Log:
Implement unspecified method in EventDispatchAction and EventActionDispatcher 
and remove check/exception from getMethodName() method, which was preventing 
"unspecified" from ever being called - thanks to Paul Benedict for pointing 
this out.

Also, remove unecessary getParameter() method (duplicates inherited version) 
from EventDispatchAction and EventActionDispatcher.

Modified:

struts/extras/trunk/src/java/org/apache/struts/actions/EventActionDispatcher.java

struts/extras/trunk/src/java/org/apache/struts/actions/EventDispatchAction.java

Modified: 
struts/extras/trunk/src/java/org/apache/struts/actions/EventActionDispatcher.java
URL: 
http://svn.apache.org/viewcvs/struts/extras/trunk/src/java/org/apache/struts/actions/EventActionDispatcher.java?rev=384133&r1=384132&r2=384133&view=diff
==
--- 
struts/extras/trunk/src/java/org/apache/struts/actions/EventActionDispatcher.java
 (original)
+++ 
struts/extras/trunk/src/java/org/apache/struts/actions/EventActionDispatcher.java
 Tue Mar  7 22:42:48 2006
@@ -19,6 +19,7 @@
 package org.apache.struts.actions;
 
 import java.util.StringTokenizer;
+import java.lang.reflect.Method;
 
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
@@ -29,6 +30,7 @@
 import org.apache.struts.action.Action;
 import org.apache.struts.action.ActionForm;
 import org.apache.struts.action.ActionMapping;
+import org.apache.struts.action.ActionForward;
 
 /**
  * An Action helper class that dispatches to to one of the public methods
@@ -109,7 +111,47 @@
  * @param action the action
  */
 public EventActionDispatcher(Action action) {
-super(action, -1);
+// N.B. MAPPING_FLAVOR causes the getParameter() method
+//  in ActionDispatcher to throw an exception if the
+//  parameter is missing
+super(action, ActionDispatcher.MAPPING_FLAVOR);
+}
+
+/**
+ * Dispatches to the target class' unspecified method, if
+ * present, otherwise throws a ServletException. Classes utilizing
+ * EventActionDispatcher should provide an 
unspecified
+ * method if they wish to provide behavior different than throwing a
+ * ServletException.
+ *
+ * @param mapping  The ActionMapping used to select this instance
+ * @param form The optional ActionForm bean for this request (if any)
+ * @param request  The non-HTTP request we are processing
+ * @param response The non-HTTP response we are creating
+ * @return The forward to which control should be transferred, or
+ * null if the response has been completed.
+ * @throws Exception if the application business logic throws an
+ *   exception.
+ */
+protected ActionForward unspecified(ActionMapping mapping, ActionForm form,
+HttpServletRequest request, HttpServletResponse response)
+throws Exception {
+// Identify if there is an "unspecified" method to be dispatched to
+String name = "unspecified";
+Method method = null;
+
+try {
+method = getMethod(name);
+} catch (NoSuchMethodException e) {
+String message =
+messages.getMessage("event.parameter", mapping.getPath());
+
+LOG.error(message + " " + mapping.getParameter());
+
+throw new ServletException(message);
+}
+
+return dispatchMethod(mapping, form, request, response, name, method);
 }
 
 /**
@@ -156,42 +198,6 @@
 }
 }
 
-if (defaultMethodName == null || defaultMethodName.length() == 0) {
-String message =
-messages.getMessage("event.parameter", mapping.getPath());
-LOG.error(message + " " + parameter);
-throw new ServletException(message);
-}
-
 return defaultMethodName;
-}
-
-/**
- * Returns the parameter.
- *
- * @param mapping  The ActionMapping used to select this instance
- * @param form The optional ActionForm bean for this request (if any)
- * @param request  The HTTP request we are processing
- * @param response The HTTP response we are creating
- * @return The ActionMapping parameter's value
- * @throws Exception if the parameter is missing.
- */
-protected String getParameter(ActionMapping mapping, ActionForm form,
-HttpServletRequest request, HttpServletResponse response)
-throws Exception {
-
-String parameter = mapping.getParameter();
-if ("".equals(parameter)) {
-parameter = null;
-}
-
-if (parameter == null) {
-String message =
-messages.getMessage("dispatch.handler", mapping.getPath());
-LOG.error(message)

[Struts Wiki] Update of "EventActionDispatcher" by MichaelJouravlev

2006-03-07 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Struts Wiki" for change 
notification.

The following page has been changed by MichaelJouravlev:
http://wiki.apache.org/struts/EventActionDispatcher

--
+ ## page was renamed from ActionDispatcher
  == Handling events with action dispatcher ==
  
  Struts is considered to be a simple request/response framework with no notion 
of events. This is not exactly true. It is possible to assign events to input 
elements of an HTML form or evnt to regular links, and to process these events 
in a uniform fashion by a single action class.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r384130 - /struts/site/trunk/xdocs/volunteers.xml

2006-03-07 Thread martinc
Author: martinc
Date: Tue Mar  7 22:12:29 2006
New Revision: 384130

URL: http://svn.apache.org/viewcvs?rev=384130&view=rev
Log:
Gary is now on the PMC.

Modified:
struts/site/trunk/xdocs/volunteers.xml

Modified: struts/site/trunk/xdocs/volunteers.xml
URL: 
http://svn.apache.org/viewcvs/struts/site/trunk/xdocs/volunteers.xml?rev=384130&r1=384129&r2=384130&view=diff
==
--- struts/site/trunk/xdocs/volunteers.xml (original)
+++ struts/site/trunk/xdocs/volunteers.xml Tue Mar  7 22:12:29 2006
@@ -111,6 +111,10 @@
 Wendy Smoak
 (wsmoak at apache.org)
 
+
+Gary VanMatre
+(gvanmatre at apache.org)
+
 
 
 
@@ -125,10 +129,6 @@
 
 David Geary
 (dgeary at apache.org)
-
-
-Gary VanMatre
-(gvanmatre at apache.org)
 
 
 Sean Schofield



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 38343] - [extras] ParameterListActionDispatcher

2006-03-07 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38343





--- Additional Comments From [EMAIL PROTECTED]  2006-03-08 05:07 ---
(In reply to comment #27)
> 1) EventDispatchAction duplicates much (all?) of the dispatching code of
> EventActionDispatcher. I understand XYZDispatchAction classes are convienent,
> and while I prefer them to be phased out, other people may find them easy to
> have pre-built functionality out of the box. That's fine. My only
> recommendation here is that EventDispatchAction should use
> EventActionDispatcher internally. I think that would be a more organized
> approach to code maintenance and still provide the convienence Action
> classes you seek.

There is a slight difference between implementations that extend DispatchAction 
and those that use an ActionDispatcher. In the case of DispatchAction 
implementations the "unspecified" method is a protected method and isn't 
publically exposed. For Action implementations that use ActionDispatcher, 
unless the Action is in the same package as the ActionDispatcher, then 
the "unspecified" needs to be public. The same is also true for the "cancelled" 
method. For this reason my preference is to not use EventActionDispatcher in 
the EventDispatchAction - it keeps EventDispatchAction consistent with other 
DispatchAction flavours.

> 2) The JavaDoc reads in regards to not finding a match: "null is returned 
which
> means the unspecified method will be invoked." I believe you have changed the
> functionality so null is no longer returned, which means "unspecified" is no
> longer invoked. Can you confirm this?
> if (defaultMethodName == null || defaultMethodName.length() == 0) {
> String message =
> messages.getMessage("event.parameter", mapping.getPath());
> LOG.error(message + " " + parameter);
> throw new ServletException(message);
> }
> I think above ^^^ is the issue. Didn't you already modify the base class to
> prevent the exception message from exposing the method? Was that the rationale
> behind this addition?

Yes you have a point here. Its late so I'll look at this tommorrow. The base 
class was modified to not expose input parameters, but it does display the 
mapping's parameter. In the case of this flavour though, it seemed wrong to 
expose the mapping's parameter (and therefore method names), when theres a 
facility to "obfuscate" the method names. I think I was trying to save having 
to override the unspecified method - but it looks like I've made a mistake :-(

> (3) I am okay with you removing the "impliedSingleDefault" feature. I still
> want that for my code base, so I will privately override
> EventActionDispatcher.

OK good. Thanks for the feedback.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 38343] - [extras] ParameterListActionDispatcher

2006-03-07 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38343





--- Additional Comments From [EMAIL PROTECTED]  2006-03-08 03:56 ---
>> I hope this is all acceptable, apologies in advance if the changes upset 
>> you. 
If theres anything you really don't like we can discuss and (maybe) modify.

Thanks Niall! I really don't think I can be upset. You took my patch to the next
level, and so congratulations on a job well done. I do have a few comments:

1) EventDispatchAction duplicates much (all?) of the dispatching code of
EventActionDispatcher. I understand XYZDispatchAction classes are convienent,
and while I prefer them to be phased out, other people may find them easy to
have pre-built functionality out of the box. That's fine. My only recommendation
here is that EventDispatchAction should use EventActionDispatcher internally. I
think that would be a more organized approach to code maintenance and still
provide the convienence Action classes you seek.

2) The JavaDoc reads in regards to not finding a match: "null is returned which
means the unspecified method will be invoked." I believe you have changed the
functionality so null is no longer returned, which means "unspecified" is no
longer invoked. Can you confirm this?

if (defaultMethodName == null || defaultMethodName.length() == 0) {
String message =
messages.getMessage("event.parameter", mapping.getPath());
LOG.error(message + " " + parameter);
throw new ServletException(message);
}

I think above ^^^ is the issue. Didn't you already modify the base class to
prevent the exception message from exposing the method? Was that the rationale
behind this addition?

(3) I am okay with you removing the "impliedSingleDefault" feature. I still want
that for my code base, so I will privately override EventActionDispatcher.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



commons-logging and static log members

2006-03-07 Thread Simon Kitching
Hi All,

Recently there was a discussion on the MyFaces list regarding the use of
the following pattern with commons logging classes:
  private static Log log = LogFactory.getLog(Foo.class)

It was pointed out that the use of static here is a really bad idea for
any code that may be deployed via a shared classloader in a container.
Craig McClanahan indicated that this (anti-)pattern was in use in struts
code and that the issue should be pointed out here.

I haven't personally checked whether this usage *is* present in the
current struts codebase. Neither do I know whether struts jarfiles are
expected to be deployed in shared classpaths (it's definitely true for
MyFaces).

More information on this issue can be found here:
 http://wiki.apache.org/jakarta-commons/Logging/StaticLog

Regards,

Simon (commons-logging committer)


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r384109 - /struts/action/branches/STRUTS_1_2_BRANCH/doc/userGuide/release-notes.xml

2006-03-07 Thread niallp
Author: niallp
Date: Tue Mar  7 19:33:42 2006
New Revision: 384109

URL: http://svn.apache.org/viewcvs?rev=384109&view=rev
Log:
Update release notes

Modified:
struts/action/branches/STRUTS_1_2_BRANCH/doc/userGuide/release-notes.xml

Modified: 
struts/action/branches/STRUTS_1_2_BRANCH/doc/userGuide/release-notes.xml
URL: 
http://svn.apache.org/viewcvs/struts/action/branches/STRUTS_1_2_BRANCH/doc/userGuide/release-notes.xml?rev=384109&r1=384108&r2=384109&view=diff
==
--- struts/action/branches/STRUTS_1_2_BRANCH/doc/userGuide/release-notes.xml 
(original)
+++ struts/action/branches/STRUTS_1_2_BRANCH/doc/userGuide/release-notes.xml 
Tue Mar  7 19:33:42 2006
@@ -7,6 +7,18 @@
  
   
   
+  The main motivation for releasing Struts 1.2.9 is to fix three
+  security issues which have been identified:
+  
+  
+  http://issues.apache.org/bugzilla/show_bug.cgi?id=38374";>Bug 38374 - 
+  Validation always skipped with Globals.CANCEL_KEY.
+  http://issues.apache.org/bugzilla/show_bug.cgi?id=38534";>Bug 38534 - 
+  DOS attack, application hack.
+  http://issues.apache.org/bugzilla/show_bug.cgi?id=38749";>Bug 38749 - 
+  XSS vulnerability in LookupDispatchAction.
+  
+  
   This section contains release notes for changes that have taken
   place since
   Version 1.2.8.
@@ -39,6 +51,13 @@
  
  
ModificationRevisionBugzillaDescription
  
+ 
+ 2006-03-08
+ http://svn.apache.org/viewcvs.cgi?rev=384090&view=rev";>384090
+ (http://svn.apache.org/viewcvs?rev=384092&view=rev";>384092)
+ http://issues.apache.org/bugzilla/show_bug.cgi?id=38343";>38343
+ Add EventDispatchAction and EventActionDispatcher.
+ 
  
  2006-03-07
  http://svn.apache.org/viewcvs.cgi?rev=383907&view=rev";>383907



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[Struts Wiki] Update of "StrutsActionRelease131" by NiallPemberton

2006-03-07 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Struts Wiki" for change 
notification.

The following page has been changed by NiallPemberton:
http://wiki.apache.org/struts/StrutsActionRelease131

The comment on the change is:
Update Bug status

--
  
  || '''ID''' || '''Summary''' || '''Component''' || '''Status''' ||
  || [http://issues.apache.org/bugzilla/show_bug.cgi?id=34445 34445] || use 
charsets given by browser for form field encodings || File Upload   || Fixed in 
1.3.0 ||
- || [http://issues.apache.org/bugzilla/show_bug.cgi?id=35127 35127] || 
[taglib] All Javascript validation fails when http://issues.apache.org/bugzilla/show_bug.cgi?id=35127 35127] || 
[taglib] All Javascript validation fails when http://issues.apache.org/bugzilla/show_bug.cgi?id=35155 35155] || 
PropertyMessageResources.loadLocale(String localeKey) has...  || Utilities  || 
Patch Available ||
  || [http://issues.apache.org/bugzilla/show_bug.cgi?id=35604 35604] || 
[FEATURE] Allow use of native languages in resource bundle  || Utilities  || 
Patch Available ||
  || [http://issues.apache.org/bugzilla/show_bug.cgi?id=38534 38534] || DOS 
attack, application hack || Action|| Fixed ||

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[Struts Wiki] Update of "StrutsExtrasRelease131" by NiallPemberton

2006-03-07 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Struts Wiki" for change 
notification.

The following page has been changed by NiallPemberton:
http://wiki.apache.org/struts/StrutsExtrasRelease131

The comment on the change is:
Update Bug Status

--
  
  
  || '''ID''' || '''Summary''' || '''Status''' ||
- || [http://issues.apache.org/bugzilla/show_bug.cgi?id=30292 30292] || 
Replacement of LookupDispatchAction || Patch Available ||
+ || [http://issues.apache.org/bugzilla/show_bug.cgi?id=30292 30292] || 
Replacement of LookupDispatchAction || WONTFIX (superceded by 38343) ||
- || [http://issues.apache.org/bugzilla/show_bug.cgi?id=38343 38343] || 
ParameterListActionDispatcher || Patch Available.  May supercede 30292. ||
+ || [http://issues.apache.org/bugzilla/show_bug.cgi?id=38343 38343] || 
ParameterListActionDispatcher || Patch Applied. ||
  || [http://issues.apache.org/bugzilla/show_bug.cgi?id=38749 38749] || XSS 
vulnerability in LookupDispatchAction || Fixed ||
  
  == Preparation Checklist ==

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 34750] - Provide better support for dialogs; avoid POSTDATA situations

2006-03-07 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34750





--- Additional Comments From [EMAIL PROTECTED]  2006-03-08 03:24 ---
I just closed  Bug 30292 in favour of Bug 38343 as requested - as this bug has 
a dependency it, does it mean we can also close this one as WONTFIX as well or 
is there additional functionality here that is still relevant?

If there is a reason to keep it open then the attached patch needs revising 
since it depends on the class submitted in Bug 30292.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 34750] - Provide better support for dialogs; avoid POSTDATA situations

2006-03-07 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34750


Bug 34750 depends on bug 30292, which changed state.

Bug 30292 Summary: Replacement of LookupDispatchAction
http://issues.apache.org/bugzilla/show_bug.cgi?id=30292

   What|Old Value   |New Value

 Status|NEW |RESOLVED
 Resolution||WONTFIX



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 30292] - Replacement of LookupDispatchAction

2006-03-07 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=30292


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WONTFIX




--- Additional Comments From [EMAIL PROTECTED]  2006-03-08 03:20 ---
(In reply to comment #16)
> I removed my votes for this bugfix. The solution presented in bug #38343 is
> more compact and better thought out. I think that this bug should be closed
> in favor of bug #38343.

OK Bug 38343 has been committed so closing as WONTFIX.



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 38343] - [extras] ParameterListActionDispatcher

2006-03-07 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38343





--- Additional Comments From [EMAIL PROTECTED]  2006-03-08 02:54 ---
Helluva work, Niall. Please consider closing bug #30292 as WONTFIX.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r384100 - in /struts/sandbox/trunk/action2/apps/cookbook/src/webapp/pages: Simple/ input/

2006-03-07 Thread husted
Author: husted
Date: Tue Mar  7 18:43:05 2006
New Revision: 384100

URL: http://svn.apache.org/viewcvs?rev=384100&view=rev
Log:
Action2 Cookbook 
* Rename input to Simple
 

Added:
struts/sandbox/trunk/action2/apps/cookbook/src/webapp/pages/Simple/
  - copied from r384097, 
struts/sandbox/trunk/action2/apps/cookbook/src/webapp/pages/input/
Removed:
struts/sandbox/trunk/action2/apps/cookbook/src/webapp/pages/input/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r384096 - in /struts/sandbox/trunk/action2/apps/cookbook/src: java/cookbook2/ webapp/ webapp/WEB-INF/classes/ webapp/pages/input/

2006-03-07 Thread husted
Author: husted
Date: Tue Mar  7 18:40:28 2006
New Revision: 384096

URL: http://svn.apache.org/viewcvs?rev=384096&view=rev
Log:
Action2 Cookbook 
* Add simple input example
 

Removed:

struts/sandbox/trunk/action2/apps/cookbook/src/webapp/pages/input/InputResult.jsp
Modified:
struts/sandbox/trunk/action2/apps/cookbook/src/java/cookbook2/Input.java
struts/sandbox/trunk/action2/apps/cookbook/src/webapp/Home.jsp

struts/sandbox/trunk/action2/apps/cookbook/src/webapp/WEB-INF/classes/xwork-Input.xml

struts/sandbox/trunk/action2/apps/cookbook/src/webapp/WEB-INF/classes/xwork.xml
struts/sandbox/trunk/action2/apps/cookbook/src/webapp/pages/input/Input.jsp
struts/sandbox/trunk/action2/apps/cookbook/src/webapp/pages/input/index.jsp

Modified: 
struts/sandbox/trunk/action2/apps/cookbook/src/java/cookbook2/Input.java
URL: 
http://svn.apache.org/viewcvs/struts/sandbox/trunk/action2/apps/cookbook/src/java/cookbook2/Input.java?rev=384096&r1=384095&r2=384096&view=diff
==
--- struts/sandbox/trunk/action2/apps/cookbook/src/java/cookbook2/Input.java 
(original)
+++ struts/sandbox/trunk/action2/apps/cookbook/src/java/cookbook2/Input.java 
Tue Mar  7 18:40:28 2006
@@ -1,289 +1,20 @@
 package cookbook2;
 
-import com.opensymphony.webwork.ServletActionContext;
 import com.opensymphony.xwork.ActionSupport;
-import com.opensymphony.xwork.Validateable;
-import com.opensymphony.xwork.util.OgnlValueStack;
 
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.io.File;
+public class Input extends ActionSupport {
 
-public class Input extends ActionSupport implements Validateable {
-
-String name;
-Date birthday;
-String bio;
-String favoriteColor;
-List friends;
-boolean legalAge;
-String state;
-String region;
-File picture;
-String pictureContentType;
-String pictureFileName;
-String favouriteLanguage;
-String favouriteVehicalType = "MotorcycleKey";
-String favouriteVehicalSpecific = "YamahaKey";
-
-List leftSideCartoonCharacters;
-List rightSideCartoonCharacters;
-
-List favouriteLanguages = new ArrayList();
-List vehicalTypeList = new ArrayList();
-Map vehicalSpecificMap = new HashMap();
-
-String thoughts;
-
-public Input() {
-   favouriteLanguages.add(new Language("EnglishKey", "English Language"));
-   favouriteLanguages.add(new Language("FrenchKey", "French Language"));
-   favouriteLanguages.add(new Language("SpanishKey", "Spanish Language"));
-
-   VehicalType car = new VehicalType("CarKey", "Car");
-   VehicalType motorcycle = new VehicalType("MotorcycleKey", "Motorcycle");
-   vehicalTypeList.add(car);
-   vehicalTypeList.add(motorcycle);
-
-   List cars = new ArrayList();
-   cars.add(new VehicalSpecific("MercedesKey", "Mercedes"));
-   cars.add(new VehicalSpecific("HondaKey", "Honda"));
-   cars.add(new VehicalSpecific("FordKey", "Ford"));
-
-   List motorcycles = new ArrayList();
-   motorcycles.add(new VehicalSpecific("SuzukiKey", "Suzuki"));
-   motorcycles.add(new VehicalSpecific("YamahaKey", "Yamaha"));
-
-   vehicalSpecificMap.put(car, cars);
-   vehicalSpecificMap.put(motorcycle, motorcycles);
-}
-
-
-
-public List getLeftSideCartoonCharacters() {
-   return leftSideCartoonCharacters;
-}
-public void setLeftSideCartoonCharacters(List leftSideCartoonCharacters) {
-   this.leftSideCartoonCharacters = leftSideCartoonCharacters;
-}
-
-
-public List getRightSideCartoonCharacters() {
-   return rightSideCartoonCharacters;
-}
-public void setRightSideCartoonCharacters(List rightSideCartoonCharacters) 
{
-   this.rightSideCartoonCharacters = rightSideCartoonCharacters;
-}
-
-
-public String getFavouriteVehicalType() {
-   return favouriteVehicalType;
-}
-
-public void setFavouriteVehicalType(String favouriteVehicalType) {
-   this.favouriteVehicalType = favouriteVehicalType;
-}
-
-public String getFavouriteVehicalSpecific() {
-   return favouriteVehicalSpecific;
-}
-
-public void setFavouriteVehicalSpecific(String favouriteVehicalSpecific) {
-   this.favouriteVehicalSpecific = favouriteVehicalSpecific;
-}
-
-
-public List getVehicalTypeList() {
-   return vehicalTypeList;
-}
-
-public List getVehicalSpecificList() {
-   OgnlValueStack stack = 
ServletActionContext.getValueStack(ServletActionContext.getRequest());
-   VehicalType vehicalType = (VehicalType) stack.findValue("top");
-   System.out.println("vehicalType.getKey()"+vehicalType.getKey());
-   return (List) vehicalSpecificMap.get(vehicalType);
-}
-
-public List getFavouriteLanguages() {
-   return favouriteLanguages;
-}
-
-public String execute() throws Exception {
-return

DO NOT REPLY [Bug 38343] - [extras] ParameterListActionDispatcher

2006-03-07 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38343





--- Additional Comments From [EMAIL PROTECTED]  2006-03-08 02:24 ---
P.S. I also "trimmed" the method key/name values, so that spaces in the 
parameter's list don't cause a method to not be found.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 38343] - [extras] ParameterListActionDispatcher

2006-03-07 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38343





--- Additional Comments From [EMAIL PROTECTED]  2006-03-08 02:18 ---
Thanks for submitting this Paul. I have added this to the current trunk and 
1.2.x branch:

http://svn.apache.org/viewcvs?rev=384090&view=rev
http://svn.apache.org/viewcvs?rev=384092&view=rev

...with a few changes:

1) Renamed ParameterListActionDispatcher to EventActionDispatcher.

2) Fixed a few checkstyle issues and modified some javadocs.

3) It was throwing a NullPointerException if a parameter was not specified - 
changed it log and throw a servlet exception in the getParameter() method.

4) If a method can't be identified (and no default was specified), it showed 
the parameter value in the exception's error message (default ActionDispatcher 
behaviour) which reveals "obfuscated" method names. I added a check in 
getMethodName() which throws an exception which doesn't reveal the parameter 
value.

5) I removed the "impliedSingleDefault" feature, since if people want 
MappingDispatchAction behaviour they can simply use either the 
MappingDispatchAction or ActionDispatcher implementations - or simply specify 
a "default" value in the parameter. This (slighty) simplifies things which is 
better IMO.

6) I also added a DispatchAction flavour (called EventDispatchAction) - so 
people can choose what style they prefer (DispatchAction or ActionDispatcher 
style)

7) I also added tests/examples to the struts-examples webapp:
http://svn.apache.org/viewcvs?rev=384091&view=rev
http://svn.apache.org/viewcvs?rev=384093&view=rev

In order to accomodate the new EventDispatchAction, I did a small bit of 
refactoring in DispatchAction. This allows the two "event" flavours 
(EventDispatchAction and EventActionDispatcher) to be almost identical.

http://svn.apache.org/viewcvs?rev=384088&view=rev
http://svn.apache.org/viewcvs?rev=384089&view=rev

I hope this is all acceptable, apologies in advance if the changes upset you. 
If theres anything you really don't like we can discuss and (maybe) modify.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r384093 - in /struts/action/branches/STRUTS_1_2_BRANCH: src/examples/org/apache/struts/webapp/dispatch/ web/examples/WEB-INF/dispatch/ web/examples/dispatch/

2006-03-07 Thread niallp
Author: niallp
Date: Tue Mar  7 17:58:10 2006
New Revision: 384093

URL: http://svn.apache.org/viewcvs?rev=384093&view=rev
Log:
Add EventDispatchAction and EventActionDispatcher examples to struts-examples 
webapp

Added:

struts/action/branches/STRUTS_1_2_BRANCH/src/examples/org/apache/struts/webapp/dispatch/EventActionDispatcherExample.java
   (with props)

struts/action/branches/STRUTS_1_2_BRANCH/src/examples/org/apache/struts/webapp/dispatch/EventDispatchActionExample.java
   (with props)

struts/action/branches/STRUTS_1_2_BRANCH/web/examples/dispatch/eventAction.jsp  
 (with props)

struts/action/branches/STRUTS_1_2_BRANCH/web/examples/dispatch/eventDispatcher.jsp
   (with props)
Modified:

struts/action/branches/STRUTS_1_2_BRANCH/src/examples/org/apache/struts/webapp/dispatch/MessageResources.properties

struts/action/branches/STRUTS_1_2_BRANCH/src/examples/org/apache/struts/webapp/dispatch/MessageResources_fr.properties

struts/action/branches/STRUTS_1_2_BRANCH/web/examples/WEB-INF/dispatch/struts-config.xml
struts/action/branches/STRUTS_1_2_BRANCH/web/examples/dispatch/index.jsp

Added: 
struts/action/branches/STRUTS_1_2_BRANCH/src/examples/org/apache/struts/webapp/dispatch/EventActionDispatcherExample.java
URL: 
http://svn.apache.org/viewcvs/struts/action/branches/STRUTS_1_2_BRANCH/src/examples/org/apache/struts/webapp/dispatch/EventActionDispatcherExample.java?rev=384093&view=auto
==
--- 
struts/action/branches/STRUTS_1_2_BRANCH/src/examples/org/apache/struts/webapp/dispatch/EventActionDispatcherExample.java
 (added)
+++ 
struts/action/branches/STRUTS_1_2_BRANCH/src/examples/org/apache/struts/webapp/dispatch/EventActionDispatcherExample.java
 Tue Mar  7 17:58:10 2006
@@ -0,0 +1,115 @@
+/*
+ * $Id$ 
+ *
+ * Copyright 2006 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.struts.webapp.dispatch;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import org.apache.struts.actions.ActionDispatcher;
+import org.apache.struts.actions.EventActionDispatcher;
+import org.apache.struts.action.Action;
+import org.apache.struts.action.ActionForm;
+import org.apache.struts.action.ActionForward;
+import org.apache.struts.action.ActionMapping;
+import org.apache.struts.action.ActionMessage;
+import org.apache.struts.action.ActionMessages;
+
+/**
+ * Example EventActionDispatcher.
+ *
+ * @version $Rev$ $Date$
+ */
+public class EventActionDispatcherExample extends Action {
+
+private ActionDispatcher dispatcher 
+ = new EventActionDispatcher(this);
+
+private int fooCount;
+private int barCount;
+
+/**
+ * Execute method.
+ *
+ * @param mapping The ActionMapping used to select this instance
+ * @param form The optional ActionForm bean for this request
+ * @param request The servlet request we are processing
+ * @param response The servlet response we are creating
+ *
+ * @exception Exception if business logic throws an exception
+ */
+public ActionForward execute(ActionMapping mapping,
+ ActionForm form,
+ HttpServletRequest request,
+ HttpServletResponse response)
+throws Exception {
+
+return dispatcher.execute(mapping, form, request, response);
+
+}
+
+/**
+ * Example "foo" method.
+ *
+ * @param mapping The ActionMapping used to select this instance
+ * @param form The optional ActionForm bean for this request
+ * @param request The servlet request we are processing
+ * @param response The servlet response we are creating
+ *
+ * @exception Exception if business logic throws an exception
+ */
+public ActionForward doFoo(ActionMapping mapping,
+   ActionForm form,
+   HttpServletRequest request,
+   HttpServletResponse response)
+throws Exception {
+
+fooCount++;
+
+ActionMessages messages = new ActionMessages();
+messages.add("foo", new ActionMessage("count.foo.message", 
fooCount+""));
+saveMessages(request, messages);
+
+return (mapping.findForward("success"));
+
+}
+
+/**
+ * Example "bar" method.
+

svn commit: r384092 - in /struts/action/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/actions: EventActionDispatcher.java EventDispatchAction.java LocalStrings.properties

2006-03-07 Thread niallp
Author: niallp
Date: Tue Mar  7 17:57:11 2006
New Revision: 384092

URL: http://svn.apache.org/viewcvs?rev=384092&view=rev
Log:
Port Bug 38343 to 1.2.x branch - Add EventDispatchAction and 
EventActionDispatcher - submitted by Paul Benedict

Added:

struts/action/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/actions/EventActionDispatcher.java
   (with props)

struts/action/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/actions/EventDispatchAction.java
   (with props)
Modified:

struts/action/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/actions/LocalStrings.properties

Added: 
struts/action/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/actions/EventActionDispatcher.java
URL: 
http://svn.apache.org/viewcvs/struts/action/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/actions/EventActionDispatcher.java?rev=384092&view=auto
==
--- 
struts/action/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/actions/EventActionDispatcher.java
 (added)
+++ 
struts/action/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/actions/EventActionDispatcher.java
 Tue Mar  7 17:57:11 2006
@@ -0,0 +1,197 @@
+/*
+ * $Id$
+ *
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.struts.actions;
+
+import java.util.StringTokenizer;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.struts.action.Action;
+import org.apache.struts.action.ActionForm;
+import org.apache.struts.action.ActionMapping;
+
+/**
+ * An Action helper class that dispatches to to one of the public methods
+ * that are named in the parameter attribute of the corresponding
+ * ActionMapping and matches a submission parameter. This is useful for
+ * developers who prefer to use many submit buttons, images, or submit links
+ * on a single form and whose related actions exist in a single Action 
class.
+ *
+ * The method(s) in the associated Action must have the same
+ * signature (other than method name) of the standard Action.execute 
method.
+ *
+ * To configure the use of this action in your
+ * struts-config.xml file, create an entry like this:
+ *
+ * 
+ *   
+ * 
+ *
+ * where parameter contains three possible methods and one
+ * default method if nothing matches (such as the user pressing the enter 
key).
+ *
+ * For utility purposes, you can use the key=value notation to
+ * alias methods so that they are exposed as different form element names, in 
the
+ * event of a naming conflict or otherwise. In this example, the 
recalc
+ * button (via a request parameter) will invoke the recalculate
+ * method. The security-minded person may find this feature valuable to
+ * obfuscate and not expose the methods.
+ *
+ * The default key is purely optional. If this is not specified
+ * and no parameters match the list of method keys, null is
+ * returned which means the unspecified method will be 
invoked.
+ *
+ * The order of the parameters are guaranteed to be iterated in the order
+ * specified. If multiple buttons were accidently submitted, the first match in
+ * the list will be dispatched.
+ *
+ * To implement this dispatch behaviour in an Action,
+ * class create your custom Action as follows, along with the methods you 
require
+ * (and optionally "cancelled" and "unspecified" methods): 
+ * 
+ *   public class MyCustomAction extends Action {
+ *
+ *   protected ActionDispatcher dispatcher = new 
EventActionDispatcher(this);
+ *
+ *   public ActionForward execute(ActionMapping mapping,
+ *ActionForm form,
+ *HttpServletRequest request,
+ *HttpServletResponse response)
+ *   throws Exception {
+ *   return dispatcher.execute(mapping, form, request, response);
+ *   }
+ *   }
+ * 
+ * 
+ *
+ * @since Struts 1.2.9
+ */
+public class EventActionDispatcher exten

svn commit: r384091 - in /struts/apps/trunk/examples/src: java/org/apache/struts/webapp/dispatch/ webapp/WEB-INF/dispatch/ webapp/dispatch/

2006-03-07 Thread niallp
Author: niallp
Date: Tue Mar  7 17:55:41 2006
New Revision: 384091

URL: http://svn.apache.org/viewcvs?rev=384091&view=rev
Log:
Add EventDispatchAction and EventActionDispatcher examples to struts-examples 
webapp

Added:

struts/apps/trunk/examples/src/java/org/apache/struts/webapp/dispatch/EventActionDispatcherExample.java
   (with props)

struts/apps/trunk/examples/src/java/org/apache/struts/webapp/dispatch/EventDispatchActionExample.java
   (with props)
struts/apps/trunk/examples/src/webapp/dispatch/eventAction.jsp   (with 
props)
struts/apps/trunk/examples/src/webapp/dispatch/eventDispatcher.jsp   (with 
props)
Modified:

struts/apps/trunk/examples/src/java/org/apache/struts/webapp/dispatch/MessageResources.properties

struts/apps/trunk/examples/src/java/org/apache/struts/webapp/dispatch/MessageResources_fr.properties
struts/apps/trunk/examples/src/webapp/WEB-INF/dispatch/struts-config.xml
struts/apps/trunk/examples/src/webapp/dispatch/index.jsp

Added: 
struts/apps/trunk/examples/src/java/org/apache/struts/webapp/dispatch/EventActionDispatcherExample.java
URL: 
http://svn.apache.org/viewcvs/struts/apps/trunk/examples/src/java/org/apache/struts/webapp/dispatch/EventActionDispatcherExample.java?rev=384091&view=auto
==
--- 
struts/apps/trunk/examples/src/java/org/apache/struts/webapp/dispatch/EventActionDispatcherExample.java
 (added)
+++ 
struts/apps/trunk/examples/src/java/org/apache/struts/webapp/dispatch/EventActionDispatcherExample.java
 Tue Mar  7 17:55:41 2006
@@ -0,0 +1,115 @@
+/*
+ * $Id$ 
+ *
+ * Copyright 2006 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.struts.webapp.dispatch;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import org.apache.struts.actions.ActionDispatcher;
+import org.apache.struts.actions.EventActionDispatcher;
+import org.apache.struts.action.Action;
+import org.apache.struts.action.ActionForm;
+import org.apache.struts.action.ActionForward;
+import org.apache.struts.action.ActionMapping;
+import org.apache.struts.action.ActionMessage;
+import org.apache.struts.action.ActionMessages;
+
+/**
+ * Example EventActionDispatcher.
+ *
+ * @version $Rev$ $Date$
+ */
+public class EventActionDispatcherExample extends Action {
+
+private ActionDispatcher dispatcher 
+ = new EventActionDispatcher(this);
+
+private int fooCount;
+private int barCount;
+
+/**
+ * Execute method.
+ *
+ * @param mapping The ActionMapping used to select this instance
+ * @param form The optional ActionForm bean for this request
+ * @param request The servlet request we are processing
+ * @param response The servlet response we are creating
+ *
+ * @exception Exception if business logic throws an exception
+ */
+public ActionForward execute(ActionMapping mapping,
+ ActionForm form,
+ HttpServletRequest request,
+ HttpServletResponse response)
+throws Exception {
+
+return dispatcher.execute(mapping, form, request, response);
+
+}
+
+/**
+ * Example "foo" method.
+ *
+ * @param mapping The ActionMapping used to select this instance
+ * @param form The optional ActionForm bean for this request
+ * @param request The servlet request we are processing
+ * @param response The servlet response we are creating
+ *
+ * @exception Exception if business logic throws an exception
+ */
+public ActionForward doFoo(ActionMapping mapping,
+   ActionForm form,
+   HttpServletRequest request,
+   HttpServletResponse response)
+throws Exception {
+
+fooCount++;
+
+ActionMessages messages = new ActionMessages();
+messages.add("foo", new ActionMessage("count.foo.message", 
fooCount+""));
+saveMessages(request, messages);
+
+return (mapping.findForward("success"));
+
+}
+
+/**
+ * Example "bar" method.
+ *
+ * @param mapping The ActionMapping used to select this instance
+ * @param form The optional ActionForm bean for this request
+ * @param request The servlet request we are processing
+ *

svn commit: r384090 - in /struts/extras/trunk/src/java/org/apache/struts/actions: EventActionDispatcher.java EventDispatchAction.java LocalStrings.properties

2006-03-07 Thread niallp
Author: niallp
Date: Tue Mar  7 17:53:58 2006
New Revision: 384090

URL: http://svn.apache.org/viewcvs?rev=384090&view=rev
Log:
Bug 38343 - Add EventDispatchAction and EventActionDispatcher - submitted by 
Paul Benedict

Added:

struts/extras/trunk/src/java/org/apache/struts/actions/EventActionDispatcher.java
   (with props)

struts/extras/trunk/src/java/org/apache/struts/actions/EventDispatchAction.java 
  (with props)
Modified:

struts/extras/trunk/src/java/org/apache/struts/actions/LocalStrings.properties

Added: 
struts/extras/trunk/src/java/org/apache/struts/actions/EventActionDispatcher.java
URL: 
http://svn.apache.org/viewcvs/struts/extras/trunk/src/java/org/apache/struts/actions/EventActionDispatcher.java?rev=384090&view=auto
==
--- 
struts/extras/trunk/src/java/org/apache/struts/actions/EventActionDispatcher.java
 (added)
+++ 
struts/extras/trunk/src/java/org/apache/struts/actions/EventActionDispatcher.java
 Tue Mar  7 17:53:58 2006
@@ -0,0 +1,197 @@
+/*
+ * $Id$
+ *
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.struts.actions;
+
+import java.util.StringTokenizer;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.struts.action.Action;
+import org.apache.struts.action.ActionForm;
+import org.apache.struts.action.ActionMapping;
+
+/**
+ * An Action helper class that dispatches to to one of the public methods
+ * that are named in the parameter attribute of the corresponding
+ * ActionMapping and matches a submission parameter. This is useful for
+ * developers who prefer to use many submit buttons, images, or submit links
+ * on a single form and whose related actions exist in a single Action 
class.
+ *
+ * The method(s) in the associated Action must have the same
+ * signature (other than method name) of the standard Action.execute 
method.
+ *
+ * To configure the use of this action in your
+ * struts-config.xml file, create an entry like this:
+ *
+ * 
+ *   
+ * 
+ *
+ * where parameter contains three possible methods and one
+ * default method if nothing matches (such as the user pressing the enter 
key).
+ *
+ * For utility purposes, you can use the key=value notation to
+ * alias methods so that they are exposed as different form element names, in 
the
+ * event of a naming conflict or otherwise. In this example, the 
recalc
+ * button (via a request parameter) will invoke the recalculate
+ * method. The security-minded person may find this feature valuable to
+ * obfuscate and not expose the methods.
+ *
+ * The default key is purely optional. If this is not specified
+ * and no parameters match the list of method keys, null is
+ * returned which means the unspecified method will be 
invoked.
+ *
+ * The order of the parameters are guaranteed to be iterated in the order
+ * specified. If multiple buttons were accidently submitted, the first match in
+ * the list will be dispatched.
+ *
+ * To implement this dispatch behaviour in an Action,
+ * class create your custom Action as follows, along with the methods you 
require
+ * (and optionally "cancelled" and "unspecified" methods): 
+ * 
+ *   public class MyCustomAction extends Action {
+ *
+ *   protected ActionDispatcher dispatcher = new 
EventActionDispatcher(this);
+ *
+ *   public ActionForward execute(ActionMapping mapping,
+ *ActionForm form,
+ *HttpServletRequest request,
+ *HttpServletResponse response)
+ *   throws Exception {
+ *   return dispatcher.execute(mapping, form, request, response);
+ *   }
+ *   }
+ * 
+ * 
+ *
+ * @since Struts 1.2.9
+ */
+public class EventActionDispatcher extends ActionDispatcher {
+
+/**
+ * Commons Logging instance.
+ */
+private static final Log LOG = 
LogFactory.getLog(EventActionDispatcher.class);
+
+/**
+  

svn commit: r384089 - in /struts/action/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/actions: DispatchAction.java LookupDispatchAction.java

2006-03-07 Thread niallp
Author: niallp
Date: Tue Mar  7 17:50:52 2006
New Revision: 384089

URL: http://svn.apache.org/viewcvs?rev=384089&view=rev
Log:
DispatchAction refactoring and remove duplicated LookupDispatchAction code

Modified:

struts/action/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/actions/DispatchAction.java

struts/action/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/actions/LookupDispatchAction.java

Modified: 
struts/action/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/actions/DispatchAction.java
URL: 
http://svn.apache.org/viewcvs/struts/action/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/actions/DispatchAction.java?rev=384089&r1=384088&r2=384089&view=diff
==
--- 
struts/action/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/actions/DispatchAction.java
 (original)
+++ 
struts/action/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/actions/DispatchAction.java
 Tue Mar  7 17:50:52 2006
@@ -165,16 +165,9 @@
 return af;
 }
 }
-// Identify the request parameter containing the method name
-String parameter = mapping.getParameter();
-if (parameter == null) {
-String message =
-messages.getMessage("dispatch.handler", mapping.getPath());
-
-log.error(message);
 
-throw new ServletException(message);
-}
+// Get the parameter. This could be overridden in subclasses.
+String parameter = getParameter(mapping, form, request, response);
 
 // Get the method's name. This could be overridden in subclasses.
 String name = getMethodName(mapping, form, request, response, 
parameter);
@@ -306,6 +299,35 @@
 return (forward);
 }
 
+/**
+ * Returns the parameter value.
+ *
+ * @param mapping  The ActionMapping used to select this instance
+ * @param form The optional ActionForm bean for this request (if any)
+ * @param request  The HTTP request we are processing
+ * @param response The HTTP response we are creating
+ * @return The ActionMapping parameter's value
+ * @throws Exception if the parameter is missing.
+ */
+protected String getParameter(ActionMapping mapping, ActionForm form,
+HttpServletRequest request, HttpServletResponse response)
+throws Exception {
+
+// Identify the request parameter containing the method name
+String parameter = mapping.getParameter();
+
+if (parameter == null) {
+String message =
+messages.getMessage("dispatch.handler", mapping.getPath());
+
+log.error(message);
+
+throw new ServletException(message);
+}
+
+
+return parameter;
+}
 
 /**
  * Introspect the current class to identify a method of the specified

Modified: 
struts/action/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/actions/LookupDispatchAction.java
URL: 
http://svn.apache.org/viewcvs/struts/action/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/actions/LookupDispatchAction.java?rev=384089&r1=384088&r2=384089&view=diff
==
--- 
struts/action/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/actions/LookupDispatchAction.java
 (original)
+++ 
struts/action/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/actions/LookupDispatchAction.java
 Tue Mar  7 17:50:52 2006
@@ -113,7 +113,7 @@
 /**
  * Commons Logging instance.
  */
-private static Log LOG = LogFactory.getLog(LookupDispatchAction.class);
+private static final Log LOG = 
LogFactory.getLog(LookupDispatchAction.class);
 
 /**
  * Reverse lookup map from resource value to resource key.
@@ -147,25 +147,7 @@
 HttpServletRequest request,
 HttpServletResponse response)
 throws Exception {
-
-if (isCancelled(request)) {
-ActionForward af = cancelled(mapping, form, request, response);
-if (af != null) {
-return af;
-}
-}
-// Identify the request parameter containing the method name
-String parameter = mapping.getParameter();
-if (parameter == null) {
-String message = messages.getMessage("dispatch.handler", 
mapping.getPath());
-throw new ServletException(message);
-}
-
-// Identify the string to lookup
-String methodName = getMethodName(mapping, form, request, response, 
parameter);
-
-return dispatchMethod(mapping, form, request, response, methodName);
-
+return super.execute(mapping, form, request, response);
 }
 
 /**



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r384088 - in /struts/extras/trunk/src/java/org/apache/struts/actions: DispatchAction.java LookupDispatchAction.java

2006-03-07 Thread niallp
Author: niallp
Date: Tue Mar  7 17:49:48 2006
New Revision: 384088

URL: http://svn.apache.org/viewcvs?rev=384088&view=rev
Log:
DispatchAction refactoring and remove duplicated LookupDispatchAction code

Modified:
struts/extras/trunk/src/java/org/apache/struts/actions/DispatchAction.java

struts/extras/trunk/src/java/org/apache/struts/actions/LookupDispatchAction.java

Modified: 
struts/extras/trunk/src/java/org/apache/struts/actions/DispatchAction.java
URL: 
http://svn.apache.org/viewcvs/struts/extras/trunk/src/java/org/apache/struts/actions/DispatchAction.java?rev=384088&r1=384087&r2=384088&view=diff
==
--- struts/extras/trunk/src/java/org/apache/struts/actions/DispatchAction.java 
(original)
+++ struts/extras/trunk/src/java/org/apache/struts/actions/DispatchAction.java 
Tue Mar  7 17:49:48 2006
@@ -147,17 +147,8 @@
 }
 }
 
-// Identify the request parameter containing the method name
-String parameter = mapping.getParameter();
-
-if (parameter == null) {
-String message =
-messages.getMessage("dispatch.handler", mapping.getPath());
-
-log.error(message);
-
-throw new ServletException(message);
-}
+// Get the parameter. This could be overridden in subclasses.
+String parameter = getParameter(mapping, form, request, response);
 
 // Get the method's name. This could be overridden in subclasses.
 String name =
@@ -304,6 +295,36 @@
 
 // Return the returned ActionForward instance
 return (forward);
+}
+
+/**
+ * Returns the parameter value.
+ *
+ * @param mapping  The ActionMapping used to select this instance
+ * @param form The optional ActionForm bean for this request (if any)
+ * @param request  The HTTP request we are processing
+ * @param response The HTTP response we are creating
+ * @return The ActionMapping parameter's value
+ * @throws Exception if the parameter is missing.
+ */
+protected String getParameter(ActionMapping mapping, ActionForm form,
+HttpServletRequest request, HttpServletResponse response)
+throws Exception {
+
+// Identify the request parameter containing the method name
+String parameter = mapping.getParameter();
+
+if (parameter == null) {
+String message =
+messages.getMessage("dispatch.handler", mapping.getPath());
+
+log.error(message);
+
+throw new ServletException(message);
+}
+
+
+return parameter;
 }
 
 /**

Modified: 
struts/extras/trunk/src/java/org/apache/struts/actions/LookupDispatchAction.java
URL: 
http://svn.apache.org/viewcvs/struts/extras/trunk/src/java/org/apache/struts/actions/LookupDispatchAction.java?rev=384088&r1=384087&r2=384088&view=diff
==
--- 
struts/extras/trunk/src/java/org/apache/struts/actions/LookupDispatchAction.java
 (original)
+++ 
struts/extras/trunk/src/java/org/apache/struts/actions/LookupDispatchAction.java
 Tue Mar  7 17:49:48 2006
@@ -109,7 +109,7 @@
 /**
  * Commons Logging instance.
  */
-private static Log LOG = LogFactory.getLog(LookupDispatchAction.class);
+private static final Log LOG = 
LogFactory.getLog(LookupDispatchAction.class);
 
 /**
  * Reverse lookup map from resource value to resource key.
@@ -140,29 +140,7 @@
 public ActionForward execute(ActionMapping mapping, ActionForm form,
 HttpServletRequest request, HttpServletResponse response)
 throws Exception {
-if (isCancelled(request)) {
-ActionForward af = cancelled(mapping, form, request, response);
-
-if (af != null) {
-return af;
-}
-}
-
-// Identify the request parameter containing the method name
-String parameter = mapping.getParameter();
-
-if (parameter == null) {
-String message =
-messages.getMessage("dispatch.handler", mapping.getPath());
-
-throw new ServletException(message);
-}
-
-// Identify the string to lookup
-String methodName =
-getMethodName(mapping, form, request, response, parameter);
-
-return dispatchMethod(mapping, form, request, response, methodName);
+return super.execute(mapping, form, request, response);
 }
 
 /**



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r384050 - /struts/shale/trunk/core-library/src/java/org/apache/shale/taglib/CommonsValidatorTag.java

2006-03-07 Thread hrabago
Author: hrabago
Date: Tue Mar  7 15:18:34 2006
New Revision: 384050

URL: http://svn.apache.org/viewcvs?rev=384050&view=rev
Log:
Reset "param" map each time the tag is used.

Modified:

struts/shale/trunk/core-library/src/java/org/apache/shale/taglib/CommonsValidatorTag.java

Modified: 
struts/shale/trunk/core-library/src/java/org/apache/shale/taglib/CommonsValidatorTag.java
URL: 
http://svn.apache.org/viewcvs/struts/shale/trunk/core-library/src/java/org/apache/shale/taglib/CommonsValidatorTag.java?rev=384050&r1=384049&r2=384050&view=diff
==
--- 
struts/shale/trunk/core-library/src/java/org/apache/shale/taglib/CommonsValidatorTag.java
 (original)
+++ 
struts/shale/trunk/core-library/src/java/org/apache/shale/taglib/CommonsValidatorTag.java
 Tue Mar  7 15:18:34 2006
@@ -224,9 +224,6 @@
 * @param value   the value of the parameter to pass to the validator.
 */
public void addParam(String name, String value) {
-  if (params == null) {
- params = new LinkedHashMap();
-  }
   params.put(name, value);
}
 
@@ -237,6 +234,8 @@
 * @return EVAL_BODY_INCLUDE
 */
public int doStartTag() throws JspException {
+  // reset the params for each use of this tag
+  params = new LinkedHashMap();
   return EVAL_BODY_INCLUDE;
}
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 38343] - [extras] ParameterListActionDispatcher

2006-03-07 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38343





--- Additional Comments From [EMAIL PROTECTED]  2006-03-07 21:15 ---
I forgot to also mention EventDispatcher. <-- I favor this one, and then
ParameterListDispatcher next.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 38343] - [extras] ParameterListActionDispatcher

2006-03-07 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38343





--- Additional Comments From [EMAIL PROTECTED]  2006-03-07 20:45 ---
OK event is better, but how about ListActionDispatcher, 
ParametersActionDispatcher or ParameterListDispatcher?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 38343] - [extras] ParameterListActionDispatcher

2006-03-07 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38343





--- Additional Comments From [EMAIL PROTECTED]  2006-03-07 20:43 ---
I've been pressed before to rename it "EventActionDispatcher" because this
essentially faciliates event-driven development. If the curernt name is too
technical sounding, I opt for the above.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 38343] - [extras] ParameterListActionDispatcher

2006-03-07 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38343





--- Additional Comments From [EMAIL PROTECTED]  2006-03-07 19:49 ---
(In reply to comment #19)
> It is important for me, as a Struts developer, to prevent people from toying
> around with the request and try to invoke methods outside the flow of my
> defined intent.

OK this is a good point, controlling what is allowed to be invoked 'coz I guess 
you might have an Action with e.g. ten methods, which are logically related but 
might only permit two to be invoked from a particular flow.

> Niall, do you find yourself with a need to configure an action on a per-class 
basis?

I don't use any "dispatch" flavours at all. I was just taking a look at the 
patch and the comments are what came to mind. Just wanting to try and ensure 
the solution is the best possible.

My only other comment is I don't like the class's name - but I can't think of 
anything beter :-(


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 37817] - TagUtils doesn't create XHTML compliant URLs when called from LinkTag when using forwards defined with redirect="true"

2006-03-07 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37817





--- Additional Comments From [EMAIL PROTECTED]  2006-03-07 19:41 ---
OK, I've posted on the dev list to see if anyone is aware of any reasons to not 
make this change. If there are no objections, I'll commit the patch and include 
it in version 1.2.9

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Bug 37817 - TagUtils doesn't create XHTML compliant URLs

2006-03-07 Thread Niall Pemberton
I've been looking at Bug  37817

http://issues.apache.org/bugzilla/show_bug.cgi?id=37817

...which proposes a change to TagUtils's computeURLWithCharEncoding()
method.

It seems to me that the idead behind the "redirect" parameter passed to the
method is to indicate whether the generated URL is to be used in a redirect
(i.e. by response.sendRedirect()) as the RedirectTag does - or whether the
URL is just going to be rendered in some way (e.g. LinkTag).

Currently if a forward is passed to that method and the forward's redirect
is set to true - it takes account of that. However this has caused the
reporter of this bug an issue and seems to me to be incorrect. Since if its
just being used to render a link, then it shouldn't encode it as a
"redirect" url - whatever the forward's setting is.

The main concern I have is that its worked this way for a long time (before
TagUtils, the functionality was in RequestUtils) and I'm wondering if there
might be consequences I'm not aware of, hence the reason for this post. If
there are no objections, I'll apply the patch in a couple of days.

Niall




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 38343] - [extras] ParameterListActionDispatcher

2006-03-07 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38343





--- Additional Comments From [EMAIL PROTECTED]  2006-03-07 19:30 ---
>> Hopefully Paul will provide more constructive feedback to my suggestion.
This is asking too much perhaps :-) But I will do my best.

>> What about the dispatcher using reflection to find methods (with correct
signature) automatically.

This is a very good idea. But my focus of this class does not want to address
refelction because one of the problems with the original tired-and-true
DispatchAction is that you cannot limit which methods, for a particular action
mapping, you want to invoke. This is one need I was addressing with this design.
It is important for me, as a Struts developer, to prevent people from toying
around with the request and try to invoke methods outside the flow of my defined
intent.

>> Configure in the Action's constructor as in my previous example?

This idea is novel and has not crossed my mind. Thank you for recommending it. I
don't know what to make of it yet because I am not interested in configuring the
class, as I am configuring a mapping. I have my configuration in the config file
because, well, that's "how it's always been done"  but seriously, I want the
freedom to configure per action mapping. I believe my previous comments speak to
this.

Niall, do you find yourself with a need to configure an action on a per-class 
basis?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 37817] - TagUtils doesn't create XHTML compliant URLs when called from LinkTag when using forwards defined with redirect="true"

2006-03-07 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37817





--- Additional Comments From [EMAIL PROTECTED]  2006-03-07 19:12 ---
I am not well versed enough in the entire source tree to know which of these 
two alternatives is "more 
correct" or internally consistent.

I have been using my own patch since I submitted it last year without incident 
and found that I am now 
producing consistently XHTML compliant output.

I defer to your expertise on what solution to adopt but I'd really like to see 
this bug acknowledged and one 
of the two solutions commited and included in the next maintenance release.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 37817] - TagUtils doesn't create XHTML compliant URLs when called from LinkTag when using forwards defined with redirect="true"

2006-03-07 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37817





--- Additional Comments From [EMAIL PROTECTED]  2006-03-07 18:51 ---
Created an attachment (id=17843)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=17843&action=view)
Alternative change to TagUtils

The "redirect" variable is used in two places  - for the separator and the to
decide whether to use response.encodeURL() or  response.encodeRedirectURL().
Would seem to make sense in my view to just removed the check on the forward's
redirect setting - since its the method parameter that indicates whether the
url is going to be used for a redirect (as in the RedirectTag) or just to
render a url.

Having said that, its worked this way for a long time. So I'm reluctant to
change it.

Maybe the best solution would be for you to have a "forward" without "redirect"
being set to true?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[Struts Wiki] Update of "StrutsRelease129" by MichaelJouravlev

2006-03-07 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Struts Wiki" for change 
notification.

The following page has been changed by MichaelJouravlev:
http://wiki.apache.org/struts/StrutsRelease129

The comment on the change is:
Fixed bug numbers

--
  This is primarily a maintenance release to fix the following 
'security' issues:
  
  
- || [http://issues.apache.org/bugzilla/show_bug.cgi?id=377805 377805] || 
Validation always skipped with Globals.CANCEL_KEY ||
+ || [http://issues.apache.org/bugzilla/show_bug.cgi?id=38374 38374] || 
Validation always skipped with Globals.CANCEL_KEY ||
- || [http://issues.apache.org/bugzilla/show_bug.cgi?id=379661 379661] || DOS 
attack, application hack ||
+ || [http://issues.apache.org/bugzilla/show_bug.cgi?id=38534 38534] || DOS 
attack, application hack ||
- || [http://issues.apache.org/bugzilla/show_bug.cgi?id=383718 383718] || XSS 
vulnerability in !LookupDispatchAction ||
+ || [http://issues.apache.org/bugzilla/show_bug.cgi?id=38749 38749] || XSS 
vulnerability in !LookupDispatchAction ||
  
  == Outstanding Bug Review ==
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 38343] - [extras] ParameterListActionDispatcher

2006-03-07 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38343





--- Additional Comments From [EMAIL PROTECTED]  2006-03-07 18:26 ---
(In reply to comment #16)
Except for "users like to look at the config" none of this makes sense to me. 
Hopefully Paul will provide more constructive feedback to my suggestion.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Struts 1.2.9 Release Plan

2006-03-07 Thread Niall Pemberton
I have created a plan for a Struts 1.2.9 release

http://wiki.apache.org/struts/StrutsRelease129

The main motivation for the release are the "security" issues (see release
plan) that have been resolved, although there are a couple of other changes
in the repository.

If there are no objections I plan to tag a RC in the next couple of days.

Niall



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 38343] - [extras] ParameterListActionDispatcher

2006-03-07 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38343





--- Additional Comments From [EMAIL PROTECTED]  2006-03-07 18:09 ---
(In reply to comment #16)
> (In reply to comment #15)
> > OK heres another thought. What about the dispatcher using reflection to 
> > find 
> > methods (with correct signature) automatically - no config needed at all. 
> > The 
> > only thing that doesn't provide is the "obfuscate" facility - so maybe that 
> > could be an optional extra - configure in the Action's constructor as in my 
> > previous example?
> 
> Stripes framework does that.

Oops. Wrong one. Stripes uses annotations.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[Struts Wiki] Update of "StrutsReleasePlans" by NiallPemberton

2006-03-07 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Struts Wiki" for change 
notification.

The following page has been changed by NiallPemberton:
http://wiki.apache.org/struts/StrutsReleasePlans

The comment on the change is:
link to 1.2.9 release plan

--
   *  StrutsRelease126 - ''Struts Version 1.2.6''
   *  StrutsRelease127 - ''Struts Version 1.2.7''
   *  StrutsRelease128 - ''Struts Version 1.2.8''
+  *  StrutsRelease129 - ''Struts Version 1.2.9''
  
  = 4. Struts Shale Release Plans =
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[Struts Wiki] Update of "StrutsRelease129" by NiallPemberton

2006-03-07 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Struts Wiki" for change 
notification.

The following page has been changed by NiallPemberton:
http://wiki.apache.org/struts/StrutsRelease129

The comment on the change is:
Create 1.2.9 Release Plan

New page:
= Struts 1.2.9 Release =

== Info ==

 1. Struts [http://struts.apache.org/releases.html#Releases Release Guidelines]
 
 2. [http://wiki.apache.org/incubator/SigningReleases Signing Releases]

 3. Apache [http://apache.org/dev/mirrors.html Mirroring Guidelines]
 
== Release Manager ==

The release manager is '''Niall Pemberton'''

== Special Issues ==

This is primarily a maintenance release to fix the following 'security' 
issues:


|| [http://issues.apache.org/bugzilla/show_bug.cgi?id=377805 377805] || 
Validation always skipped with Globals.CANCEL_KEY ||
|| [http://issues.apache.org/bugzilla/show_bug.cgi?id=379661 379661] || DOS 
attack, application hack ||
|| [http://issues.apache.org/bugzilla/show_bug.cgi?id=383718 383718] || XSS 
vulnerability in !LookupDispatchAction ||

== Outstanding Bug Review ==

|| '''ID''' || '''Summary''' || '''Component''' || '''Status''' ||
|| [http://issues.apache.org/bugzilla/show_bug.cgi?id=31230 31230] || Multiple 
classes using deprecated !DefinitionsUtil class || tiles || Remove deprecations 
in 1.3.x ||
|| [http://issues.apache.org/bugzilla/show_bug.cgi?id=36806 36806] || 
Unexpected Tiles recursion on JSP errors? || tiles || 1.3.x issue ? ||
|| [http://issues.apache.org/bugzilla/show_bug.cgi?id=37653 37653] || 
Struts-beans and tiles handle request.getLocale different || tiles || document? 
||
|| [http://issues.apache.org/bugzilla/show_bug.cgi?id=35703 35703] || 
!TilesUtilImpl doInclude() should call !TilesRequestProcessor doInclude()... 
but it doesn't || tiles ||  WONTFIX ||
|| [http://issues.apache.org/bugzilla/show_bug.cgi?id=37817 37817] || !TagUtils 
doesn't create XHTML compliant URLs when called from !LinkTag when using 
forwards defined with redirect="true" || taglib || ||
|| [http://issues.apache.org/bugzilla/show_bug.cgi?id=37995 37995] || Hanging 
Fileupload in Large Input JSP || fileupload|| ||
|| [http://issues.apache.org/bugzilla/show_bug.cgi?id=38007 38007] || duplicate 
processing instructions when using jspx || tiles || ||
|| [http://issues.apache.org/bugzilla/show_bug.cgi?id=38191 38191] || Fix 
Min/Max Length Validator for different line endings || validator || Needs 
Valdiator 1.2.1 release ||
|| [http://issues.apache.org/bugzilla/show_bug.cgi?id=38460 38460] || 
forwardPattern implementation missing || action || ||

== Preparation Checklist ==

|| '''#''' || '''Description''' || '''Status''' ||
|| 1. || Announce plan to dev@ list; link from roadmap page ||  ||
|| 2. || Review/Resolve Outstanding Bugs ||  ||
|| 3. || Update Release Notes ||  ||
|| 4. || Check Dependencies ||  ||
|| 5. || Update to version 1.2.9 build.xml, project.xml, and the MANIFEST.MF || 
 ||

The Commons [http://jakarta.apache.org/commons/releases/prepare.html 
Preparation Guide] is a helpful preparation backgrounder, but Commons
uses the "beta/release-candidate/final" process.

Likewise, the [http://httpd.apache.org/dev/release.html HTTPD Release 
Guidelines] is a helpful "overall process" backgrounder,
but HTTPD does not use a test-build stage.

Dependency versions for this release:

|| '''Dependency''' || '''Version''' || '''Status''' ||'''Used In''' ||
|| Antlr || 2.7.2 || Released || Struts Validator ||
|| Commons !BeanUtils || 1.7.0 || Released || core (!ActionServlet, 
configuration, !DynaActionForm) ||
|| Commons Digester || 1.6 || Released || core (!ActionServlet, configuration) 
||
|| Commons !FileUpload || 1.0 || Released || Struts Upload ||
|| Commons Logging || 1.0.4 || Released || core (logging all over) ||
|| Commons Validator || 1.1.4 || Released || Struts Validator ||
|| Jakarta Oro || 2.0.7 || Released || Commons Validator ||

== Testing Checklist ==

=== Testing Summary ===

|| '''#''' || '''Description''' || '''Completed''' ||
|| 1. || Run Unit Test targets  ||  ||
|| 2. || Run Cactus Tests (see below) ||  ||
|| 3. || Play test bundled applications (TC 5.0.x) ||  ||

TODO: A Canoo !WebTest for the applications would be great!

=== Cactus Tests ===

|| '''#''' || '''J2SE Version''' || '''Tomcat Version''' ||  '''Status''' ||
|| 1. || J2SE 1.3.1_04 || Tomcat 4.1.30 ||  ||
|| 2. || J2SE 1.4.2_07 || Tomcat 4.1.30 ||  ||
|| 3. || J2SE 1.3.1_04 || Tomcat 5.0.28 ||  ||
|| 4. || J2SE 1.4.2_07 || Tomcat 5.0.28 ||  ||

== Test Build Checklist (A) ==

See also Commons [http://jakarta.apache.org/commons/releases/release.html 
Step-by-Step Guide]

|| '''#''' || '''Description''' || '''Completed''' ||
|| A1. || Tag release in svn: STRUTS_1_2_9 ||  ||
|| A2. || Check out a clean copy using the tag created in A1 and and run 
Distribution Target ||  ||
|| A3. || Upload Distribution to 
cvs.apache.org:/www/cvs.apache.org/dist/struts/v1.2.9 ||  ||
|| A4. || Post release-quality vote on d

DO NOT REPLY [Bug 38343] - [extras] ParameterListActionDispatcher

2006-03-07 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38343





--- Additional Comments From [EMAIL PROTECTED]  2006-03-07 18:07 ---
(In reply to comment #14)
> How about adding the parameter list to the constructor, so you would do 
> something like...
> 
> private ActionDispatcher dispatcher
> = new ParameterListActionDispatcher(this,
>   "save,back,recalc=recalculate,default=save");

How about not having struts-config.xml at all? Supposedly, the config file
provides some sort of external configuration, so using "parameter" is in line
with that. In Struts Dialogs library 1.x the configuration was initially done in
an action class, but users asked for externalizing it to action mapping. I don't
know what is real value in this, but they say that webapp structure can be
easily observed by looking at config file. In case of
ParameterListActionDispatcher this requirement is satisfied.

I am pretty happy with the way ParameterListActionDispatcher is configured right
now.

(In reply to comment #15)
> OK heres another thought. What about the dispatcher using reflection to find 
> methods (with correct signature) automatically - no config needed at all. The 
> only thing that doesn't provide is the "obfuscate" facility - so maybe that 
> could be an optional extra - configure in the Action's constructor as in my 
> previous example?

Stripes framework does that.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 38343] - [extras] ParameterListActionDispatcher

2006-03-07 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38343





--- Additional Comments From [EMAIL PROTECTED]  2006-03-07 17:22 ---
OK heres another thought. What about the dispatcher using reflection to find 
methods (with correct signature) automatically - no config needed at all. The 
only thing that doesn't provide is the "obfuscate" facility - so maybe that 
could be an optional extra - configure in the Action's constructor as in my 
previous example?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 38343] - [extras] ParameterListActionDispatcher

2006-03-07 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38343





--- Additional Comments From [EMAIL PROTECTED]  2006-03-07 17:17 ---
The one thing I don't understand about this is why it is configured through the 
ActionMapping's parameter?

The method names in the Action can't be configured so the only value I could 
see is if the Action is reused and you wanted to "obfuscate" in a different way 
for different mappings. But I don't really see much need for that.

How about adding the parameter list to the constructor, so you would do 
something like...

private ActionDispatcher dispatcher
= new ParameterListActionDispatcher(this,
  "save,back,recalc=recalculate,default=save");

or maybe add methods...

  public class FooAction extends Action {

private ParameterListActionDispatcher dispatcher
= new ParameterListActionDispatcher(this);

public FooAction() {
dispatcher.addMethodParam("save");
dispatcher.addMethodParam("back");
dispatcher.addMethodParam("recalc", "recalculate");
dispatcher.addDefaultParam("save");
}

  }

...or perhaps both.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 35703] - [tiles] TilesUtilImpl doInclude() should call TilesRequestProcessor doInclude()... but it doesn't

2006-03-07 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35703


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WONTFIX




--- Additional Comments From [EMAIL PROTECTED]  2006-03-07 15:49 ---
(In reply to comment #20)
> I can't see a different way to get this done without changing much of Tiles/
> Struts integration.
> And I'm not sure it's worth the effort since the problem should disappear as 
> from release 1.3.x.

OK so the conclusion we're agreed on is that it isn't going to get fixed in 
1.2.x - so closing this as WONTFIX.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 38388] - The added by should have a modifiable style

2006-03-07 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38388


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WONTFIX




--- Additional Comments From [EMAIL PROTECTED]  2006-03-07 15:42 ---
I assume my suggested solution was acceptable, so closing this as WONTFIX.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 37685] - Javascript tag does not work on Mozilla

2006-03-07 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37685


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Additional Comments From [EMAIL PROTECTED]  2006-03-07 15:41 ---
Change of mind, I've fixed this in the trunk and 1.2 branch:

http://svn.apache.org/viewcvs?rev=383907&view=rev
http://svn.apache.org/viewcvs?rev=383908&view=rev

I believe "===" is a Javascript 1.2 feature and we're currently rendering a 
language attribute of "Javascript1.1", so I've implemented a different solution.

The javascript rendered is different depending on the type of operator in use - 
if "stopOnFirstError" is true (i.e. && in use) it just returns the 
formValidationResult variable. If "stopOnFirstError" is false(i.e. & in use) it 
returns (formValidationResult == 1).

Closing as FIXED.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r383909 - /struts/action/branches/STRUTS_1_2_BRANCH/doc/userGuide/release-notes.xml

2006-03-07 Thread niallp
Author: niallp
Date: Tue Mar  7 07:37:20 2006
New Revision: 383909

URL: http://svn.apache.org/viewcvs?rev=383909&view=rev
Log:
Update release notes for bug 37685

Modified:
struts/action/branches/STRUTS_1_2_BRANCH/doc/userGuide/release-notes.xml

Modified: 
struts/action/branches/STRUTS_1_2_BRANCH/doc/userGuide/release-notes.xml
URL: 
http://svn.apache.org/viewcvs/struts/action/branches/STRUTS_1_2_BRANCH/doc/userGuide/release-notes.xml?rev=383909&r1=383908&r2=383909&view=diff
==
--- struts/action/branches/STRUTS_1_2_BRANCH/doc/userGuide/release-notes.xml 
(original)
+++ struts/action/branches/STRUTS_1_2_BRANCH/doc/userGuide/release-notes.xml 
Tue Mar  7 07:37:20 2006
@@ -41,6 +41,13 @@
  

  

  2006-03-07

+ http://svn.apache.org/viewcvs.cgi?rev=383907&view=rev";>383907

+ (http://svn.apache.org/viewcvs?rev=383908&view=rev";>383908)

+ http://issues.apache.org/bugzilla/show_bug.cgi?id=37685";>37685

+ Javascript tag does not work on Mozilla.

+ 

+ 

+ 2006-03-07

  http://svn.apache.org/viewcvs.cgi?rev=383718&view=rev";>383718

  (http://svn.apache.org/viewcvs?rev=383720&view=rev";>383720)

  http://issues.apache.org/bugzilla/show_bug.cgi?id=38749";>38749




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r383908 - /struts/action/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/taglib/html/JavascriptValidatorTag.java

2006-03-07 Thread niallp
Author: niallp
Date: Tue Mar  7 07:33:42 2006
New Revision: 383908

URL: http://svn.apache.org/viewcvs?rev=383908&view=rev
Log:
Port Fix for Bug 37685 to 1.2.x branch - Javascript tag does not work on 
Mozilla - reported by Philippe Mouawad.

Changed the javascript rendered so that it just returns formValidationResult if 
the "&&" operators are used (stopOnFirstError is true) or (formValidationResult 
== 1) if the bitwise (i.e. "&") operator is used (stopOnFirstError is false).

Also added braces to the if statement and tidied up the indentation.

Modified:

struts/action/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/taglib/html/JavascriptValidatorTag.java

Modified: 
struts/action/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/taglib/html/JavascriptValidatorTag.java
URL: 
http://svn.apache.org/viewcvs/struts/action/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/taglib/html/JavascriptValidatorTag.java?rev=383908&r1=383907&r2=383908&view=diff
==
--- 
struts/action/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/taglib/html/JavascriptValidatorTag.java
 (original)
+++ 
struts/action/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/taglib/html/JavascriptValidatorTag.java
 Tue Mar  7 07:33:42 2006
@@ -766,34 +766,33 @@
 if (!this.isXhtml() && "true".equals(htmlComment)) {
 sb.append(HTML_BEGIN_COMMENT);
 }
-sb.append("\n var bCancel = false; \n\n");
+sb.append("\nvar bCancel = false; \n\n");
 
-if (methodName == null || methodName.length() == 0) {
-sb.append(
-"function validate"
-+ name
-+ "(form) {
   \n");
+if ((methodName == null) || (methodName.length() == 0)) {
+sb.append("function validate" + name + "(form) { \n");
 } else {
-sb.append(
-"function "
-+ methodName
-+ "(form) {
   \n");
+sb.append("function " + methodName + "(form) { \n");
 }
-sb.append("if (bCancel) \n");
-sb.append("  return true; \n");
-sb.append("else \n");
+
+sb.append("if (bCancel) { \n");
+sb.append("return true; \n");
+sb.append("} else { \n");
 
 // Always return true if there aren't any Javascript validation methods
-if (methods == null || methods.length() == 0) {
-sb.append("   return true; \n");
+if ((methods == null) || (methods.length() == 0)) {
+sb.append("return true; \n");
 } else {
-//Making Sure that Bitwise operator works:
-sb.append(" var formValidationResult;\n");
-sb.append("   formValidationResult = " + methods + "; \n");
-sb.append(" return (formValidationResult == 1);\n");
+sb.append("var formValidationResult; \n");
+sb.append("formValidationResult = " + methods + "; 
\n");
+if (methods.indexOf("&&") >= 0) {
+sb.append("return (formValidationResult); \n");
+} else {
+//Making Sure that Bitwise operator works:
+sb.append("return (formValidationResult == 1); 
\n");
+}
 }
-
-sb.append("   } \n\n");
+sb.append("} \n");
+sb.append("} \n\n");
 
 return sb.toString();
 }



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r383907 - /struts/taglib/trunk/src/java/org/apache/struts/taglib/html/JavascriptValidatorTag.java

2006-03-07 Thread niallp
Author: niallp
Date: Tue Mar  7 07:32:06 2006
New Revision: 383907

URL: http://svn.apache.org/viewcvs?rev=383907&view=rev
Log:
Fix for Bug 37685 - Javascript tag does not work on Mozilla - reported by 
Philippe Mouawad.

Changed the javascript rendered so that it just returns formValidationResult if 
the "&&" operators are used (stopOnFirstError is true) or (formValidationResult 
== 1) if the bitwise (i.e. "&") operator is used (stopOnFirstError is false).

Also added braces to the if statement and tidied up the indentation.

Modified:

struts/taglib/trunk/src/java/org/apache/struts/taglib/html/JavascriptValidatorTag.java

Modified: 
struts/taglib/trunk/src/java/org/apache/struts/taglib/html/JavascriptValidatorTag.java
URL: 
http://svn.apache.org/viewcvs/struts/taglib/trunk/src/java/org/apache/struts/taglib/html/JavascriptValidatorTag.java?rev=383907&r1=383906&r2=383907&view=diff
==
--- 
struts/taglib/trunk/src/java/org/apache/struts/taglib/html/JavascriptValidatorTag.java
 (original)
+++ 
struts/taglib/trunk/src/java/org/apache/struts/taglib/html/JavascriptValidatorTag.java
 Tue Mar  7 07:32:06 2006
@@ -752,31 +752,33 @@
 sb.append(HTML_BEGIN_COMMENT);
 }
 
-sb.append("\n var bCancel = false; \n\n");
+sb.append("\nvar bCancel = false; \n\n");
 
 if ((methodName == null) || (methodName.length() == 0)) {
-sb.append("function validate" + name
-+ "(form) {
   \n");
+sb.append("function validate" + name + "(form) { \n");
 } else {
-sb.append("function " + methodName
-+ "(form) {
   \n");
+sb.append("function " + methodName + "(form) { \n");
 }
 
-sb.append("if (bCancel) \n");
-sb.append("  return true; \n");
-sb.append("else \n");
+sb.append("if (bCancel) { \n");
+sb.append("return true; \n");
+sb.append("} else { \n");
 
 // Always return true if there aren't any Javascript validation methods
 if ((methods == null) || (methods.length() == 0)) {
-sb.append("   return true; \n");
+sb.append("return true; \n");
 } else {
-//Making Sure that Bitwise operator works:
-sb.append(" var formValidationResult;\n");
-sb.append("   formValidationResult = " + methods + "; \n");
-sb.append(" return (formValidationResult == 1);\n");
+sb.append("var formValidationResult; \n");
+sb.append("formValidationResult = " + methods + "; 
\n");
+if (methods.indexOf("&&") >= 0) {
+sb.append("return (formValidationResult); \n");
+} else {
+//Making Sure that Bitwise operator works:
+sb.append("return (formValidationResult == 1); 
\n");
+}
 }
-
-sb.append("   } \n\n");
+sb.append("} \n");
+sb.append("} \n\n");
 
 return sb.toString();
 }



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r383903 - in /struts/sandbox/trunk/overdrive/Nexus: Core/KeyValue.cs Web/GridControl.ascx.cs

2006-03-07 Thread husted
Author: husted
Date: Tue Mar  7 07:10:25 2006
New Revision: 383903

URL: http://svn.apache.org/viewcvs?rev=383903&view=rev
Log:
OVR-11
* GridContrl - Add an extension point so that subclasses can adjust the 
presentation according to whether there are items to list.

Modified:
struts/sandbox/trunk/overdrive/Nexus/Core/KeyValue.cs
struts/sandbox/trunk/overdrive/Nexus/Web/GridControl.ascx.cs

Modified: struts/sandbox/trunk/overdrive/Nexus/Core/KeyValue.cs
URL: 
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Nexus/Core/KeyValue.cs?rev=383903&r1=383902&r2=383903&view=diff
==
--- struts/sandbox/trunk/overdrive/Nexus/Core/KeyValue.cs (original)
+++ struts/sandbox/trunk/overdrive/Nexus/Core/KeyValue.cs Tue Mar  7 07:10:25 
2006
@@ -30,7 +30,7 @@
/// 

/// Use this field for the DataValueField (sic).

/// 

-   public static const string KEY = "Key";

+   public const string KEY = "Key";

 

/// 

/// Expose name of "Value" field.

@@ -38,7 +38,7 @@
/// 

/// Use this field for the DataTextField (sic).

/// 

-   public static const string VALUE= "Value";

+   public const string VALUE= "Value";

 

public KeyValue()

{


Modified: struts/sandbox/trunk/overdrive/Nexus/Web/GridControl.ascx.cs
URL: 
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Nexus/Web/GridControl.ascx.cs?rev=383903&r1=383902&r2=383903&view=diff
==
--- struts/sandbox/trunk/overdrive/Nexus/Web/GridControl.ascx.cs (original)
+++ struts/sandbox/trunk/overdrive/Nexus/Web/GridControl.ascx.cs Tue Mar  7 
07:10:25 2006
@@ -775,7 +775,24 @@
public int ItemThru;

public int ItemCount;

}

-

+   

+   /// 

+   /// Optional extension point so that subclasses can make 
adjustments 

+   /// based on whether there are items to display or not. 

+   /// 

+   /// 

+   /// The classic use case for this method is to turn off the 
Grid 

+   /// if there are not any items to display in the Grid. 

+   /// In this case, if this control is used more than once in an 
enclosing 

+   /// page or control, then the Grid should be toggled on or off 
for 

+   /// each instance (Visible = isItems);

+   /// 

+   /// True if there are 1 or more items to 
display

+   public virtual void ListPageIndexChanged_IsItems(bool isItems)

+   {

+   // Override to provide functionalilty   

+   }

+   

/// 

/// Lookup the PAGE_INDEX_HINT or the NOT_FOUND_HINT in the 
application 

/// message resources, and return as a formatted string. 

@@ -783,22 +800,17 @@
/// Our ListPageIndexChangedArgs with the 
page index values

/// Formatted message string ready to markup and 
present

/// 

-   public string 
ListPageIndexChanged_Message(ListPageIndexChangedArgs args)

+   public virtual string 
ListPageIndexChanged_Message(ListPageIndexChangedArgs args)

{

+   bool isItems = (args.ItemCount > 0);

+   ListPageIndexChanged_IsItems(isItems);

+

string[] m_args = new string[3];

m_args[0] = Convert.ToString(args.ItemFrom);

m_args[1] = Convert.ToString(args.ItemThru);

m_args[2] = Convert.ToString(args.ItemCount);

 

-   string text;

-   if (args.ItemCount == 0)

-   {

-   text = GetMessage(NOT_FOUND_HINT);

-   }

-   else

-   {

-   text = GetMessage(PAGE_INDEX_HINT, m_args);

-   }

+   string text = isItems ? GetMessage(PAGE_INDEX_HINT, 
m_args) : GetMessage(NOT_FOUND_HINT);

return text;

}

 




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[Struts Wiki] Update of "AjaxStruts" by RoryWinston

2006-03-07 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Struts Wiki" for change 
notification.

The following page has been changed by RoryWinston:
http://wiki.apache.org/struts/AjaxStruts

--
  
  Thanks to James Garnett at Adaptive Path for these pics, 
url:http://www.adaptivepath.com/publications/essays/archives/000385.php
  
+ There is also a blog entry dealing with an Ajax/Struts approach here: 
url:http://www.researchkitchen.co.uk/blog/archives/60
+ 
  It is worth noting that AJAX is not a specific technology implementation, it 
is an approach, a technique, a way of looking at things.  While it is true that 
the use of XMLHttpRequest sending and receiving XML is the generally accepted 
way to do AJAX-like things, it is not the only way.  While the above diagrams 
are accurate, they do not reflect this.  No one should be under the impression 
that you have to deal in XML or that you have to use the XMLHttpRequest object 
at all, contrary to the meaning of the AJAX moniker :) (one could argue it 
isn't called AJAX at that point, but that is a debate for another day!)
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 37685] - Javascript tag does not work on Mozilla

2006-03-07 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37685





--- Additional Comments From [EMAIL PROTECTED]  2006-03-07 13:48 ---
I tried this in Mozilla 1.7.12 with the struts-examples webapp and couldn't 
reproduce it - once all valid values were entered the Javascript validation 
succeeded.

I then tried your example, as you say, it showed "false" for (test == 1) - but 
when I pasted your example into the struts validation function though, it 
showed "true". After playing around a while I found that I could reproduce 
this issue in the validation function if I removed type="text/javascript" from 
the 

RE: [Shale] Dialogs

2006-03-07 Thread Matthias Wessendorf
any progress on this right now?

-Matthias 

> -Original Message-
> From: Matthias Wessendorf [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, January 31, 2006 7:33 PM
> To: Struts Developers List
> Subject: Re: [Shale] Dialogs
> 
> > I attached my clazz to jira.
> 
> nevermind,
> 
> bugzilla...
> 
> http://issues.apache.org/bugzilla/show_bug.cgi?id=38298
> 
> 
> -Matthias
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED] For 
> additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r383868 - in /struts/sandbox/trunk/action2/apps/cookbook/src/webapp/pages/input: Input.jsp InputResult.jsp

2006-03-07 Thread husted
Author: husted
Date: Tue Mar  7 04:51:37 2006
New Revision: 383868

URL: http://svn.apache.org/viewcvs?rev=383868&view=rev
Log:
Action2 Cookbook 
* Remove references to RichTextEditor for now. It's not working for me, and 
there might be licensing issues anyway. 

Modified:
struts/sandbox/trunk/action2/apps/cookbook/src/webapp/pages/input/Input.jsp

struts/sandbox/trunk/action2/apps/cookbook/src/webapp/pages/input/InputResult.jsp

Modified: 
struts/sandbox/trunk/action2/apps/cookbook/src/webapp/pages/input/Input.jsp
URL: 
http://svn.apache.org/viewcvs/struts/sandbox/trunk/action2/apps/cookbook/src/webapp/pages/input/Input.jsp?rev=383868&r1=383867&r2=383868&view=diff
==
--- struts/sandbox/trunk/action2/apps/cookbook/src/webapp/pages/input/Input.jsp 
(original)
+++ struts/sandbox/trunk/action2/apps/cookbook/src/webapp/pages/input/Input.jsp 
Tue Mar  7 04:51:37 2006
@@ -1,4 +1,4 @@
-<%@ taglib prefix="ww" uri="/webwork" %>
+<[EMAIL PROTECTED] prefix="ww" uri="/webwork" %>
 
 
 UI Tags Example
@@ -107,13 +107,7 @@
doubleEmptyOption="true"
doubleMultiple="true" />
 
-
-
-
+
 
 
 

Modified: 
struts/sandbox/trunk/action2/apps/cookbook/src/webapp/pages/input/InputResult.jsp
URL: 
http://svn.apache.org/viewcvs/struts/sandbox/trunk/action2/apps/cookbook/src/webapp/pages/input/InputResult.jsp?rev=383868&r1=383867&r2=383868&view=diff
==
--- 
struts/sandbox/trunk/action2/apps/cookbook/src/webapp/pages/input/InputResult.jsp
 (original)
+++ 
struts/sandbox/trunk/action2/apps/cookbook/src/webapp/pages/input/InputResult.jsp
 Tue Mar  7 04:51:37 2006
@@ -1,5 +1,4 @@
 <[EMAIL PROTECTED] prefix="ww" uri="/webwork" %>
-
 
 
 Showcase - Non-UI Tag - Example Submited 
@@ -36,7 +35,6 @@



-   
 
 
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]