You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2006/01/21 18:34:39 UTC
DO NOT REPLY [Bug 38343] New: - Enhanced MappingDispatchAction
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38343>.
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
Summary: Enhanced MappingDispatchAction
Product: Struts
Version: Unknown
Platform: Other
OS/Version: other
Status: NEW
Severity: normal
Priority: P2
Component: Extras
AssignedTo: dev@struts.apache.org
ReportedBy: paul4christ79@yahoo.com
The attached ParameterMappingDispatchAction class is a proposed enhancement to
MappingDispatchAction either as a subclass or a direct replacement. Here are the
added benefits:
1) For a form with multiple buttons, the parameter attribute can contain a list
of appropriate methods to iterate for a match. These methods are matched against
incoming request parameters (as well as button .x/.y suffixes). For security
reasons, a developer may want to limit which methods to invoke for a particular
mapping, unlike DispatchAction which will match any existing method.
<action ... parameter="save,apply,back"/>
2) ParameterMappingDispatchAction provided the ability to also obfuscate method
names, and so does this by providing a key=value mapping. The key will be the
request parameter name and the value the method name.
<action ... parameter="save,apply=saveAndReturn,back=goBack"/>
3) Sometimes the user presses Enter to submit the form and no button is
explicitly submitted. When this case is important to catch, the action may
invoke the "default" method if nothing matches. In this example, the default is
to save.
<action ... parameter="save,apply,back,default=save"/>
4) When only one method is listed, the method returns it to equal functionality
to MappingDispatchAction.
<action ... parameter="save"/>
--
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: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
DO NOT REPLY [Bug 38343] - Enhanced MappingDispatchAction
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38343>.
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 paul4christ79@yahoo.com 2006-02-12 08:05 -------
Can a committer consider this for 1.2.x or 1.3.0 before you roll it? It's
glaringly simple and is a needed addition.
--
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: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
DO NOT REPLY [Bug 38343] - [extras] ParameterListActionDispatcher
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38343>.
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 niallp@apache.org 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: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
DO NOT REPLY [Bug 38343] - [extras] ParameterListActionDispatcher
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38343>.
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 niallp@apache.org 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: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
DO NOT REPLY [Bug 38343] - Enhanced MappingDispatchAction
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38343>.
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 paul4christ79@yahoo.com 2006-01-21 18:35 -------
Created an attachment (id=17472)
--> (http://issues.apache.org/bugzilla/attachment.cgi?id=17472&action=view)
Proposed enhancement
--
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: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
DO NOT REPLY [Bug 38343] - [extras] ParameterListActionDispatcher
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38343>.
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 niallp@apache.org 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: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
DO NOT REPLY [Bug 38343] - [extras] ParameterListActionDispatcher
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38343>.
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
paul4christ79@yahoo.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Version|Unknown |1.3.0
------- Additional Comments From paul4christ79@yahoo.com 2006-02-28 21:10 -------
I have included two proposals: ParameterMappingDispatchAction (older) and
ParameterListActionDispatcher (newer). The second one I strongly prefer and use
myself, but I understand there that there are some differences in design
philosophy among the Struts developers.
It is my opinion that having multiple action implementations *just* for
controlling dispatching is inelegant. When it comes to team development in which
there may be a shared base class, but different types of dispatching is wanted
per use case, the two requirements conflict and cannot be reconciled easily.
Hence, I think the ActionDispatcher class in Struts 1.2.7 solves this problem by
separating the Action from its dispatch methodology. This cleanly allows
everyone to subclass from one Action and choose the type of dispatching as needed.
I recommend this is "the way to go" (as it is the correct design pattern) and,
furthermore, no more XXXXDispatchAction classes should be considered. Having
XXXXDispatchAction classes are convienent -- no doubt -- but I really believe
these two philosophies are at right edges.
You could create subclasses for every new ActionDispatcher that comes along, but
that should be, imo, a private developer decision and not supported with custom
classes in Struts.
--
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: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
DO NOT REPLY [Bug 38343] - [extras] ParameterListActionDispatcher
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38343>.
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 paul4christ79@yahoo.com 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: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
DO NOT REPLY [Bug 38343] - Enhanced MappingDispatchAction
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38343>.
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 jmikus@gmail.com 2006-02-10 03:04 -------
(In reply to comment #4)
> This is interesting. I did not write this class with the intention of creating a
> rendering phase (parameter present) and a view phase (parameter absent), but I
> suppose it could be leverage for such a task. You're probably more suited to
> come up with a living example of this -- and I would like to see it
I have one ;-) I was thinking about putting it in new version of Struts Dialogs
(which is 1.25), but now I think I will start a new major version number,
because I can throw away at least half of my code. This will break
compatibility, so I will have to support two major versions, but I cannot help
it, I like your solution so much :)
> -- but I am
> not sure if I want to add a "getView" method on this. Perhaps that's an
> implementation that could come from a subclass, and that's what I'd actually
> prefer as I think about your suggestion.
I agree. After all, not everybody does things like me ;)
> As you know the default is to return null if it can't find any match. Because
> this is a 2nd generation subclass of DispatchAction, I think the "unspecified"
> method is called but it's not directly by this.
Right, that is what I meant: to have default unspecified() that would call
default and empty getView(). If a user of this class overrides unspecified(),
then he will not be bothered about getView() stuff. If the user overrides
neither unspecified() nor getView(), then default getView() would throw
exception like unspecifed() throws now (it does, does it?)
But you may be right, this clutters things up, adding nothing more but semantic
icing. I will be quite happy having just unspecified() for my no-param render phase.
--
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: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
DO NOT REPLY [Bug 38343] - [extras] ParameterListActionDispatcher
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38343>.
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 paul4christ79@yahoo.com 2006-02-28 21:13 -------
Ooops. Wrong last paragraph. It should read:
You could create new XXXXDispatchAction subclass for every new methodology that
comes along, but that should be, imo, a private developer decision and not
supported with custom Action subclasses in Struts.
--
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: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
DO NOT REPLY [Bug 38343] - [extras] ParameterListActionDispatcher
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38343>.
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 niallp@apache.org 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: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
DO NOT REPLY [Bug 38343] - ParameterListActionDispatcher
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38343>.
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 paul4christ79@yahoo.com 2006-02-23 01:01 -------
You make a good point. I don't know what to do about this though. Nothing
prevents a person from taking ActionDispatcher by itself and using it on its
own. It was introduced in 1.2.7, but it is independent of it.
--
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: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
DO NOT REPLY [Bug 38343] - [extras] ParameterListActionDispatcher
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38343>.
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 niallp@apache.org 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: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
DO NOT REPLY [Bug 38343] - [extras] ParameterListActionDispatcher
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38343>.
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
wsmoak@apache.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|ParameterListActionDispatche|[extras]
|r |ParameterListActionDispatche
| |r
--
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: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
DO NOT REPLY [Bug 38343] - Enhanced MappingDispatchAction
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38343>.
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
wsmoak@apache.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
--
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: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
DO NOT REPLY [Bug 38343] - Enhanced MappingDispatchAction
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38343>.
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 jmikus@gmail.com 2006-02-09 23:47 -------
(In reply to comment #0)
I like this extension a lot. This is truly a nicer, more compact and elegant
solution comparing to SelectAction that I suggested in bug #30292. I would like
this extension to be included into 1.3, and bug #30292 marked as non relevant
anymore. I can create appropriate tests for it.
This action allows to build event-driven two-phase actions easily. If a request
contains one of the parameters listed in "parameter" attribute, then this
request identifies an input phase, and appropriate handler is called.
Otherwise the request identifes a render phase (say, a user navigated to an URL
or pressed "reload" button). In this case "unspecified" method is called, which
would display a view corresponding to current resource state (if the
corresponding action form is stateful, of course).
We can create an empty method that we call something like "getView". This method
would be called from existing "unspecified" method for compatibility purposes.
"getView" will do nothing more fancy than "unspecified" can do, but new name
will bring new semantics to the dispatch class, meaning that if request does not
contain a legitimate event, the resource is simply rerendered. This will
encourage a shift from pre- and post- actions mindset to webresource-based mindset.
Paul, great stuff!
--
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: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
DO NOT REPLY [Bug 38343] - [extras] ParameterListActionDispatcher
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38343>.
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 niallp@apache.org 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: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
DO NOT REPLY [Bug 38343] - [extras] ParameterListActionDispatcher
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38343>.
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 niallp@apache.org 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: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
DO NOT REPLY [Bug 38343] - [extras] ParameterListActionDispatcher
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38343>.
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 niallp@apache.org 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: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
DO NOT REPLY [Bug 38343] - [extras] ParameterListActionDispatcher
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38343>.
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 paul4christ79@yahoo.com 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: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
DO NOT REPLY [Bug 38343] - Enhanced MappingDispatchAction
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38343>.
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 paul4christ79@yahoo.com 2006-02-10 01:20 -------
>From comment #3: Otherwise the request identifes a render phase (say, a user
navigated to an URL or pressed "reload" button). In this case "unspecified"
method is called, which would display a view corresponding to current resource
state (if the corresponding action form is stateful, of course).
This is interesting. I did not write this class with the intention of creating a
rendering phase (parameter present) and a view phase (parameter absent), but I
suppose it could be leverage for such a task. You're probably more suited to
come up with a living example of this -- and I would like to see it -- but I am
not sure if I want to add a "getView" method on this. Perhaps that's an
implementation that could come from a subclass, and that's what I'd actually
prefer as I think about your suggestion.
As you know the default is to return null if it can't find any match. Because
this is a 2nd generation subclass of DispatchAction, I think the "unspecified"
method is called but it's not directly by this.
--
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: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
DO NOT REPLY [Bug 38343] - Enhanced MappingDispatchAction
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38343>.
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
paul4christ79@yahoo.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #17485|0 |1
is obsolete| |
------- Additional Comments From paul4christ79@yahoo.com 2006-02-17 09:32 -------
Created an attachment (id=17722)
--> (http://issues.apache.org/bugzilla/attachment.cgi?id=17722&action=view)
Proposed Class
This class will replace my subclass of Action and deprecate the older
attachments. I have refactored out the dispatching code as a subclass of
ActionDispatcher.
While I do find it strange that ActionDispatcher contains flavors, the javadocs
also mention places for overriding behavior. Therefore I find it appropriate to
subclass ActionDispatcher rather than try to squeeze more bang-for-the-buck
into it. It's easier to manage in the long run.
PS: Niall and Hubert, thanks for the refactoring! I think the delegation is a
great design pattern and should help the stop the proflieration of Action
subclasses just to customize the dispatch.
--
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: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
DO NOT REPLY [Bug 38343] - ParameterListActionDispatcher
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38343>.
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 jmikus@gmail.com 2006-02-22 20:20 -------
(In reply to comment #7)
I suggest to refactor ParameterListActionDispatcher so it could be bolted on
older Struts versions. Currently ParameterListActionDispatcher derives from
ActionDispatcher which was introduced only in Struts 1.2.7. It would be nice if
users of older versions could simply download this class and use it as is,
without having to dowload something else and without explaining to their
managers why they need to upgrade to newer version.
I would also prefer a fancier name like EventDispatcher. Such a name would plant
an idea in peoples' minds that Struts can have events after all ;)
--
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: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
DO NOT REPLY [Bug 38343] - [extras] ParameterListActionDispatcher
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38343>.
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 paul4christ79@yahoo.com 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: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
DO NOT REPLY [Bug 38343] - [extras] ParameterListActionDispatcher
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38343>.
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 niallp@apache.org 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: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
DO NOT REPLY [Bug 38343] - [extras] ParameterListActionDispatcher
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38343>.
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 jmikus@gmail.com 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: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
DO NOT REPLY [Bug 38343] - [extras] ParameterListActionDispatcher
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38343>.
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 jmikus@gmail.com 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: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
DO NOT REPLY [Bug 38343] - ParameterListActionDispatcher
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38343>.
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
paul4christ79@yahoo.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #17723|0 |1
is obsolete| |
------- Additional Comments From paul4christ79@yahoo.com 2006-02-17 09:43 -------
Created an attachment (id=17724)
--> (http://issues.apache.org/bugzilla/attachment.cgi?id=17724&action=view)
Proposed Class
Updated constructors.
--
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: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
DO NOT REPLY [Bug 38343] - ParameterListActionDispatcher
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38343>.
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
paul4christ79@yahoo.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Enhanced |ParameterListActionDispatche
|MappingDispatchAction |r
--
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: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
DO NOT REPLY [Bug 38343] - [extras] ParameterListActionDispatcher
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38343>.
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
niallp@apache.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Additional Comments From niallp@apache.org 2006-03-10 01:53 -------
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: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
DO NOT REPLY [Bug 38343] - Enhanced MappingDispatchAction
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38343>.
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
paul4christ79@yahoo.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #17472|0 |1
is obsolete| |
------- Additional Comments From paul4christ79@yahoo.com 2006-01-22 19:39 -------
Created an attachment (id=17485)
--> (http://issues.apache.org/bugzilla/attachment.cgi?id=17485&action=view)
Proposed enhancement
No code changes. Updated JavaDoc.
--
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: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
DO NOT REPLY [Bug 38343] - [extras] ParameterListActionDispatcher
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38343>.
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 jmikus@gmail.com 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: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
DO NOT REPLY [Bug 38343] - Enhanced MappingDispatchAction
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38343>.
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
paul4christ79@yahoo.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #17722|0 |1
is obsolete| |
------- Additional Comments From paul4christ79@yahoo.com 2006-02-17 09:36 -------
Created an attachment (id=17723)
--> (http://issues.apache.org/bugzilla/attachment.cgi?id=17723&action=view)
Proposed Class
Re-arranged javadoc to have a more natural order of reading.
--
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: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
DO NOT REPLY [Bug 38343] - [extras] ParameterListActionDispatcher
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38343>.
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 paul4christ79@yahoo.com 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: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org