struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Husted <hus...@apache.org>
Subject Re: ActionMapping parameter
Date Wed, 05 Sep 2001 00:23:55 GMT
David Corbin wrote:
> I'm not saying it's a bad idea, but be very careful what road you start
> down.  If you're not careful, you end up "programming" in xml, which can
> have its down sides....

I think we're already doing that ;-)

What's happening now is that people are embedding a lot of control-logic
into HTML forms in the form of hidden properties and such.

With better support for placing multiple parameters into the
ActionMapping, some of that won't be necessary, and more of the
control-flow programming can be centralized in the configuration file. 

Personally, I'm thinking that the best way to handle multiple parameters
is as parameters, since this corresponds to what we already have to do
with global forwards. Otherwise we end up with two ways to do the same
thing, all in the same configuration file.

Meanwhile, to close the loop, we should also be able to specify the path
for an ActionForm with global and local forwards. This would make it
possible to "softcode" all of the system paths and parameters using
logical forwards from the configuration file. 

I'm currently thinking about trying to extend the HTML form tag to allow
use of a FORWARD property as an alternative to the current ACTION
property. When this property is used, the tag would check the
application mappings for the specified logical name and use the mapped
URI for the ACTION property.

To permit use of local forwards, the tag could also check for an Action
Mapping object in the page, request, and session scopes. If found, the
instant mapping object could be used to check for a local and global
forwarding. If not found, the application mappings are used instead.

Again, the benefit of this change are that all URIs can be replaced with
logical forwards throughout a Struts application. It also allows the
target of a form to be changed at runtime from the Action. This would
makes many workflow patterns easier to achieve. 


-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel +1 716 737-3463
-- http://www.husted.com/about/struts/

Mime
View raw message