You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Andy Pahne <ap...@der-die-das.org> on 2004/11/06 23:46:00 UTC

script specification does not take effect

I created a custom component "Popup" with the component spec and a 
template located in the correct places. The component renders, so it 
seems fine so far.

Then i included a script definition "Popup.script" inside /WEB-INF/, but 
it has no effect. Allthough I do use a Body component, the script's body
is not inserted in the proper place. The include-script is not either.





<?xml version="1.0"?>
<!DOCTYPE script PUBLIC
	"-//Apache Software Foundation//Tapestry Script Specification 3.0//EN"
	"http://jakarta.apache.org/tapestry/dtd/Script_3_0.dtd">

<script>

     <include-script  resource-path="/itoskop/web/components/pop.js" />

      <body>
         <unique>
             <![CDATA[
             // make new popup window
		function pop(oAnchor,sProps,sWindow){
			...
		}
             ]]>
         </unique>
      </body>


</script>












---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: script specification does not take effect

Posted by "Filip S. Adamsen" <fi...@stubkjaer-adamsen.dk>.
The resource-path is relative to the classpath. That's probably why your 
library does not get included.

-Filip

Andy Pahne wrote:
> 
> I created a custom component "Popup" with the component spec and a 
> template located in the correct places. The component renders, so it 
> seems fine so far.
> 
> Then i included a script definition "Popup.script" inside /WEB-INF/, but 
> it has no effect. Allthough I do use a Body component, the script's body
> is not inserted in the proper place. The include-script is not either.
> 
> 
> 
> 
> 
> <?xml version="1.0"?>
> <!DOCTYPE script PUBLIC
>     "-//Apache Software Foundation//Tapestry Script Specification 3.0//EN"
>     "http://jakarta.apache.org/tapestry/dtd/Script_3_0.dtd">
> 
> <script>
> 
>     <include-script  resource-path="/itoskop/web/components/pop.js" />
> 
>      <body>
>         <unique>
>             <![CDATA[
>             // make new popup window
>         function pop(oAnchor,sProps,sWindow){
>             ...
>         }
>             ]]>
>         </unique>
>      </body>
> 
> 
> </script>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
>