You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by "Frank W. Zammetti" <fz...@omnytex.com> on 2005/03/09 17:43:21 UTC
setupItems posted to Bugzilla
For those that expressed an interest (one or two with baited breath as I
recall!), and even for those that didn't catch the previous threads, I
just added a Bugzilla ticket for the initial posting of setupItems.
In short, this is an addition to Struts (1.2.4) that allows for setup-type
functionality to be declaratively added to action mappings and forwards.
In other words, you can do something like the following:
<action path="/myPage" type="com.mycompany.myapp.action.MyPageAction">
<setupItem setupClass="com.mycompany.myapp.setups.SetupClass"
setupMethod="setupMethod1" />
</action>
This would result in SetupClass.setupMethod1() being called right before
execute() of MyPageAction is called (it gets passed the request object).
You can do whatever you like in this setup class, but I believe this will
be good for things like populating dropdowns and such that need to happen
regardless of what happens in the Action.
You can add a setupItem to forwards as well, both global and local, and
you can add as many as you like. They will all be executed, in the order
they appear. Also, for the forwards, the setupItems listed for the action
mapping will executed first, followed by those for the forwards returned
by your Action only, AFTER execute() completes.
The ticket contains a ZIP archive with a complete example webapp that
shows numerous example of this in a number of variants. It also includes
the complete source for the webapp as well as the changes made to Struts.
Lastly, it includes an updated struts.jar that you should be able to drop
in an existing application, updated your struts-config.xml file, and off
you go. Be sure to check out the readme.txt file in WEB-INF/src for full
details if you give this a try.
That's that. Let's see what people think...
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: setupItems posted to Bugzilla
Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
There's no difference to me, I'm a guy that is constantly upgrading to
the latest versions of everying... but some organizations are anal about
upgrading. My company won't move off 1.1, and probably won't for
another few months. Now, we may go right to 1.3, I don't know :)
Michael Rasmussen wrote:
>>Some may not want or be able to upgrade to 1.3, and by saying no new
>>features will be added to 1.2 people in that boat are being left out in
>>the cold as far as new features go (unless they want to do it themselves
>>of course). I'm not claiming this is unusual, but is it really the best
>>answer?
>>
>
> I'm just curious, if 1.3 will run the 1.1 code you''ve written what is
> the difference between upgrading from 1.1.x to 1.1.y and upgrading
> from 1.1.x to 1.3?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
>
>
> .
>
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: setupItems posted to Bugzilla
Posted by Michael Rasmussen <ra...@gmail.com>.
> Some may not want or be able to upgrade to 1.3, and by saying no new
> features will be added to 1.2 people in that boat are being left out in
> the cold as far as new features go (unless they want to do it themselves
> of course). I'm not claiming this is unusual, but is it really the best
> answer?
>
I'm just curious, if 1.3 will run the 1.1 code you''ve written what is
the difference between upgrading from 1.1.x to 1.1.y and upgrading
from 1.1.x to 1.3?
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: setupItems posted to Bugzilla
Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
Ok. Well, I've obviously lost the debate, there probably wasn't much of
one in the first place anyway, and my work was clearly for naught.
Anyone that wants to can feel free to close the ticket, mark it as
rejected, or whatever the appropriate status is.
Frank
Martin Cooper wrote:
> On Wed, 09 Mar 2005 17:05:54 -0500, Frank W. Zammetti
> <fz...@omnytex.com> wrote:
>
>>Joe Germuska wrote:
>>
>>>Most importantly, and I'm sorry that I just realized this after Frank
>>>has gone to such great lengths: if we were to patch Struts 1.2 to do
>>>this, we would be obligated to support this same functionality in 1.3 as
>>>well, in order to continue to provide compatibility.
>>
>>I don't think that's the case Joe. Especially since we're being told
>>that once 1.3 comes out than the 1.2 branch essentially "dies" as far as
>>new features go... But if people in the community are willing to bring
>>new features to that branch, I don't see how that obligates you to
>>forward-port things. Sure, it'd be nice it you did for compatibility,
>>but as long as it is clearly documented that some features might exist
>>in one branch vs. another that aren't cross-compatible, I don't see why
>>it should be a problem.
>
>
> We take compatibility very seriously, and Joe is absolutely right.
> Adding functionality to 1.2.x and not adding it to 1.3.x means that
> when people want to upgrade, they may be completely hosed if they were
> relying on functionality only available in the earlier version. That
> would effectively mean that the "versions" were forks rather than real
> versions. There's no way I want to see us going in that kind of
> direction.
>
> Note that the 1.2 -> 1.3 scenario isn't any different than 1.0 -> 1.1
> or 1.1 -> 1.2. Each time we move to a new point release, the previous
> one moves into maintenance mode. That's no different from the vast
> majority of other software components in the world today.
>
> --
> Martin Cooper
>
>
>
>>Some may not want or be able to upgrade to 1.3, and by saying no new
>>features will be added to 1.2 people in that boat are being left out in
>>the cold as far as new features go (unless they want to do it themselves
>>of course). I'm not claiming this is unusual, but is it really the best
>>answer?
>>
>>--
>>Frank W. Zammetti
>>Founder and Chief Software Architect
>>Omnytex Technologies
>>http://www.omnytex.com
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>>For additional commands, e-mail: dev-help@struts.apache.org
>>
>>
>
>
>
>
>
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: setupItems posted to Bugzilla
Posted by Martin Cooper <mf...@gmail.com>.
On Wed, 09 Mar 2005 17:05:54 -0500, Frank W. Zammetti
<fz...@omnytex.com> wrote:
> Joe Germuska wrote:
> > Most importantly, and I'm sorry that I just realized this after Frank
> > has gone to such great lengths: if we were to patch Struts 1.2 to do
> > this, we would be obligated to support this same functionality in 1.3 as
> > well, in order to continue to provide compatibility.
>
> I don't think that's the case Joe. Especially since we're being told
> that once 1.3 comes out than the 1.2 branch essentially "dies" as far as
> new features go... But if people in the community are willing to bring
> new features to that branch, I don't see how that obligates you to
> forward-port things. Sure, it'd be nice it you did for compatibility,
> but as long as it is clearly documented that some features might exist
> in one branch vs. another that aren't cross-compatible, I don't see why
> it should be a problem.
We take compatibility very seriously, and Joe is absolutely right.
Adding functionality to 1.2.x and not adding it to 1.3.x means that
when people want to upgrade, they may be completely hosed if they were
relying on functionality only available in the earlier version. That
would effectively mean that the "versions" were forks rather than real
versions. There's no way I want to see us going in that kind of
direction.
Note that the 1.2 -> 1.3 scenario isn't any different than 1.0 -> 1.1
or 1.1 -> 1.2. Each time we move to a new point release, the previous
one moves into maintenance mode. That's no different from the vast
majority of other software components in the world today.
--
Martin Cooper
> Some may not want or be able to upgrade to 1.3, and by saying no new
> features will be added to 1.2 people in that boat are being left out in
> the cold as far as new features go (unless they want to do it themselves
> of course). I'm not claiming this is unusual, but is it really the best
> answer?
>
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: setupItems posted to Bugzilla
Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
Joe Germuska wrote:
> Most importantly, and I'm sorry that I just realized this after Frank
> has gone to such great lengths: if we were to patch Struts 1.2 to do
> this, we would be obligated to support this same functionality in 1.3 as
> well, in order to continue to provide compatibility.
I don't think that's the case Joe. Especially since we're being told
that once 1.3 comes out than the 1.2 branch essentially "dies" as far as
new features go... But if people in the community are willing to bring
new features to that branch, I don't see how that obligates you to
forward-port things. Sure, it'd be nice it you did for compatibility,
but as long as it is clearly documented that some features might exist
in one branch vs. another that aren't cross-compatible, I don't see why
it should be a problem.
Some may not want or be able to upgrade to 1.3, and by saying no new
features will be added to 1.2 people in that boat are being left out in
the cold as far as new features go (unless they want to do it themselves
of course). I'm not claiming this is unusual, but is it really the best
answer?
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: setupItems posted to Bugzilla
Posted by Joe Germuska <Jo...@Germuska.com>.
>Yes, I agree that a standard approach is good. I also believe that
>Chain is becoming the standard approach in Struts 1.3. Joe has been
>doing some great work on making it as well integrated and easy to use
>as possible, and I think it's looking great. I'd be extremely
>reluctant to add yet another way of doing things as a "standard" on
>top of that. Options *can* be good, but they can also confuse people.
Most importantly, and I'm sorry that I just realized this after Frank
has gone to such great lengths: if we were to patch Struts 1.2 to do
this, we would be obligated to support this same functionality in 1.3
as well, in order to continue to provide compatibility.
Please note, by the way, that while struts-chain and 1.2.6 work very
nicely together, there will be some migration concerns if you start
using struts-chain now and then want to go to Struts 1.3.x I would
rather see us push towards a 1.3.0 release than go to the trouble to
adapt struts-chain to be more thoroughly compatible with what is
superseding it (mostly in the area of the ActionContext class),
although if someone wanted to provide patches, I'd consider applying
them.
Joe
--
Joe Germuska
Joe@Germuska.com
http://blog.germuska.com
"Narrow minds are weapons made for mass destruction" -The Ex
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: setupItems posted to Bugzilla
Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
Michael Rasmussen wrote:
> Frank,
> Maybe I am in the minority, I don't know, but I thought the whole
> point of version numbers to keep track of what features exist in a
> certain package of released code?
By that logic, one could argue that adding a new feature to the 1.2
branch is perfectly acceptable, even if it is never added to 1.3.
> No new work will ever be done on
> 1.1 because 1.2 is the current branch of struts. As soon as 1.3 is
> out the door that will be the case for 1.2. New feature development
> on every product happens in the latest branch. Why are you surprised
> or concerned by this?
I'm not surprised by this. But I also don't see why that PRECLUDES new
features in a previous version.
> If you want features that are not in the version you
> have to use, create those features and use them.
In other words, fork off ;)
The thing is, this is open-source, which means that if there are people
willing to do the work, NO version of something should ever die. If I
am willing to continue adding features to the 1.2 branch (assuming I can
get a committer to apply it), why should we say as a blanket statement
that "sorry, too bad, the 1.2 branch is not being supported, so go use
1.3"? That seems like a statement completely contrary to the idea of
open-source and community development.
Well, the bottom-line here is that regardless of what the community may
want, I can't do anything about it "officially" because I am not a
committer. That's kind of the end of the story, isn't it? Note that I
AM NOT saying the community wants my solution. Certainly some do, but I
don't presume to speak for everyone. The Struts team in fact DOES
though, as is their right. If they say Chain is the answer, then it's
the answer. I can disagree until I'm blue in the face, but at the end
of the day, who cares?
But let's be clear: my only real recourse is to release my own version
of Struts, which is contrary to trying to make it better and I won't do
that, so that's that really. I tried, but in the end THAT doesn't
matter either.
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
>
> On Wed, 9 Mar 2005 14:04:05 -0500 (EST), Frank W. Zammetti
> <fz...@omnytex.com> wrote:
>
>>All of your answers boil down to (a) use 1.2.x and add Chain yourself, or
>>(b) use 1.3. For some shops (mine as a case in point), (b) isn't an
>>option, and won't be for a long time. And either option forces you to use
>>Chain, which not everyone is going to be comfortable with, except in the
>>case of 1.3 where using it implicitly means using Chain and you understand
>>that going in.
>>
>>I hope I'm not coming across confrontational as that is not my intent.
>>But, if anything prior to 1.3 is now considered dead (or on life support I
>>suppose), which is how I interpret the comment about it being relegated to
>>bug fixes (it's an evolutionary dead end I think is clear), then that is
>>an interesting tidbit for all to be clear on because it means that no new
>>features will be added to anything other than 1.3. Am I misrepresenting
>>reality with that statement? :)
>>
>>I can only make the proposals, or create my own fork, which I wouldn't do.
>> It's up to you folks to decide what gets in and what doesn't, and I
>>recognize that. But, if you are saying that NOTHING new (nothing
>>substantial anyway) is going to be added to 1.x, that's bad news for me,
>>and probably others as well.
>>
>>--
>>Frank W. Zammetti
>>Founder and Chief Software Architect
>>Omnytex Technologies
>>http://www.omnytex.com
>>
>>On Wed, March 9, 2005 1:42 pm, Martin Cooper said:
>>
>>>On Wed, 9 Mar 2005 13:20:17 -0500 (EST), Frank W. Zammetti
>>><fz...@omnytex.com> wrote:
>>>
>>>>Well, a couple of points:
>>>>
>>>>(1) The idea of "page prep" or "setup functionality" seems to get asked
>>>>a
>>>>lot on the lists. There are numerous ways to handle it or course, many
>>>>of
>>>>which were debated in the preceeding threads (I'd have to go dig through
>>>>the archives myself to reference them). It is asked enough in fact that
>>>>a
>>>>"standard" solution built in to Struts makes a lot of sense to me, and
>>>>the
>>>>others that were involved in the discussion. I believe this proposal is
>>>>a
>>>>very flexible implementation. Probably not perfect, but an open-ended
>>>>way
>>>>to achieve these goals.
>>>
>>>The use of Chain will (has!) become a standard part of Struts in
>>>Struts 1.3. I'm not sure I see the need for more than one standard
>>>implementation...
>>>
>>>
>>>>(2) ChainAction... I'm not aware of it. Is it new in 1.3? If so, I for
>>>>one am not yet interested in using 1.3. In fact, we're still using 1.1
>>>>here at work, so a solution for "older" Struts versions is nice.
>>>
>>>ChainAction is part of Struts Chain, which has been in the Contrib
>>>area of Struts for rather a long time now. Maybe even back as far as
>>>1.1 - I don't recall. Struts Chain is what has been merged into the
>>>main trunk for Struts 1.3. That includes the composable request
>>>processor and several chain-based actions, such as ChainAction,
>>>amongst other things. You might want to take a look.
>>>
>>>
>>>>(3) Using Commons Chain with 1.2.6 (and presumably older versions
>>>>too)...
>>>>I'm sure that works well, but not everyone likes the idea of adding any
>>>>extra dependencies they don't feel they want to to their projects. I'd
>>>>prefer a capability similar to this be built in to Struts itself. I'm
>>>>not
>>>>alone on this, based on the opinions of those working around me.
>>>
>>>Well, I don't see the type of thing you're proposing as part of a
>>>Struts 1.2.x release, since that's pretty much relegated to bug fixes
>>>at this point, as we push towards 1.3. Chain is already built into
>>>Struts 1.3, including the ChainAction I referred to. So the choices
>>>would appear to be Struts 1.2.x + Struts Chain or Struts 1.3 with no
>>>additional dependencies.
>>>
>>>
>>>>(4) Options. They are good :) This can be considered another tool in
>>>>the
>>>>toolbox. Maybe use it, maybe don't. Sure to be good in some cases,
>>>>probably not in others. I'd hate to be forced to use something like
>>>>Chain
>>>>for this, I'd rather have the option (not saying you *have* to use Chain
>>>>now to accomplish this of course). But again, the idea of a "standard"
>>>>approach is worth something I believe.
>>>
>>>Yes, I agree that a standard approach is good. I also believe that
>>>Chain is becoming the standard approach in Struts 1.3. Joe has been
>>>doing some great work on making it as well integrated and easy to use
>>>as possible, and I think it's looking great. I'd be extremely
>>>reluctant to add yet another way of doing things as a "standard" on
>>>top of that. Options *can* be good, but they can also confuse people.
>>>
>>>--
>>>Martin Cooper
>>>
>>>
>>>
>>>>--
>>>>Frank W. Zammetti
>>>>Founder and Chief Software Architect
>>>>Omnytex Technologies
>>>>http://www.omnytex.com
>>>>
>>>>On Wed, March 9, 2005 12:59 pm, Martin Cooper said:
>>>>
>>>>>First of all, I have to admit that I am *way* behind on any thread
>>>>>that has posts of more than about a dozen lines, and have not followed
>>>>>the threads that led to this proposal.
>>>>>
>>>>>That said, I don't understand why this is necessary. Why not just use
>>>>>ChainAction, and do this with Commands, instead of adding yet another
>>>>>mechanism to do it? In my day job, we're using Struts 1.2.6 + Struts
>>>>>Chain for this, and that's working very well for us.
>>>>>
>>>>>Please feel free to point me to a message in the archive that explains
>>>>>this, rather than repeating the explanation. I'm sure I can't be the
>>>>>first to wonder this. ;-)
>>>>>
>>>>>--
>>>>>Martin Cooper
>>>>>
>>>>>
>>>>>On Wed, 9 Mar 2005 11:43:21 -0500 (EST), Frank W. Zammetti
>>>>><fz...@omnytex.com> wrote:
>>>>>
>>>>>>For those that expressed an interest (one or two with baited breath
>>>>
>>>>as I
>>>>
>>>>>>recall!), and even for those that didn't catch the previous threads,
>>>>
>>>>I
>>>>
>>>>>>just added a Bugzilla ticket for the initial posting of setupItems.
>>>>>>
>>>>>>In short, this is an addition to Struts (1.2.4) that allows for
>>>>>>setup-type
>>>>>>functionality to be declaratively added to action mappings and
>>>>
>>>>forwards.
>>>>
>>>>>>In other words, you can do something like the following:
>>>>>>
>>>>>><action path="/myPage"
>>>>
>>>>type="com.mycompany.myapp.action.MyPageAction">
>>>>
>>>>>> <setupItem setupClass="com.mycompany.myapp.setups.SetupClass"
>>>>>>setupMethod="setupMethod1" />
>>>>>></action>
>>>>>>
>>>>>>This would result in SetupClass.setupMethod1() being called right
>>>>
>>>>before
>>>>
>>>>>>execute() of MyPageAction is called (it gets passed the request
>>>>
>>>>object).
>>>>
>>>>>>You can do whatever you like in this setup class, but I believe this
>>>>>>will
>>>>>>be good for things like populating dropdowns and such that need to
>>>>>>happen
>>>>>>regardless of what happens in the Action.
>>>>>>
>>>>>>You can add a setupItem to forwards as well, both global and local,
>>>>
>>>>and
>>>>
>>>>>>you can add as many as you like. They will all be executed, in the
>>>>>>order
>>>>>>they appear. Also, for the forwards, the setupItems listed for the
>>>>>>action
>>>>>>mapping will executed first, followed by those for the forwards
>>>>
>>>>returned
>>>>
>>>>>>by your Action only, AFTER execute() completes.
>>>>>>
>>>>>>The ticket contains a ZIP archive with a complete example webapp that
>>>>>>shows numerous example of this in a number of variants. It also
>>>>>>includes
>>>>>>the complete source for the webapp as well as the changes made to
>>>>>>Struts.
>>>>>>Lastly, it includes an updated struts.jar that you should be able to
>>>>>>drop
>>>>>>in an existing application, updated your struts-config.xml file, and
>>>>
>>>>off
>>>>
>>>>>>you go. Be sure to check out the readme.txt file in WEB-INF/src for
>>>>>>full
>>>>>>details if you give this a try.
>>>>>>
>>>>>>That's that. Let's see what people think...
>>>>>>
>>>>>>--
>>>>>>Frank W. Zammetti
>>>>>>Founder and Chief Software Architect
>>>>>>Omnytex Technologies
>>>>>>http://www.omnytex.com
>>>>>>
>>>>>>---------------------------------------------------------------------
>>>>>>To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>>>>>>For additional commands, e-mail: dev-help@struts.apache.org
>>>>>>
>>>>>>
>>>>>
>>>>>---------------------------------------------------------------------
>>>>>To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>>>>>For additional commands, e-mail: dev-help@struts.apache.org
>>>>>
>>>>>
>>>>
>>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>>>For additional commands, e-mail: dev-help@struts.apache.org
>>>
>>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>>For additional commands, e-mail: dev-help@struts.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: setupItems posted to Bugzilla
Posted by Michael Rasmussen <ra...@gmail.com>.
Frank,
Maybe I am in the minority, I don't know, but I thought the whole
point of version numbers to keep track of what features exist in a
certain package of released code? No new work will ever be done on
1.1 because 1.2 is the current branch of struts. As soon as 1.3 is
out the door that will be the case for 1.2. New feature development
on every product happens in the latest branch. Why are you surprised
or concerned by this? Not trying to be mean, but to use an industry
example Microsoft is not putting any new features in Windows 3.1. The
fact that Struts 1.1 is being supported for bug fixes should be
impressive all by itself. If you want new features use the current
upgrade path. If you want features that are not in the version you
have to use, create those features and use them. Struts has solved
the problem you are facing (as Martin pointed out) using chain. if
you want the 'Struts blessed' solution then upgrade.
I might be out of the loop on this, but isn't 1.2.x and 1.3 for that
matter backwards compatible for the major features of struts? ie an
action works against 1.1 to 1.3 with no changes?
On Wed, 9 Mar 2005 14:04:05 -0500 (EST), Frank W. Zammetti
<fz...@omnytex.com> wrote:
> All of your answers boil down to (a) use 1.2.x and add Chain yourself, or
> (b) use 1.3. For some shops (mine as a case in point), (b) isn't an
> option, and won't be for a long time. And either option forces you to use
> Chain, which not everyone is going to be comfortable with, except in the
> case of 1.3 where using it implicitly means using Chain and you understand
> that going in.
>
> I hope I'm not coming across confrontational as that is not my intent.
> But, if anything prior to 1.3 is now considered dead (or on life support I
> suppose), which is how I interpret the comment about it being relegated to
> bug fixes (it's an evolutionary dead end I think is clear), then that is
> an interesting tidbit for all to be clear on because it means that no new
> features will be added to anything other than 1.3. Am I misrepresenting
> reality with that statement? :)
>
> I can only make the proposals, or create my own fork, which I wouldn't do.
> It's up to you folks to decide what gets in and what doesn't, and I
> recognize that. But, if you are saying that NOTHING new (nothing
> substantial anyway) is going to be added to 1.x, that's bad news for me,
> and probably others as well.
>
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
>
> On Wed, March 9, 2005 1:42 pm, Martin Cooper said:
> > On Wed, 9 Mar 2005 13:20:17 -0500 (EST), Frank W. Zammetti
> > <fz...@omnytex.com> wrote:
> >> Well, a couple of points:
> >>
> >> (1) The idea of "page prep" or "setup functionality" seems to get asked
> >> a
> >> lot on the lists. There are numerous ways to handle it or course, many
> >> of
> >> which were debated in the preceeding threads (I'd have to go dig through
> >> the archives myself to reference them). It is asked enough in fact that
> >> a
> >> "standard" solution built in to Struts makes a lot of sense to me, and
> >> the
> >> others that were involved in the discussion. I believe this proposal is
> >> a
> >> very flexible implementation. Probably not perfect, but an open-ended
> >> way
> >> to achieve these goals.
> >
> > The use of Chain will (has!) become a standard part of Struts in
> > Struts 1.3. I'm not sure I see the need for more than one standard
> > implementation...
> >
> >> (2) ChainAction... I'm not aware of it. Is it new in 1.3? If so, I for
> >> one am not yet interested in using 1.3. In fact, we're still using 1.1
> >> here at work, so a solution for "older" Struts versions is nice.
> >
> > ChainAction is part of Struts Chain, which has been in the Contrib
> > area of Struts for rather a long time now. Maybe even back as far as
> > 1.1 - I don't recall. Struts Chain is what has been merged into the
> > main trunk for Struts 1.3. That includes the composable request
> > processor and several chain-based actions, such as ChainAction,
> > amongst other things. You might want to take a look.
> >
> >> (3) Using Commons Chain with 1.2.6 (and presumably older versions
> >> too)...
> >> I'm sure that works well, but not everyone likes the idea of adding any
> >> extra dependencies they don't feel they want to to their projects. I'd
> >> prefer a capability similar to this be built in to Struts itself. I'm
> >> not
> >> alone on this, based on the opinions of those working around me.
> >
> > Well, I don't see the type of thing you're proposing as part of a
> > Struts 1.2.x release, since that's pretty much relegated to bug fixes
> > at this point, as we push towards 1.3. Chain is already built into
> > Struts 1.3, including the ChainAction I referred to. So the choices
> > would appear to be Struts 1.2.x + Struts Chain or Struts 1.3 with no
> > additional dependencies.
> >
> >> (4) Options. They are good :) This can be considered another tool in
> >> the
> >> toolbox. Maybe use it, maybe don't. Sure to be good in some cases,
> >> probably not in others. I'd hate to be forced to use something like
> >> Chain
> >> for this, I'd rather have the option (not saying you *have* to use Chain
> >> now to accomplish this of course). But again, the idea of a "standard"
> >> approach is worth something I believe.
> >
> > Yes, I agree that a standard approach is good. I also believe that
> > Chain is becoming the standard approach in Struts 1.3. Joe has been
> > doing some great work on making it as well integrated and easy to use
> > as possible, and I think it's looking great. I'd be extremely
> > reluctant to add yet another way of doing things as a "standard" on
> > top of that. Options *can* be good, but they can also confuse people.
> >
> > --
> > Martin Cooper
> >
> >
> >> --
> >> Frank W. Zammetti
> >> Founder and Chief Software Architect
> >> Omnytex Technologies
> >> http://www.omnytex.com
> >>
> >> On Wed, March 9, 2005 12:59 pm, Martin Cooper said:
> >> > First of all, I have to admit that I am *way* behind on any thread
> >> > that has posts of more than about a dozen lines, and have not followed
> >> > the threads that led to this proposal.
> >> >
> >> > That said, I don't understand why this is necessary. Why not just use
> >> > ChainAction, and do this with Commands, instead of adding yet another
> >> > mechanism to do it? In my day job, we're using Struts 1.2.6 + Struts
> >> > Chain for this, and that's working very well for us.
> >> >
> >> > Please feel free to point me to a message in the archive that explains
> >> > this, rather than repeating the explanation. I'm sure I can't be the
> >> > first to wonder this. ;-)
> >> >
> >> > --
> >> > Martin Cooper
> >> >
> >> >
> >> > On Wed, 9 Mar 2005 11:43:21 -0500 (EST), Frank W. Zammetti
> >> > <fz...@omnytex.com> wrote:
> >> >> For those that expressed an interest (one or two with baited breath
> >> as I
> >> >> recall!), and even for those that didn't catch the previous threads,
> >> I
> >> >> just added a Bugzilla ticket for the initial posting of setupItems.
> >> >>
> >> >> In short, this is an addition to Struts (1.2.4) that allows for
> >> >> setup-type
> >> >> functionality to be declaratively added to action mappings and
> >> forwards.
> >> >> In other words, you can do something like the following:
> >> >>
> >> >> <action path="/myPage"
> >> type="com.mycompany.myapp.action.MyPageAction">
> >> >> <setupItem setupClass="com.mycompany.myapp.setups.SetupClass"
> >> >> setupMethod="setupMethod1" />
> >> >> </action>
> >> >>
> >> >> This would result in SetupClass.setupMethod1() being called right
> >> before
> >> >> execute() of MyPageAction is called (it gets passed the request
> >> object).
> >> >> You can do whatever you like in this setup class, but I believe this
> >> >> will
> >> >> be good for things like populating dropdowns and such that need to
> >> >> happen
> >> >> regardless of what happens in the Action.
> >> >>
> >> >> You can add a setupItem to forwards as well, both global and local,
> >> and
> >> >> you can add as many as you like. They will all be executed, in the
> >> >> order
> >> >> they appear. Also, for the forwards, the setupItems listed for the
> >> >> action
> >> >> mapping will executed first, followed by those for the forwards
> >> returned
> >> >> by your Action only, AFTER execute() completes.
> >> >>
> >> >> The ticket contains a ZIP archive with a complete example webapp that
> >> >> shows numerous example of this in a number of variants. It also
> >> >> includes
> >> >> the complete source for the webapp as well as the changes made to
> >> >> Struts.
> >> >> Lastly, it includes an updated struts.jar that you should be able to
> >> >> drop
> >> >> in an existing application, updated your struts-config.xml file, and
> >> off
> >> >> you go. Be sure to check out the readme.txt file in WEB-INF/src for
> >> >> full
> >> >> details if you give this a try.
> >> >>
> >> >> That's that. Let's see what people think...
> >> >>
> >> >> --
> >> >> Frank W. Zammetti
> >> >> Founder and Chief Software Architect
> >> >> Omnytex Technologies
> >> >> http://www.omnytex.com
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> >> >> For additional commands, e-mail: dev-help@struts.apache.org
> >> >>
> >> >>
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> >> > For additional commands, e-mail: dev-help@struts.apache.org
> >> >
> >> >
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> > For additional commands, e-mail: dev-help@struts.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: setupItems posted to Bugzilla
Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
All of your answers boil down to (a) use 1.2.x and add Chain yourself, or
(b) use 1.3. For some shops (mine as a case in point), (b) isn't an
option, and won't be for a long time. And either option forces you to use
Chain, which not everyone is going to be comfortable with, except in the
case of 1.3 where using it implicitly means using Chain and you understand
that going in.
I hope I'm not coming across confrontational as that is not my intent.
But, if anything prior to 1.3 is now considered dead (or on life support I
suppose), which is how I interpret the comment about it being relegated to
bug fixes (it's an evolutionary dead end I think is clear), then that is
an interesting tidbit for all to be clear on because it means that no new
features will be added to anything other than 1.3. Am I misrepresenting
reality with that statement? :)
I can only make the proposals, or create my own fork, which I wouldn't do.
It's up to you folks to decide what gets in and what doesn't, and I
recognize that. But, if you are saying that NOTHING new (nothing
substantial anyway) is going to be added to 1.x, that's bad news for me,
and probably others as well.
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
On Wed, March 9, 2005 1:42 pm, Martin Cooper said:
> On Wed, 9 Mar 2005 13:20:17 -0500 (EST), Frank W. Zammetti
> <fz...@omnytex.com> wrote:
>> Well, a couple of points:
>>
>> (1) The idea of "page prep" or "setup functionality" seems to get asked
>> a
>> lot on the lists. There are numerous ways to handle it or course, many
>> of
>> which were debated in the preceeding threads (I'd have to go dig through
>> the archives myself to reference them). It is asked enough in fact that
>> a
>> "standard" solution built in to Struts makes a lot of sense to me, and
>> the
>> others that were involved in the discussion. I believe this proposal is
>> a
>> very flexible implementation. Probably not perfect, but an open-ended
>> way
>> to achieve these goals.
>
> The use of Chain will (has!) become a standard part of Struts in
> Struts 1.3. I'm not sure I see the need for more than one standard
> implementation...
>
>> (2) ChainAction... I'm not aware of it. Is it new in 1.3? If so, I for
>> one am not yet interested in using 1.3. In fact, we're still using 1.1
>> here at work, so a solution for "older" Struts versions is nice.
>
> ChainAction is part of Struts Chain, which has been in the Contrib
> area of Struts for rather a long time now. Maybe even back as far as
> 1.1 - I don't recall. Struts Chain is what has been merged into the
> main trunk for Struts 1.3. That includes the composable request
> processor and several chain-based actions, such as ChainAction,
> amongst other things. You might want to take a look.
>
>> (3) Using Commons Chain with 1.2.6 (and presumably older versions
>> too)...
>> I'm sure that works well, but not everyone likes the idea of adding any
>> extra dependencies they don't feel they want to to their projects. I'd
>> prefer a capability similar to this be built in to Struts itself. I'm
>> not
>> alone on this, based on the opinions of those working around me.
>
> Well, I don't see the type of thing you're proposing as part of a
> Struts 1.2.x release, since that's pretty much relegated to bug fixes
> at this point, as we push towards 1.3. Chain is already built into
> Struts 1.3, including the ChainAction I referred to. So the choices
> would appear to be Struts 1.2.x + Struts Chain or Struts 1.3 with no
> additional dependencies.
>
>> (4) Options. They are good :) This can be considered another tool in
>> the
>> toolbox. Maybe use it, maybe don't. Sure to be good in some cases,
>> probably not in others. I'd hate to be forced to use something like
>> Chain
>> for this, I'd rather have the option (not saying you *have* to use Chain
>> now to accomplish this of course). But again, the idea of a "standard"
>> approach is worth something I believe.
>
> Yes, I agree that a standard approach is good. I also believe that
> Chain is becoming the standard approach in Struts 1.3. Joe has been
> doing some great work on making it as well integrated and easy to use
> as possible, and I think it's looking great. I'd be extremely
> reluctant to add yet another way of doing things as a "standard" on
> top of that. Options *can* be good, but they can also confuse people.
>
> --
> Martin Cooper
>
>
>> --
>> Frank W. Zammetti
>> Founder and Chief Software Architect
>> Omnytex Technologies
>> http://www.omnytex.com
>>
>> On Wed, March 9, 2005 12:59 pm, Martin Cooper said:
>> > First of all, I have to admit that I am *way* behind on any thread
>> > that has posts of more than about a dozen lines, and have not followed
>> > the threads that led to this proposal.
>> >
>> > That said, I don't understand why this is necessary. Why not just use
>> > ChainAction, and do this with Commands, instead of adding yet another
>> > mechanism to do it? In my day job, we're using Struts 1.2.6 + Struts
>> > Chain for this, and that's working very well for us.
>> >
>> > Please feel free to point me to a message in the archive that explains
>> > this, rather than repeating the explanation. I'm sure I can't be the
>> > first to wonder this. ;-)
>> >
>> > --
>> > Martin Cooper
>> >
>> >
>> > On Wed, 9 Mar 2005 11:43:21 -0500 (EST), Frank W. Zammetti
>> > <fz...@omnytex.com> wrote:
>> >> For those that expressed an interest (one or two with baited breath
>> as I
>> >> recall!), and even for those that didn't catch the previous threads,
>> I
>> >> just added a Bugzilla ticket for the initial posting of setupItems.
>> >>
>> >> In short, this is an addition to Struts (1.2.4) that allows for
>> >> setup-type
>> >> functionality to be declaratively added to action mappings and
>> forwards.
>> >> In other words, you can do something like the following:
>> >>
>> >> <action path="/myPage"
>> type="com.mycompany.myapp.action.MyPageAction">
>> >> <setupItem setupClass="com.mycompany.myapp.setups.SetupClass"
>> >> setupMethod="setupMethod1" />
>> >> </action>
>> >>
>> >> This would result in SetupClass.setupMethod1() being called right
>> before
>> >> execute() of MyPageAction is called (it gets passed the request
>> object).
>> >> You can do whatever you like in this setup class, but I believe this
>> >> will
>> >> be good for things like populating dropdowns and such that need to
>> >> happen
>> >> regardless of what happens in the Action.
>> >>
>> >> You can add a setupItem to forwards as well, both global and local,
>> and
>> >> you can add as many as you like. They will all be executed, in the
>> >> order
>> >> they appear. Also, for the forwards, the setupItems listed for the
>> >> action
>> >> mapping will executed first, followed by those for the forwards
>> returned
>> >> by your Action only, AFTER execute() completes.
>> >>
>> >> The ticket contains a ZIP archive with a complete example webapp that
>> >> shows numerous example of this in a number of variants. It also
>> >> includes
>> >> the complete source for the webapp as well as the changes made to
>> >> Struts.
>> >> Lastly, it includes an updated struts.jar that you should be able to
>> >> drop
>> >> in an existing application, updated your struts-config.xml file, and
>> off
>> >> you go. Be sure to check out the readme.txt file in WEB-INF/src for
>> >> full
>> >> details if you give this a try.
>> >>
>> >> That's that. Let's see what people think...
>> >>
>> >> --
>> >> Frank W. Zammetti
>> >> Founder and Chief Software Architect
>> >> Omnytex Technologies
>> >> http://www.omnytex.com
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> >> For additional commands, e-mail: dev-help@struts.apache.org
>> >>
>> >>
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> > For additional commands, e-mail: dev-help@struts.apache.org
>> >
>> >
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: setupItems posted to Bugzilla
Posted by Martin Cooper <mf...@gmail.com>.
On Wed, 9 Mar 2005 13:20:17 -0500 (EST), Frank W. Zammetti
<fz...@omnytex.com> wrote:
> Well, a couple of points:
>
> (1) The idea of "page prep" or "setup functionality" seems to get asked a
> lot on the lists. There are numerous ways to handle it or course, many of
> which were debated in the preceeding threads (I'd have to go dig through
> the archives myself to reference them). It is asked enough in fact that a
> "standard" solution built in to Struts makes a lot of sense to me, and the
> others that were involved in the discussion. I believe this proposal is a
> very flexible implementation. Probably not perfect, but an open-ended way
> to achieve these goals.
The use of Chain will (has!) become a standard part of Struts in
Struts 1.3. I'm not sure I see the need for more than one standard
implementation...
> (2) ChainAction... I'm not aware of it. Is it new in 1.3? If so, I for
> one am not yet interested in using 1.3. In fact, we're still using 1.1
> here at work, so a solution for "older" Struts versions is nice.
ChainAction is part of Struts Chain, which has been in the Contrib
area of Struts for rather a long time now. Maybe even back as far as
1.1 - I don't recall. Struts Chain is what has been merged into the
main trunk for Struts 1.3. That includes the composable request
processor and several chain-based actions, such as ChainAction,
amongst other things. You might want to take a look.
> (3) Using Commons Chain with 1.2.6 (and presumably older versions too)...
> I'm sure that works well, but not everyone likes the idea of adding any
> extra dependencies they don't feel they want to to their projects. I'd
> prefer a capability similar to this be built in to Struts itself. I'm not
> alone on this, based on the opinions of those working around me.
Well, I don't see the type of thing you're proposing as part of a
Struts 1.2.x release, since that's pretty much relegated to bug fixes
at this point, as we push towards 1.3. Chain is already built into
Struts 1.3, including the ChainAction I referred to. So the choices
would appear to be Struts 1.2.x + Struts Chain or Struts 1.3 with no
additional dependencies.
> (4) Options. They are good :) This can be considered another tool in the
> toolbox. Maybe use it, maybe don't. Sure to be good in some cases,
> probably not in others. I'd hate to be forced to use something like Chain
> for this, I'd rather have the option (not saying you *have* to use Chain
> now to accomplish this of course). But again, the idea of a "standard"
> approach is worth something I believe.
Yes, I agree that a standard approach is good. I also believe that
Chain is becoming the standard approach in Struts 1.3. Joe has been
doing some great work on making it as well integrated and easy to use
as possible, and I think it's looking great. I'd be extremely
reluctant to add yet another way of doing things as a "standard" on
top of that. Options *can* be good, but they can also confuse people.
--
Martin Cooper
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
>
> On Wed, March 9, 2005 12:59 pm, Martin Cooper said:
> > First of all, I have to admit that I am *way* behind on any thread
> > that has posts of more than about a dozen lines, and have not followed
> > the threads that led to this proposal.
> >
> > That said, I don't understand why this is necessary. Why not just use
> > ChainAction, and do this with Commands, instead of adding yet another
> > mechanism to do it? In my day job, we're using Struts 1.2.6 + Struts
> > Chain for this, and that's working very well for us.
> >
> > Please feel free to point me to a message in the archive that explains
> > this, rather than repeating the explanation. I'm sure I can't be the
> > first to wonder this. ;-)
> >
> > --
> > Martin Cooper
> >
> >
> > On Wed, 9 Mar 2005 11:43:21 -0500 (EST), Frank W. Zammetti
> > <fz...@omnytex.com> wrote:
> >> For those that expressed an interest (one or two with baited breath as I
> >> recall!), and even for those that didn't catch the previous threads, I
> >> just added a Bugzilla ticket for the initial posting of setupItems.
> >>
> >> In short, this is an addition to Struts (1.2.4) that allows for
> >> setup-type
> >> functionality to be declaratively added to action mappings and forwards.
> >> In other words, you can do something like the following:
> >>
> >> <action path="/myPage" type="com.mycompany.myapp.action.MyPageAction">
> >> <setupItem setupClass="com.mycompany.myapp.setups.SetupClass"
> >> setupMethod="setupMethod1" />
> >> </action>
> >>
> >> This would result in SetupClass.setupMethod1() being called right before
> >> execute() of MyPageAction is called (it gets passed the request object).
> >> You can do whatever you like in this setup class, but I believe this
> >> will
> >> be good for things like populating dropdowns and such that need to
> >> happen
> >> regardless of what happens in the Action.
> >>
> >> You can add a setupItem to forwards as well, both global and local, and
> >> you can add as many as you like. They will all be executed, in the
> >> order
> >> they appear. Also, for the forwards, the setupItems listed for the
> >> action
> >> mapping will executed first, followed by those for the forwards returned
> >> by your Action only, AFTER execute() completes.
> >>
> >> The ticket contains a ZIP archive with a complete example webapp that
> >> shows numerous example of this in a number of variants. It also
> >> includes
> >> the complete source for the webapp as well as the changes made to
> >> Struts.
> >> Lastly, it includes an updated struts.jar that you should be able to
> >> drop
> >> in an existing application, updated your struts-config.xml file, and off
> >> you go. Be sure to check out the readme.txt file in WEB-INF/src for
> >> full
> >> details if you give this a try.
> >>
> >> That's that. Let's see what people think...
> >>
> >> --
> >> Frank W. Zammetti
> >> Founder and Chief Software Architect
> >> Omnytex Technologies
> >> http://www.omnytex.com
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> >> For additional commands, e-mail: dev-help@struts.apache.org
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> > For additional commands, e-mail: dev-help@struts.apache.org
> >
> >
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: setupItems posted to Bugzilla
Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
Well, a couple of points:
(1) The idea of "page prep" or "setup functionality" seems to get asked a
lot on the lists. There are numerous ways to handle it or course, many of
which were debated in the preceeding threads (I'd have to go dig through
the archives myself to reference them). It is asked enough in fact that a
"standard" solution built in to Struts makes a lot of sense to me, and the
others that were involved in the discussion. I believe this proposal is a
very flexible implementation. Probably not perfect, but an open-ended way
to achieve these goals.
(2) ChainAction... I'm not aware of it. Is it new in 1.3? If so, I for
one am not yet interested in using 1.3. In fact, we're still using 1.1
here at work, so a solution for "older" Struts versions is nice.
(3) Using Commons Chain with 1.2.6 (and presumably older versions too)...
I'm sure that works well, but not everyone likes the idea of adding any
extra dependencies they don't feel they want to to their projects. I'd
prefer a capability similar to this be built in to Struts itself. I'm not
alone on this, based on the opinions of those working around me.
(4) Options. They are good :) This can be considered another tool in the
toolbox. Maybe use it, maybe don't. Sure to be good in some cases,
probably not in others. I'd hate to be forced to use something like Chain
for this, I'd rather have the option (not saying you *have* to use Chain
now to accomplish this of course). But again, the idea of a "standard"
approach is worth something I believe.
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
On Wed, March 9, 2005 12:59 pm, Martin Cooper said:
> First of all, I have to admit that I am *way* behind on any thread
> that has posts of more than about a dozen lines, and have not followed
> the threads that led to this proposal.
>
> That said, I don't understand why this is necessary. Why not just use
> ChainAction, and do this with Commands, instead of adding yet another
> mechanism to do it? In my day job, we're using Struts 1.2.6 + Struts
> Chain for this, and that's working very well for us.
>
> Please feel free to point me to a message in the archive that explains
> this, rather than repeating the explanation. I'm sure I can't be the
> first to wonder this. ;-)
>
> --
> Martin Cooper
>
>
> On Wed, 9 Mar 2005 11:43:21 -0500 (EST), Frank W. Zammetti
> <fz...@omnytex.com> wrote:
>> For those that expressed an interest (one or two with baited breath as I
>> recall!), and even for those that didn't catch the previous threads, I
>> just added a Bugzilla ticket for the initial posting of setupItems.
>>
>> In short, this is an addition to Struts (1.2.4) that allows for
>> setup-type
>> functionality to be declaratively added to action mappings and forwards.
>> In other words, you can do something like the following:
>>
>> <action path="/myPage" type="com.mycompany.myapp.action.MyPageAction">
>> <setupItem setupClass="com.mycompany.myapp.setups.SetupClass"
>> setupMethod="setupMethod1" />
>> </action>
>>
>> This would result in SetupClass.setupMethod1() being called right before
>> execute() of MyPageAction is called (it gets passed the request object).
>> You can do whatever you like in this setup class, but I believe this
>> will
>> be good for things like populating dropdowns and such that need to
>> happen
>> regardless of what happens in the Action.
>>
>> You can add a setupItem to forwards as well, both global and local, and
>> you can add as many as you like. They will all be executed, in the
>> order
>> they appear. Also, for the forwards, the setupItems listed for the
>> action
>> mapping will executed first, followed by those for the forwards returned
>> by your Action only, AFTER execute() completes.
>>
>> The ticket contains a ZIP archive with a complete example webapp that
>> shows numerous example of this in a number of variants. It also
>> includes
>> the complete source for the webapp as well as the changes made to
>> Struts.
>> Lastly, it includes an updated struts.jar that you should be able to
>> drop
>> in an existing application, updated your struts-config.xml file, and off
>> you go. Be sure to check out the readme.txt file in WEB-INF/src for
>> full
>> details if you give this a try.
>>
>> That's that. Let's see what people think...
>>
>> --
>> Frank W. Zammetti
>> Founder and Chief Software Architect
>> Omnytex Technologies
>> http://www.omnytex.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> For additional commands, e-mail: dev-help@struts.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: setupItems posted to Bugzilla
Posted by Martin Cooper <mf...@gmail.com>.
First of all, I have to admit that I am *way* behind on any thread
that has posts of more than about a dozen lines, and have not followed
the threads that led to this proposal.
That said, I don't understand why this is necessary. Why not just use
ChainAction, and do this with Commands, instead of adding yet another
mechanism to do it? In my day job, we're using Struts 1.2.6 + Struts
Chain for this, and that's working very well for us.
Please feel free to point me to a message in the archive that explains
this, rather than repeating the explanation. I'm sure I can't be the
first to wonder this. ;-)
--
Martin Cooper
On Wed, 9 Mar 2005 11:43:21 -0500 (EST), Frank W. Zammetti
<fz...@omnytex.com> wrote:
> For those that expressed an interest (one or two with baited breath as I
> recall!), and even for those that didn't catch the previous threads, I
> just added a Bugzilla ticket for the initial posting of setupItems.
>
> In short, this is an addition to Struts (1.2.4) that allows for setup-type
> functionality to be declaratively added to action mappings and forwards.
> In other words, you can do something like the following:
>
> <action path="/myPage" type="com.mycompany.myapp.action.MyPageAction">
> <setupItem setupClass="com.mycompany.myapp.setups.SetupClass"
> setupMethod="setupMethod1" />
> </action>
>
> This would result in SetupClass.setupMethod1() being called right before
> execute() of MyPageAction is called (it gets passed the request object).
> You can do whatever you like in this setup class, but I believe this will
> be good for things like populating dropdowns and such that need to happen
> regardless of what happens in the Action.
>
> You can add a setupItem to forwards as well, both global and local, and
> you can add as many as you like. They will all be executed, in the order
> they appear. Also, for the forwards, the setupItems listed for the action
> mapping will executed first, followed by those for the forwards returned
> by your Action only, AFTER execute() completes.
>
> The ticket contains a ZIP archive with a complete example webapp that
> shows numerous example of this in a number of variants. It also includes
> the complete source for the webapp as well as the changes made to Struts.
> Lastly, it includes an updated struts.jar that you should be able to drop
> in an existing application, updated your struts-config.xml file, and off
> you go. Be sure to check out the readme.txt file in WEB-INF/src for full
> details if you give this a try.
>
> That's that. Let's see what people think...
>
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org