Peter Kelley wrote: > I'm starting to get confused about good design patterns using webwork. > Just say I have an action that gets a list of users called say > user.list. I define the views for the action to point to my > userList.jsp. After I do this I suddenly realize that having a list of > users is a really useful thing on a number of pages. What are the best > options for re-using my user.list action ? > > Here is what I have so far: > > 1. Create actions that also provide user list properties as well as > other data and call those before every page that has a user list. > Refactor the user list code. > > 2. Call the user list action using a webwork:action tag on the JSP > page. > > 3. Do some sort of include of a JSP page that has the user list on it. > This page probably only has the user list action and nothing else but > at least it lets me call error views as necessary. > > 4. Alias the user list action somehow and call it on an incoming link > to pages that need it. I'm not sure how to go about this but I figure > it should be possible. If anyone can suggest what should appear in my > actions.xml and webwork:url tags to make this happen I would be > grateful. > > What do people see as the best way to approach this sort of problem ? > Are there better options I have missed ?
I usually do 2 (as suggested in the docs, see the Model-1/2 section), and 4 if I really need error pages. /Rickard -- Rickard Öberg _______________________________________________ Webwork-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webwork-user