I'm brand-new to Tapestry. I've read the tapestry-user list back through the beginning of the month (200 messages already!) I've been through a basic tutorial, and can do some simple things with Tapestry, but I haven't yet really gotten a feel for it. I suspect the question below is pretty naive, but I'm hoping someone has a few minutes to either suggest a solution or point me to an appropriate reference. BTW, although new to Tapestry, I'm fairly experienced with Java and XML, and have used several other web framworks (Struts, SpringMVC).

----------

I want to create links to external pages based on internal data. The url parameters would be based on data stored in one of my objects. In PHP or JSP I would use processing instructions inside the href attribute of my template to grab the data. I'm not sure how to do it here.

More specifically, I'm used to doing something like (in some pseudo-app syntax):

<p>View this location in <a href="http://maps.google.com/maps?q=<?location.address.line?>+<?location.address.city?>+<?location.address.state?>+<?location.address.zip?>">Google Maps</a> or <a href="http://maps.yahoo.com/maps_result?addr=<?location.address.line?>&csz=<?location.address.city?>+<?location.address.state?>+<?location.address.zip?>&country=us">Yahoo Maps</a> or <a href="http://www.mapquest.com/maps/map.adp?country=US&addtohistory=&searchtab=home&address=<?location.address.line?>&<?location.address.city?>&state=<?location.address.state?>&zipcode=<?location.address.zip?>">Mapquest</a>.
    </p>

The point is that the address components (zip, citey, state, etc.) are properties of an Address object, which is a property of the Location object known to the page.

What would be the Tapestry way of building this? I see the ExternalLink class, and am wondering if that's what I need, and if that's the case, do I need to build separate supporting classes for each of those different URL styles? Should I be using some other Tapestry object? Or is there a more direct way to embed this data in the page? Everything I see allows me to embed data in HTML elements, but I dont' see how I might extend this to embedding data in attributes.

So... any suggestions? Pointers to the right portions of the fine manual? Or to a working example which does this?

Thanks for any help you can offer,

  -- Scott Sauyet

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

Reply via email to