Susan G. Conger ha scritto:
The image changes depending on the page that is being displayed.  Ideally I
would like to just be able to point to the .gif file in the tiles-def.xml
file.  Here is what I have so far:

<tiles-definitions>

  <!-- Student Layout -->
  <definition name="student.header" path="/secure/header.jsp">
     <put name="description"
value="/images/student_pg_header/course_details.html"/>
  </definition>

  <definition name="student.layout" path="/secure/layout.jsp">
     <put name="title"  value="Struts Test"/>
     <put name="menu"   value="/secure/student_menu.jsp"/>
     <put name="body"   value="/secure/student_menu.jsp"/>
     <put name="footer"   value="/secure/footer.jsp"/>
  </definition>

</tiles-definitions>

I want the student.header to be displayed in the student.layout.

You can do something like:

 <definition name="student.layout" path="/secure/layout.jsp">
    <put name="title"  value="Struts Test"/>
    <put name="header" value="student.header" type="definition" />
    <put name="menu"   value="/secure/student_menu.jsp"/>
    <put name="body"   value="/secure/student_menu.jsp"/>
    <put name="footer"   value="/secure/footer.jsp"/>
 </definition>


  Inside the
student.header the description changes depending on the page that is being
displayed.

Do you mean that there are definitions similar to student.layout but that changes only, say, the body section? If this is your case you have to extend both student.header and student.layout


 <definition name="student.header.abc" extends="student.header">
    <put name="description"
value="/images/student_pg_header/course_details_abc.html"/>
 </definition>

 <definition name="student.layout.abc" extends="student.layout">
    <put name="header" value="student.header.abc" type="definition" />
 </definition>

Speaking of simple pictures you can do it with some JSP code.

 <definition name="student.layout.abc" extends="student.layout">
    <put name="picture" value="/picture/mypicture.gif" />
 </definition>

In your layout page (I think it is /secure/layout.jsp) put:

<tiles:importAttribute name="picture" scope="page" />
<html:img page="${picture}" />

(If you are using an older Tomcat probably you have to use <html-el:img> tag)


I hope I got the point.
Ciao
Antonio



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

Reply via email to