PROTECTED]
Antwort an:Struts Developers List [EMAIL PROTECTED]
Betreff: Re: [SUBMIT] LookupDispatchAction - how to handle multiple html:submit
buttons
Nachrichtentext:
Dmitri,
I ~really~ like the way this Action works.
* It keeps control in the Struts-config, and does not embed
- Original Message -
From: Ted Husted [EMAIL PROTECTED]
preference. Therefore I like throwing a ServletException better. Any
other
pros/cons to either approach?
The Action is the highest layer, and there is no guarantee that there
will be a JSP with an error directive.
D'oh.
Erik Hatcher wrote:
- Standardizing on the class names. I suggest yours be renamed
LookupDispatchKeyAction, since LookupAction is pretty generic and there will
be several lookup style base classes.
I'd like to keep the dispatch moniker out of this one, since it makes
it sounds like it uses
Erik Hatcher wrote:
Obviously my only use-case/need right now is to have an additional String
key parameter passed to a perform-like method. So I'm ok with locking it
into that method signature if that'll get it committed, but I still think a
DispatchAction subclass should be more extensible
- Original Message -
From: Ted Husted [EMAIL PROTECTED]
Personally, I would then consider the keys a form of input and make them
part of the ActionForm.
But then we are back to having the Action have a whole bunch of 'if'
statements for each key. Sure, a new ActionForm base-class
Erik Hatcher wrote:
Oops, sorry got it. I still am lobbying for 'key' to be included in the
method invoked by DispatchKeyAction. Pretty please?
I obviously don't understand the use-case well enough to have a
reasonable opinion. Needing the keys passed as parameter confuses me,
since the
Dmitri,
I ~really~ like the way this Action works.
* It keeps control in the Struts-config, and does not embed presentation
details into Action source code.
How are presentation details embedded in the LookupAction you posted and my
similar code? Its just a key that it exposes, which is
Ted Husted wrote:
Here's a first
blush at a separate LookupAction that doesn't use the reflection
techniques from DispatchAction.
Attached, this time.
-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel +1 716 737-3463
--
Erik Hatcher wrote:
- Any particular reason why the last one wins in your loading of the key
mappings? Ideally there would not be duplicates, but I prefer the first one
wins (although I have no strong preference, it just seems friendlier to
allow the first one for some reason).
Given the
be a refactoring and split of the
one I already submitted.
Erik
- Original Message -
From: Dimitri Valdin [EMAIL PROTECTED]
To: Struts Developers List [EMAIL PROTECTED]
Sent: Tuesday, November 20, 2001 5:17 AM
Subject: Antwort: Re: [SUBMIT] LookupDispatchAction - how to handle multiple
well, but now, in case of using DispatchAcion this footprint is really
small,
I would say, that it is not much bigger, than implementing
getKeyMethodMap() ;-)
Right, you have one additional action mapping in struts-config than my
design.
I have mappings in the subclass via getKeyMethodMap,
I just don't feel that struts-config is the appropriate place to deal with
those kinds of mappings as they are very concrete to the action. A matter
of preference, I suppose.
Is that a fair enough summary?
Sure.
I still like my design better! :) But yours works and certainly is a viable
Dmitri,
you solution is very interesting, but I am not absolutely happy with the
fact,
that control is specified not only in struts-config.xml but in source code
as well (map definition).
I don't think my solution takes control away from struts-config, it only
gives the action more control
Erik,
I don't understand what you mean by application properties playing a role.
How so?
buttons.add buttons.delete have to be defined, which is not obvious for somebody
who does not take care about internationalization. In fact I would define the
resources in any case. But what about images
buttons.add buttons.delete have to be defined, which is not obvious for
somebody
who does not take care about internationalization. In fact I would define
the
resources in any case. But what about images ? How do you want to handle
them ?
For images I would put the image name in
For images I would put the image name in ApplicationResource.properties and
use html:image srcKey=.../ - but I probably wouldn't go to that extreme
until localization is needed.
That was the reason, why I wrote that application resources also play an
important role in your design.
If buttons
Hi Erik,
you solution is very interesting, but I am not absolutely happy with the
fact,
that control is specified not only in struts-config.xml but in source code
as well (map definition). Even application properties play here an important
role.
I have tried to use your ideas and produced very
We have also implemented a multiple submit button system; but in our
case we wrote a custom tag that generates javascript that sets a property
to a specified value and submits the form when you hit the button.
The tags look something like:
my_submit property=formAction value=delete
Most of us would not rely *solely* on Javascript for validation, since
it can be turned off, and therefor endanger your application. But
requiring it to handle multiple buttons is a different matter, so long
as the default formAction did nothing harmful if Javascript were turned
off.
The
:08 AM
Subject: Re: [SUBMIT] LookupDispatchAction - how to handle multiple
html:submit buttons
We have also implemented a multiple submit button system; but in our
case we wrote a custom tag that generates javascript that sets a property
to a specified value and submits the form when you hit
:41
An:Struts Developers List [EMAIL PROTECTED]
Antwort an:Struts Developers List [EMAIL PROTECTED]
Betreff: Re: [SUBMIT] LookupDispatchAction - how to handle multiple html:submit
buttons
Nachrichtentext:
Most of us would not rely *solely* on Javascript for validation
As promised earlier today, here is my contribution to the multiple
html:submit button saga (Ted, time to update your FAQ! :)
Here is a breakdown of how to use it:
struts-config.xml segment, note the parameter=action
action path=/test
type=edu.darden.TestAction
22 matches
Mail list logo