Todd O'Bryan <toddobryan <at> mac.com> writes:

> I gather the way to deal with this is to rewrite the script so that all 
> the assets are Tapestry-friendly and include ${ant-like-properties} in 
> the JavaScript files. Unfortunately, the JavaScript file itself is 
> quite a bit beyond me.

Pass an asset URL builder object to the script component. Suppose 
that you have an asset named "foo", to get to its URL in the script:

<input-symbol key="builder">
<body>
var fooURL=${builder.URL['foo']};
var barURL=${builder.URL['bar']};
...
</body>

Of course, you need to create such a builder class:

class AssetURLBuilder {
  private RequestCycle cycle;
  private IComponent assetContainer;

  String getURL(String assetName) {
    return assetContainer.getAsset(assetName).buildURL(cycle);
  }
}




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

Reply via email to