I've done something like this:
<tiles:insert definition="mainLayout">
<html:form .. >
<tiles:put name="header" />
<tiles:put name="mainBody>
</tiles:put>
</html:form>
</tiles:insert>
In "header" and "mainbody", I have the html:text and other component tags.
I just specify the bean name explicitly using the name="..." attribute of
html:text, html:password, html:textarea, etc. This also allows you to mix
and match source beans if you have that need. I think I have a full example
somewhere in the archives within the last 90 days. If you can't find it,
let me know and I'll check my Sent folder for it but I don't relish looking
(or searching on "tiles") through that folder. :)
Regards,
David
-----Original Message-----
From: Matt Hughes [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 16, 2005 10:21 AM
To: Struts Users Mailing List
Subject: Tiles and html:form problem
I have designed a basic layout file that looks something like this:
<html>
<head></head>
<body>
<div class="header"><tiles:insert attribute="header" /></div>
<div class="mainBody><tiles:insert attribute="mainBody" /></div>
</body>
</html>
My problem is that I have a <html:form> element that needs to span both
the "header" and "mainBody" attributes. But it doesn't really work as
the tags
become unbalanced:
<tiles:insert definition="mainLayout">
<tiles:put name="header">
<html:form .. >
<html:select ... />
</tiles:put>
<tiles:put name="mainBody>
<html:text .. />
<html:text .. />
</html:form>
</tiles:put>
</tiles:insert>
Has anyone else solved this problem?
---------------------------------------------------------------------
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]