There is several strategies.
Are you sure that you need one single form for navigation and body ?
* If navigation and body aren't related, you can put several forms, only one
will be selected by browser when submitting.
* If navigation and body are related, you need a common ancestor in the Tiles
philosophy. A common ancestor is a tiles that will insert related sub-tiles. This
ancestor contains the form, and sub-tiles contains form's elements.
In your case, you can have an ancestor body playing this role, and inserting the
navigation and real body
Hope this help,
Cedric
Sri Sankaran wrote:
> Struts version: 1.0.2
> Servlet engine: Tomcat 4.0.2
>
> I am trying to build a wizard framework using Tiles. It follows the standard
>Windows wizard metaphor with a body panel and navigation buttons below. I am running
>into a problem and would like any opinions/suggestions.
>
> A logical use of Tiles would call for the body and nav buttons to be separate tiles
>that are combined using the tileDefinitions file. For example:
>
> <definition name="Wizard" path="/wizardLayout.jsp">
> <put name="title" value="Title.jsp"/>
> <put name="body" value=""/>
> <put name="navigation" value="Nav.jsp"/>
> </definition>
>
> <!-- Intro page -->
> <definition name="Intro" extends="Wizard">
> <put name="body" value="workflow/intro/intro.jsp"/>
> </definition>
>
> Here, the wizardLayout.jsp is solely responsible, as the name suggests, for laying
>out the various tiles using necessary HTML tags.
>
> The problem with this strategy is that by separating the body and nav into separate
>tiles limits the use of the Struts <html:form> tag. Firstly, the begin and end form
>tag must be in the same JSP. This prevents the tag from beginning in the 'body' tile
>and ending in the 'navigation' tile. There are other complications, even if I'm
>willing to compromise the design and place the <html:form> tag in the layout page
>(wizardLayout.jsp above). This would require some convoluted JavaScript that sets
>the form's action attribute on each page.
>
> The only workaround I have found is to have the body & the navigation in the same
>tile; in other words -- not have a 'navigation' tile at all. This has a serious
>shortcoming in that it forces every body panel (i.e. every page in the wizard) to
>have knowledge of layout and therefore responsible for its maintenance.
>
> I really like the concept of Tiles and would love to use it to its fullest. Do you
>have any suggestions? Am I missing something fundamental?
>
>
> Sri
>
> --
> To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>