wood burning stoves*
The moose likes Struts and the fly likes Compare tiles-attribute Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Compare tiles-attribute" Watch "Compare tiles-attribute" New topic
Author

Compare tiles-attribute

hal arres
Ranch Hand

Joined: Jan 10, 2003
Posts: 30
Hi,

I want to compare a tiles-attribute in a logic tag to constant string.


This is the way I save it:

<tiles:insert definition="layoutDefinition">
<tiles ut name="step" value="search"/>
</tiles:insert>


But later on I don't know how to access it in an logic tag

<logic:equal ??? value="search">
<span class="bold">property</span>
</logic:equal>


I can only access it throw this:

<tiles:getAsString name="step"/>


Can anyone tell me how to access the tiles-attribute in a logic tag?
John Smith
Ranch Hand

Joined: Sep 02, 2004
Posts: 61
In the tile you're inserting you'll need a tiles:useAttribute tag, then you just set the name field in your logic:equal to be the same as the id field in your useAttribute tag.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Compare tiles-attribute
 
Similar Threads
Struts1 tiles
TilesAction, how to???
Accessing bean in logic Tag
tiles and attributes
HELP with tiles