Express the folder you're interested in as an IAsset...
Then do .buildURL() on it and somehow pass the result to your javascript...
That's how AjaxShellDelegate includes dojo and its root folder ... BUT
since it's a classpath asset, it'll be protected (i.e. have that
checksum appended)
So you won't be able to reference relative files (cause the checksum
won't be right for them)
You'll need to add a contribution to tapestry.asset.UnprotectedAssets to
get around this...
Here's what tacos does to allow firebug-lite to work (and reference
relatively its files and images, e.t.c.).
<contribution configuration-id="tapestry.asset.UnprotectedAssets">
Unprotect assets for firebug lite.
<unprotected-resource
contains="^/net/sf/tacos/components/firebug/" />
</contribution>
Julian Wood wrote:
Thanks Andreas,
Remember that I'm dealing with some compressed, obfuscated javascript
which loads these resources (ie I can't change very much in how it
loads these resources - just the dir in which too look for them, and
the name of the file). I cannot use a PageLink in this situation.
However, if I can determine the URL created by the PageLink to an html
file deep in some component library (eg to
org/apache/tapestry/contrib/table/components/Table.html), I might have
a chance. However, I couldn't get it to correctly link to that page
either (a longshot, I know).
<a href="#" jwcid="@PageLink" page="contrib:Table">Table</a>
I'm thinking that it might be better to write a small service which
will return the resource the javascript requests, but it seems like
more work than should be necessary. Let me know if I misunderstood how
you thought PageLink could help.
Thanks,
J
On 8-Mar-07, at 11:01 AM, Andreas Andreou wrote:
http://tapestry.apache.org/tapestry4.1/components/link/pagelink.html
See the namespace attribute
On 3/8/07, Julian Wood <[EMAIL PROTECTED]> wrote:
I've just finished wrapping this rich text component from Kevin Roth
<http://www.kevinroth.com/rte/> and I have it working nicely as a
drop-in tapestry component (assuming correct installation into a
project).
The final step is to put it in it's own component package for easy
sharing across projects. The only concern I have is that the
component needs access to 4 html files, which it uses to show a color
picker, for instance, and which it accesses through some obfuscated
and compressed javascript. So while this is fine when the files are
simply placed in the webapp dir of the main app, how can it gain
access to them when they're packaged into a component jar?
Another way of asking is: what is the tapestry URL to an html file
packaged in a component jar? I've been trying to get the URL to say,
Table.html in the contrib package as an example.
Thanks,
J
--
--
Julian Wood <[EMAIL PROTECTED]>
Software Engineer
Teaching & Learning Centre
University of Calgary
http://tlc.ucalgary.ca
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]