Oh sweet, didn't know about the "context:" prefix; I assumed URLResource only took absolute URLs. This works perfect, thanks Andreas!
Andreas Andreou wrote:
The files property (as well as the others) expects a comma separated list of assets. If you're hosting the dojo files yourself, you can use something like: <set property="files" value="context:/dojo102/dojo.js" /> which will build relative urls. Also, there's nothing stopping you from using multiple JavascriptManagers in your app - just define as many as you want and (conditioinally) attach whichever you want to your @Shell On Wed, Apr 9, 2008 at 7:04 PM, Jim <[EMAIL PROTECTED]> wrote:Hello, I'm using Dojo 1.0.2 with Tapestry 4.1.5, using the Tacos approach as a guide. I have a question about the "files" property in the following: <implementation service-id="tapestry.js.JavascriptManager"> <invoke-factory> <construct class="org.apache.tapestry.javascript.JavascriptManagerImpl"> <set-service property="assetSource" service-id="tapestry.asset.AssetSource"/> <set property="files" value="http://[host]:[port]/[AppName]/[path-to-dojo.js]" /> <set property="formFiles" value="" /> <set property="widgetFiles" value="" /> <set property="folder" value="" /> <set property="tapestryFile" value="classpath:/tacos-js/tap-dojo1.0.2.js" /> <set property="tapestryFolder" value="classpath:/tacos-js/" /> </construct> </invoke-factory> </implementation> That "files" property -- everything works fine if I put an absolute URL in there, and this configuration annoyance is eased somewhat if I use system property-replacement instead of a hard-coded URL. However, I have users accessing this application through SSH tunnels, so this absolute-URL approach breaks down. I tried using various relative paths but get Exceptions stemming from: "Unable to update property files of object [EMAIL PROTECTED]" when I use anything but an absolute path. Anyone know how to get around this, or a better way? Thanks, Jim --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
