I don't know it this is the case, but I think you missed the
"tiles-defs.xml" file.
I think the best place to start is Cedric Dumoulin's tutorial:
http://www.lifl.fr/~dumoulin/tiles/doc/tutorial.html
And I think you should start directly from chapter 6.

>
> 1) have a page with classic 4 tile layout (header, menu, body, footer)

You can make a JSP page for the layout. For example, create a simple HTML
table and put the tag (for example):
<tiles:insert attribute="header" />

> 2) on selecting a menuitem, the body and menu tiles change.
>
In Tiles, page (and subpages) structures are called "definitions". If you
want to change a piece of a page you have (usually) to:
1. prepare a base definition, without filling the "body" attribute;
2. prepare a set of extended definitions, where the "body" attribute
changes.
When your Action forward to its final page, you can forward to a Tiles
definition, but remember to set correctly the controller in
struts-config.xml:
  <controller
processorClass="org.apache.struts.tiles.TilesRequestProcessor"/>

> if i submit to a jsp page which inturn calls the actions (for menu,
> body), i get a "response already commited" error somewhere in the
middle.
>
> how do i get around it?

You can't. Your action must forward to a complete page, i.e. to a JSP page
or to a Tiles definition. You have to make a different definition for each
page. Remember, Tiles are not frames!

> should i use a single action that sets the properties of both menu and
> body tiles?

It depends. I usually avoid this approach as I prefer using tiles-defs.xml
to set attributes.
Ciao
Antonio Petrelli


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

Reply via email to