"Steve Raeburn" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> ParameterDispatchAction fulfils much the same function as
> LookupDispatchAction but its implementation is almost identical to
> DispatchAction.
>
> It would be redundant to go through getKeyMethodMap() to get the method
name
> because it is supplied in the parameter. I may have misunderstood what you
> are suggesting but to me it would make more sense to add to DispatchAction
> than to Lookup DispatchAction.
>
> It *may* make some sense to combine all three resolution methods into
> DispatchAction and either have DispatchAction try to find a handler using
> all three methods or set the method via a configuration parameter.
>
> I worry that that would be more confusing to the user that having three
> distinct classes that you can explain quite simply:
>
> To dispatch to a method identified via a request parameter, use
> DispatchAction.
> To dispatch to a method based on which button was clicked, use
> LookupDispatchAction
> To dispatch to a method based on the action path, use
> ParameterDispatchAction

I'm +1 on this, other than on naming. I think ParameterDispatchAction is
definitely the wrong name for the last of these. People are *far* more
likely to think of the "Parameter" in the name as meaning a request
parameter than they are to think of the "parameter" action mapping
attribute. Perhaps MappingDispatchAction instead?

I am -0 on combining all of this into one action.

--
Martin Cooper


>
> I would prefer to add ParameterDispatchAction now and defer a decision
about
> merging the three actions.
> To me, that would be 'the simplest thing that could possibly work' :-)
>
> Steve
>
>
> > -----Original Message-----
> > From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]
> > Sent: August 1, 2003 10:42 AM
> > To: Struts Developers List; [EMAIL PROTECTED]
> > Subject: RE: Addition of two new actions
> >
> >
> > So, what you really want is LookupDispatchAction without requiring the
> > developer to create the map-related methods?  I think you already get
the
> > abililty to combine CRUD related actions and things like that.  If so,
> > then implementing a default getKeyMethodMap() in LookupDispatchAction
> > might accomplish the same goal, without requiring another action.  Such
a
> > default implementation could examine the current LookupDispatchAction
> > subclass and create the mapping information automatically.
> >
> > Don't get me wrong ... I like the idea behind what you're proposing.  I
> > just think we might already have it (with the potential to improve ease
of
> > use by not forcing people to implement getKeyMethodMap() for a common
use
> > case).
> >
> >
> > Craig




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to