I don't think you want the element="a" in the For loop.  It needs to be
inside the for loop, otherwise it will try to put all the iterations
inside a link which isn't what you want.

One way to get the font sizes the way you want them is to have a java
method that returns the entire link:
<a href="blah" [font size info] > Link Name</a>

Then use Insert to put it in your page.  Make sure you use raw="true" so
it doesn't escape the html.

There is probably a better way to do this.  I'm pretty new to Tapestry,
but you should be able to get this to work if you can't find another way
to do it.

Mark 

-----Original Message-----
From: Matthew Baird [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 31, 2005 7:45 PM
To: [email protected]
Subject: Nested tag values

I am trying to create a UI that shows "tags" like Flickr does.

 

Each "tag" is rendered in a size according to its popularity. If you
click on a link, it goes from this Master page, to a detail page showing
the usages of the "tag"

 

In the following, I've outlined the parts I would like to be dynamic by
putting {} braces around them.

 

<span jwcid="@For" source="ognl:tagList" value="ognl:tag" element="a">

            &nbsp;<a href="#" jwcid="@PageLink"
page="inspectTag?tag={tag.id}" style="font-size: {tag.fontSize}px;"
class="PopularTag"><span jwcid="@Insert"
value="ognl:tag.value"/></a>&nbsp;

</span>

 

Each link should be rendered with something that contains the id of the
tag I would like further details on {tag.id}. 

Additionally, the style on the link should have a dynamic font-size,
pulled from the tag object {tag.fontSize}

 

Am I thinking about this the wrong way?

 

Thanks in advance,

Matthew


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

Reply via email to