Hi,
This is in regards to the external-asset,
I am using Kevin C. Dorff's Tutorial in this aspect : example hangman2:
Guess.page
I want to use external asset for the images
so instead of
<context-asset name="wrong_0" path="/images/0.gif"/>
I want to try
<external-asset name="wrong_0"
URL="file:///C:/jakarta-tomcat-5.0.28/webapps/hangman2/context/images/0.gif"></external-asset>
But this is giving error, its requesting the classpath for the component.
Here is the complete .page
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE page-specification
PUBLIC "-//Apache Software Foundation//Tapestry Specification 3.0//EN"
"http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd">
<page-specification class="tutorial.hangman.Guess">
<context-asset name="stylesheet" path="/css/hangman.css"/>
<external-asset name="wrong_0"
URL="file:///C:/jakarta-tomcat-5.0.28/webapps/hangman2/context/images/0.gif"></external-asset>
<!--
<context-asset name="wrong_0" path="/images/0.gif"/>
-->
<context-asset name="wrong_1" path="/images/1.gif"/>
<context-asset name="wrong_2" path="/images/2.gif"/>
<context-asset name="wrong_3" path="/images/3.gif"/>
<context-asset name="wrong_4" path="/images/4.gif"/>
<context-asset name="wrong_5" path="/images/5.gif"/>
<context-asset name="wrong_6" path="/images/6.gif"/>
<context-asset name="wrong_7" path="/images/7.gif"/>
<context-asset name="wrong_8" path="/images/8.gif"/>
<context-asset name="wrong_9" path="/images/9.gif"/>
<context-asset name="wrong_10" path="/images/10.gif"/>
<component id="guessImage" type="Image">
<binding name="image" _expression="guessImageAsset"/>
</component>
<component id="insertGuess" type="Insert">
<binding name="value" _expression="page.visit.game.guess"/>
</component>
<component id="insertMissed" type="Insert">
<binding name="value" _expression="page.visit.game.missed"/>
</component>
<component id="insertMaxMisses" type="Insert">
<binding name="value" _expression="page.visit.game.maxMisses"/>
</component>
<component id="ifComplete" type="Conditional">
<binding name="condition" _expression="page.visit.game.gameComplete"/>
</component>
<component id="ifNotComplete" type="Conditional">
<binding name="condition" _expression="!page.visit.game.gameComplete"/>
</component>
<component id="ifError" type="Conditional">
<binding name="condition" _expression="hasError"/>
</component>
<component id="insertError" type="Insert">
<binding name="value" _expression="error"/>
</component>
<component id="e" type="Foreach">
<binding name="source" _expression="page.visit.game.unused"/>
</component>
<component id="guess" type="DirectLink">
<binding name="listener" _expression="listeners.makeGuess"/>
<binding name="parameters" _expression="components.e.value"/>
</component>
<component id="insertLetter" type="Insert">
<binding name="value" _expression="components.e.value"/>
</component>
<component id="giveUp" type="PageLink">
<static-binding name="page">
Failed
</static-binding>
</component>
<component id="insertCorrectWord" type="Insert">
<binding name="value" _expression="page.visit.game.correctWord"/>
</component>
<component id="home" type="PageLink">
<static-binding name="page">
Home
</static-binding>
</component>
</page-specification>
---------------------------------
Yahoo! Messenger
Show us what our next emoticon should look like. Join the fun.