Meaningless Drivel is fun!
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

Compare tiles-attribute

hal arres
Ranch Hand

Joined: Jan 10, 2003
Posts: 30

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"/>

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

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

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.
I agree. Here's the link:
subject: Compare tiles-attribute
It's not a secret anymore!