You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by draegoon Z <dr...@hotmail.com> on 2005/04/22 12:11:56 UTC
common-controls
Hey guys,
I was just checking out the common-controls website. Quite impressive.
If there isn't already a place, we should be sharing our controls and tiles
templates that we all create anyways. Should be an opensource format for
this stuff.
Would this not be helpful and in the opensource spirit,i.e., not hording our
knowledge to slow technological innovation?
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: common-controls
Posted by Michael Jouravlev <jm...@gmail.com>.
Have you already looked in the Struts wiki?
On 4/22/05, draegoon Z <dr...@hotmail.com> wrote:
> Hey guys,
>
> I was just checking out the common-controls website. Quite impressive.
>
> If there isn't already a place, we should be sharing our controls and tiles
> templates that we all create anyways. Should be an opensource format for
> this stuff.
>
> Would this not be helpful and in the opensource spirit,i.e., not hording our
> knowledge to slow technological innovation?
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Struts 1.3: retrieving commands dynamically from Action
Posted by Hubert Rabago <hr...@gmail.com>.
Marco,
What about still extending BaseAction then using ActionDispatcher?
Attachment http://issues.apache.org/bugzilla/attachment.cgi?id=12768
from http://issues.apache.org/bugzilla/show_bug.cgi?id=31270
Joe,
Yes, yes, I know. It's just that my home machine went offline and
when it got back up I wanted to tackle some other tickets first. :)
Hubert
On 4/22/05, Marco Mistroni <mm...@waersystems.com> wrote:
> Hello all,
> I am writing a small application using struts 1.3
> And commons-chain.
> Currently, I have defined a BaseAction class which retrieves
> Commands dynamically based on the path used
> For example, calling /login will result in the action
> Retrieving the command called /login
> String name = mapping.getPath();
> System.out.println("Retrieving command for action"+ name);
> Command command = catalog.getCommand(name);
>
> That works fine (or eventually can be improved, as suggested here
> http://wiki.apache.org/jakarta-commons/CommonsChainAndSpringFramework
>
> But, what if my action extends DispatchAction?
>
> Best htat I could do was to create a BaseDispatchAction that retrieves
> The command based on the parameter that triggers Dispatch's action
> specific method.
> That results in a code like this :
>
> String name = mapping.getParameter();
> String command = request.getParameter(name);
> Command command = catalog.getCommand(name);
>
> Question: what's the best strategy to use for retrieving commands
> For a DispatchAction?
> Are there better (I hope) alternatives?
>
> Any comments are welcome...
>
> Thanx in advance and regards
> marco
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Struts 1.3 & DispatchAction. command question
Posted by Michael Jouravlev <jm...@gmail.com>.
If you do app for yourself, then I think it is for your liking. If you
want to create a library, then having one method processing all
commands allows you to define only one interface once and for all. On
the other hand, this interace would not define the possible commands,
it will be too flexible.
On 4/22/05, Marco Mistroni <mm...@waersystems.com> wrote:
> Hello,
> In a scenario where I am using a DispatchChainAction
> Where I have n methods, what could be good strategy to use
> With Commons-Chain?
> 1) 1 command per method
> 2) 1 command for all method, where I pass a parameter
> saying what I want to do?
>
> Anyone has any idea?
>
> Thanx and regards
> marco
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: Struts 1.3 & DispatchAction. command question
Posted by Marco Mistroni <mm...@waersystems.com>.
Hello,
In a scenario where I am using a DispatchChainAction
Where I have n methods, what could be good strategy to use
With Commons-Chain?
1) 1 command per method
2) 1 command for all method, where I pass a parameter
saying what I want to do?
Anyone has any idea?
Thanx and regards
marco
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: Struts 1.3: retrieving commands dynamically from Action
Posted by Joe Germuska <Jo...@Germuska.com>.
At 2:55 PM +0100 4/22/05, Marco Mistroni wrote:
>Hello Joe,
> Nothing distasteful, really... it's just that, due
>Struts, actionForms etc , i have been so used NOT to call
>request.getParameter() that
>Now, when I see that code, I don't like it... :-)
Well, I don't like it because I have a suspicion of request-parameter
based dispatch -- but that's been the topic of much discussion on
past threads; if I had a similar case, I would almost certainly use a
dispatch method linked to the ActionMapping and then use JavaScript
to dynamically change my form's submit action. But really, it's a
matter of taste.
Meanwhile, I don't think there's anything so awful about calling
request.getParameter() when you have a request object at hand -- for
simple one parameter situations, I often do that, especially if I'm
going to use the value as a String anyway -- but again, a matter of
taste.
Joe
>Regards,
> marco
>
>-----Original Message-----
>From: Joe Germuska [mailto:Joe@Germuska.com]
>Sent: 22 April 2005 14:28
>To: Marco Mistroni; 'Struts Users Mailing List'
>Subject: Re: Struts 1.3: retrieving commands dynamically from Action
>
>Marco:
>
>I'm not quite sure what you find distasteful about how dispatch
>action is working; is it simply that you think the request parameter
>values are not controlled enough to be good for use as bean names?
>
>Maybe the problem is that you've been caught where the
>DispatchChainAction class hasn't been fully updated for Struts 1.3
>and chain. It was ported in from the struts-chain sandbox
>implementation, but it was never upgraded to deal with the idea of
>multiple catalogs.
>
>I had mostly skipped that because I wasn't sure who was using it, and
>because I have a bit of a sense that a ChainAction is obsolete now
>that you can specify a command directly on an ActionMapping. Maybe
>as we talk through your situation, we can work out whether the right
>solution is to "fix" DispatchChainAction, or to introduce a useful
>generic Command which does what you want.
>
>If this isn't what bothers you about your current solution, please
>clarify. If it is what bothers you, we can work out the possible
>routes.
>
>Joe
>
>
>
>At 1:52 PM +0100 4/22/05, Marco Mistroni wrote:
>>Hello all,
>> I am writing a small application using struts 1.3
>>And commons-chain.
>>Currently, I have defined a BaseAction class which retrieves
>>Commands dynamically based on the path used
>>For example, calling /login will result in the action
>>Retrieving the command called /login
>> String name = mapping.getPath();
>> System.out.println("Retrieving command for action"+ name);
>> Command command = catalog.getCommand(name);
>>
>>That works fine (or eventually can be improved, as suggested here
>>http://wiki.apache.org/jakarta-commons/CommonsChainAndSpringFramework
>>
>>But, what if my action extends DispatchAction?
>>
>>Best htat I could do was to create a BaseDispatchAction that retrieves
>>The command based on the parameter that triggers Dispatch's action
>>specific method.
>>That results in a code like this :
>>
>>String name = mapping.getParameter();
>>String command = request.getParameter(name);
>>Command command = catalog.getCommand(name);
>>
>>
>>Question: what's the best strategy to use for retrieving commands
>>For a DispatchAction?
>>Are there better (I hope) alternatives?
>>
>>Any comments are welcome...
>>
>>Thanx in advance and regards
>> marco
>>
>>
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>For additional commands, e-mail: user-help@struts.apache.org
>
>
>--
>Joe Germuska
>Joe@Germuska.com
>http://blog.germuska.com
>"Narrow minds are weapons made for mass destruction" -The Ex
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>For additional commands, e-mail: user-help@struts.apache.org
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>For additional commands, e-mail: user-help@struts.apache.org
--
Joe Germuska
Joe@Germuska.com
http://blog.germuska.com
"Narrow minds are weapons made for mass destruction" -The Ex
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: Struts 1.3: retrieving commands dynamically from Action
Posted by Marco Mistroni <mm...@waersystems.com>.
Hello Joe,
Nothing distasteful, really... it's just that, due
Struts, actionForms etc , i have been so used NOT to call
request.getParameter() that
Now, when I see that code, I don't like it... :-)
Regards,
marco
-----Original Message-----
From: Joe Germuska [mailto:Joe@Germuska.com]
Sent: 22 April 2005 14:28
To: Marco Mistroni; 'Struts Users Mailing List'
Subject: Re: Struts 1.3: retrieving commands dynamically from Action
Marco:
I'm not quite sure what you find distasteful about how dispatch
action is working; is it simply that you think the request parameter
values are not controlled enough to be good for use as bean names?
Maybe the problem is that you've been caught where the
DispatchChainAction class hasn't been fully updated for Struts 1.3
and chain. It was ported in from the struts-chain sandbox
implementation, but it was never upgraded to deal with the idea of
multiple catalogs.
I had mostly skipped that because I wasn't sure who was using it, and
because I have a bit of a sense that a ChainAction is obsolete now
that you can specify a command directly on an ActionMapping. Maybe
as we talk through your situation, we can work out whether the right
solution is to "fix" DispatchChainAction, or to introduce a useful
generic Command which does what you want.
If this isn't what bothers you about your current solution, please
clarify. If it is what bothers you, we can work out the possible
routes.
Joe
At 1:52 PM +0100 4/22/05, Marco Mistroni wrote:
>Hello all,
> I am writing a small application using struts 1.3
>And commons-chain.
>Currently, I have defined a BaseAction class which retrieves
>Commands dynamically based on the path used
>For example, calling /login will result in the action
>Retrieving the command called /login
> String name = mapping.getPath();
> System.out.println("Retrieving command for action"+ name);
> Command command = catalog.getCommand(name);
>
>That works fine (or eventually can be improved, as suggested here
>http://wiki.apache.org/jakarta-commons/CommonsChainAndSpringFramework
>
>But, what if my action extends DispatchAction?
>
>Best htat I could do was to create a BaseDispatchAction that retrieves
>The command based on the parameter that triggers Dispatch's action
>specific method.
>That results in a code like this :
>
>String name = mapping.getParameter();
>String command = request.getParameter(name);
>Command command = catalog.getCommand(name);
>
>
>Question: what's the best strategy to use for retrieving commands
>For a DispatchAction?
>Are there better (I hope) alternatives?
>
>Any comments are welcome...
>
>Thanx in advance and regards
> marco
>
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>For additional commands, e-mail: user-help@struts.apache.org
--
Joe Germuska
Joe@Germuska.com
http://blog.germuska.com
"Narrow minds are weapons made for mass destruction" -The Ex
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Struts 1.3: retrieving commands dynamically from Action
Posted by Joe Germuska <Jo...@Germuska.com>.
Marco:
I'm not quite sure what you find distasteful about how dispatch
action is working; is it simply that you think the request parameter
values are not controlled enough to be good for use as bean names?
Maybe the problem is that you've been caught where the
DispatchChainAction class hasn't been fully updated for Struts 1.3
and chain. It was ported in from the struts-chain sandbox
implementation, but it was never upgraded to deal with the idea of
multiple catalogs.
I had mostly skipped that because I wasn't sure who was using it, and
because I have a bit of a sense that a ChainAction is obsolete now
that you can specify a command directly on an ActionMapping. Maybe
as we talk through your situation, we can work out whether the right
solution is to "fix" DispatchChainAction, or to introduce a useful
generic Command which does what you want.
If this isn't what bothers you about your current solution, please
clarify. If it is what bothers you, we can work out the possible
routes.
Joe
At 1:52 PM +0100 4/22/05, Marco Mistroni wrote:
>Hello all,
> I am writing a small application using struts 1.3
>And commons-chain.
>Currently, I have defined a BaseAction class which retrieves
>Commands dynamically based on the path used
>For example, calling /login will result in the action
>Retrieving the command called /login
> String name = mapping.getPath();
> System.out.println("Retrieving command for action"+ name);
> Command command = catalog.getCommand(name);
>
>That works fine (or eventually can be improved, as suggested here
>http://wiki.apache.org/jakarta-commons/CommonsChainAndSpringFramework
>
>But, what if my action extends DispatchAction?
>
>Best htat I could do was to create a BaseDispatchAction that retrieves
>The command based on the parameter that triggers Dispatch's action
>specific method.
>That results in a code like this :
>
>String name = mapping.getParameter();
>String command = request.getParameter(name);
>Command command = catalog.getCommand(name);
>
>
>Question: what's the best strategy to use for retrieving commands
>For a DispatchAction?
>Are there better (I hope) alternatives?
>
>Any comments are welcome...
>
>Thanx in advance and regards
> marco
>
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>For additional commands, e-mail: user-help@struts.apache.org
--
Joe Germuska
Joe@Germuska.com
http://blog.germuska.com
"Narrow minds are weapons made for mass destruction" -The Ex
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Struts 1.3: retrieving commands dynamically from Action
Posted by Marco Mistroni <mm...@waersystems.com>.
Hello all,
I am writing a small application using struts 1.3
And commons-chain.
Currently, I have defined a BaseAction class which retrieves
Commands dynamically based on the path used
For example, calling /login will result in the action
Retrieving the command called /login
String name = mapping.getPath();
System.out.println("Retrieving command for action"+ name);
Command command = catalog.getCommand(name);
That works fine (or eventually can be improved, as suggested here
http://wiki.apache.org/jakarta-commons/CommonsChainAndSpringFramework
But, what if my action extends DispatchAction?
Best htat I could do was to create a BaseDispatchAction that retrieves
The command based on the parameter that triggers Dispatch's action
specific method.
That results in a code like this :
String name = mapping.getParameter();
String command = request.getParameter(name);
Command command = catalog.getCommand(name);
Question: what's the best strategy to use for retrieving commands
For a DispatchAction?
Are there better (I hope) alternatives?
Any comments are welcome...
Thanx in advance and regards
marco
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org