Scott Van Wart ha scritto:
Hello,
I have a tiles-defs.xml similar to the following (layout page with
banner on top, content on bottom):
<tiles-definitions>
<definition name="mydef" path="/layout.jsp">
<put name="banner" value="/banner.jsp" />
</definition>
<definition name="edit" extends="mydef">
<put name="title" value="msg.edit.title" />
<put name="content" value="/edit.jsp" />
</definition>
</tiles-definition>
So let's say my layout.jsp looks something like this:
<c:set var="titleKey"><tiles:getAsString name="title" /></c:set>
<head>
<title><bean:message key="${titleKey}" /></title>
</head>
<body>
<div><tiles:insert attribute="banner" /></div>
<div><tiles:insert attribute="content" /></div>
</body>
It's not quite enough to do what I want to do. I have a page that
lets you create and edit records. I found it much easier to put both
operations (create and update) into a single jsp, edit.jsp:
<c:choose>
<c:when test="${empty recordKey}">
<%-- Add operation, set parameter accordingly --%>
</c:when>
<c:otherwise>
<%-- Edit operation, set parameter accordingly --%>
</c:otherwise>
</c:choose>
So in the above, I want to change the <title>...</title> depending on
whether it's an add or edit operation. Can I do this? Do I need to
worry about the order in which tiles attributes are included?
Thanks,
Scott
---------------------------------------------------------------------
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]