You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jerry Smith <js...@nuventive.com> on 2003/06/11 23:25:44 UTC

Nested Tiles Definitions

Hello,

I tried posting this through Yahoo! and my message wouldn't show up.  If 
this gets posted multiple times, many apologies!

I'm using Struts 1.0 and the Tiles extension from 
http://www.lifl.fr/~dumoulin/tiles/ .

I want to use a one definition is another definition.  Here are my 
current definitions:

  <definition name="site.mainLayout.subs" path="/tiles/subLayout.jsp">
    <put name="header" value="/tiles/standardHeader.jsp" />
    <put name="menu" value="/tiles/standardMenu.jsp" />
    <put name="main.title" value="TITLE NEEDED" />
    <put name="body.sublayout" value="site.subLayout.status" />
  </definition>
 
  <definition name="site.subLayout.status" 
path="/tiles/statusSubLayout.jsp">
    <put name="body" value="/tiles/blank.jsp" />
    <put name="statusTitleImage" value="IMAGE NEEDED" />
    <put name="statusBarPercent" value="0" />
  </definition>

Now, say I want the statusBarPercent value to be 50.  I can't figure out 
how to change this value in the JSP.  I've tried:

<tiles:insert definition="site.mainLayout.subs" flush="true">
  <tiles:put name="body.sublayout" value="site.subLayout.status">
    <tiles:put name="statusBarPercent" value="50" />
  </tiles:put>
</tiles:insert>

The value remains "0".  Can someone see what I'm doing wrong or if what 
I want to do is feasible?

Thanks,

Robert


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: Nested Tiles Definitions

Posted by Chip Paul <ch...@ethreat.com>.
I don't think you can net calls to <tiles:put> like that.

Instead try this insert:

<tiles:insert definition="site.subLayout.status" flush="true>
  <tiles:put name="statusBarPercent" value="0" />
</tiles:insert>

The whole reason you defined the site.sublayout.status definition was so you
could refer to it and it's added percent bar functionality, so go ahead and
insert it directly.

Chip



-----Original Message-----
From: Jerry Smith [mailto:jsmith@nuventive.com]
Sent: Wednesday, June 11, 2003 4:26 PM
To: struts-user@jakarta.apache.org
Subject: Nested Tiles Definitions


Hello,

I tried posting this through Yahoo! and my message wouldn't show up.  If
this gets posted multiple times, many apologies!

I'm using Struts 1.0 and the Tiles extension from
http://www.lifl.fr/~dumoulin/tiles/ .

I want to use a one definition is another definition.  Here are my
current definitions:

  <definition name="site.mainLayout.subs" path="/tiles/subLayout.jsp">
    <put name="header" value="/tiles/standardHeader.jsp" />
    <put name="menu" value="/tiles/standardMenu.jsp" />
    <put name="main.title" value="TITLE NEEDED" />
    <put name="body.sublayout" value="site.subLayout.status" />
  </definition>

  <definition name="site.subLayout.status"
path="/tiles/statusSubLayout.jsp">
    <put name="body" value="/tiles/blank.jsp" />
    <put name="statusTitleImage" value="IMAGE NEEDED" />
    <put name="statusBarPercent" value="0" />
  </definition>

Now, say I want the statusBarPercent value to be 50.  I can't figure out
how to change this value in the JSP.  I've tried:

<tiles:insert definition="site.mainLayout.subs" flush="true">
  <tiles:put name="body.sublayout" value="site.subLayout.status">
    <tiles:put name="statusBarPercent" value="50" />
  </tiles:put>
</tiles:insert>

The value remains "0".  Can someone see what I'm doing wrong or if what
I want to do is feasible?

Thanks,

Robert


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org