I'm a newbie, but how about taking this approach in struts 1.1?

I imagine that you could create a LookupDispatchAction with a path mapping
of /MyLDA and then create individual mappings for each LDA function?  

Assuming your ActionServlet maps to .oxa,  you could have forward actions
access the following resources:

<action
     path="/save"
     parameter="/MyLDA.oxa?exec=save"
     scope="request"
     type="org.apache.struts.actions.ForwardAction"
     validate="false">
</action>

<action
     path="/edit"
     parameter="/MyLDA.oxa?exec=edit"
     scope="request"
     type="org.apache.struts.actions.ForwardAction"
     validate="false">
</action>

Would this work?  Or does the resource specified in the "parameter"
attribute only specify an internal resource (i.e., it is not inspected
Struts processing).

I would like to hear the thoughts of others.


Josh Holtzman

American Data Company

[EMAIL PROTECTED]

Voice: (310) 470-1257

Fax:    (310) 362-8454

 

Sun Microsystems iForce Partner


-----Original Message-----
From: Joe Hertz [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 23, 2004 3:11 PM
To: 'Struts Users Mailing List'
Subject: RE: Benefits of LookupDispatchAction without parameter nonsense

1.2 Gives you MappingDispatchActions

The ActionMapping Path's will be different, but you can still consolidate
everything into one class.

/ObjectSave  -> ActionClass.save()
/ObjectEdit  -> ActionClass.edit()

You do this with the parameter attribute for each individual mapping.
You use the name of the method itself, rather than it being something that
gets looked up.

> -----Original Message-----
> From: Riyad Kalla [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 23, 2004 6:00 PM
> To: Struts Users Mailing List
> Subject: Benefits of LookupDispatchAction without parameter nonsense
> 
> 
> Hey guys,
> After playing with the LookupDispatchAction most of the day and 
> converting over some existing functionality to using it, I've figured 
> out that i love the consolidation of functionality into 1 class, but 
> the problems I've run into (non stop) dealing with the parameter and 
> making sure that all my buttons now have "property" values (which, for 
> example, breaks some existing code like <html:cancel />) so that the 
> LDA has a parameter to determine which method to call has gotten me 
> really short on nerves.
> 
> Does anyone else have a nice clean way that they have consolidated all 
> their CRUD functions into a 1 action, then found a nice way to 
> delegate to the proper method based on say the URL that the user is 
> trying to access (instead of the parameter value)?
> 
> Best,
> Riyad
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 



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


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

Reply via email to