Re: Tiles controllerClass

2004-10-28 Thread PC Leung
gt; > > > } > > > > > > > > > > I;d try and avoid using a tiles controller as exception handling is an > > > > > arse. Perhaps look at having a BaseAction that adds teh relevant items > > > > >

Re: Tiles controllerClass

2004-10-27 Thread Mark Lowe
quest. > > > > > > > > public abstract class BaseAction extends Action { > > > > > > > > protected abstract ActionForward doExecute(ActionMapping mapping, > > > > ActionForm form, HttpServletRequest request, > &

Re: Tiles controllerClass

2004-10-27 Thread PC Leung
t request, > > > HttpServletResponse response) throws Exception; > > > > > > public ActionForward execute(ActionMapping mapping, ActionForm form, > > > HttpServletRequest request, HttpServletResponse response) > > > thro

Re: Tiles controllerClass

2004-10-27 Thread Mark Lowe
> >return doExecute(mapping, form, request, response); > >} > > } > > > > Now execute will be run for ever class that subclasses it, and they > > will have to use the doExecute(), method.. For more details check the > > xpetstore project

Re: Tiles controllerClass

2004-10-27 Thread PC Leung
heck the > xpetstore project out that uses this technique. This approach will > allow you to make use of exception handlers. > > Mark > > > > > On 26 Oct 2004, at 17:14, PC Leung wrote: > > > Hello world, > > > > The following is a fragment of tiles-d

Re: Tiles controllerClass

2004-10-26 Thread Mark Lowe
To do what you want you want a tiles controller, not an action. import org.apache.struts.tiles.ComponentContext; import org.apache.struts.tiles.ControllerSupport; import org.apache.struts.tiles.beans.SimpleMenuItem; import java.util.List; import javax.servlet.ServletContext; import javax.servlet.Se

Tiles controllerClass

2004-10-26 Thread PC Leung
Hello world, The following is a fragment of tiles-defs.xml. where MyMenuAction actually is UserMenuAction in Tiles. ^^ ^^^ Where and how should I put the coding inside MyMenuAction so that I can add a number of items