You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Wojtek Ciesielski <cc...@interia.pl> on 2007/04/06 16:07:08 UTC

Keeping JavaScripts in a .js file instead of .script

Hi there,

Is there ANY sensible way to keep component's javascript in a .js file 
instead of that .script XML one? Because of an XML format I can't use 
any syntax-colouring editor with it, also all < > or & chars need  to be 
encoded as an HTML entities... What on earth caused anybody to use XML 
for storing javascript ?

Wojtek

Re: Keeping JavaScripts in a .js file instead of .script

Posted by Andreas Andreou <an...@di.uoa.gr>.
???

1) inside xml you can have
<![CDATA[
anything, even < > &
]]>

2) you don't have to use .script files, they serve a very specific purpose =
writing out dynamic js.

3) Take a look at
http://tapestry.apache.org/tapestry4.1/usersguide/script.html
there's an include-script section!

4) You can directly add js in your pages, without messing with .script if
that's what you
simply want.


On 4/6/07, Wojtek Ciesielski <cc...@interia.pl> wrote:
>
> Hi there,
>
> Is there ANY sensible way to keep component's javascript in a .js file
> instead of that .script XML one? Because of an XML format I can't use
> any syntax-colouring editor with it, also all < > or & chars need  to be
> encoded as an HTML entities... What on earth caused anybody to use XML
> for storing javascript ?
>
> Wojtek
>



-- 
Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / JEE Consulting

Re: Keeping JavaScripts in a .js file instead of .script

Posted by Howard Lewis Ship <hl...@gmail.com>.
The goal of the design is that you put 95% of your logic into a static
.js file, references from your .script file.  The purpose of the
.script is to provide the dynamically generated glue code ... things
like event registrations and such.

On 4/6/07, Wojtek Ciesielski <cc...@interia.pl> wrote:
> Hi there,
>
> Is there ANY sensible way to keep component's javascript in a .js file
> instead of that .script XML one? Because of an XML format I can't use
> any syntax-colouring editor with it, also all < > or & chars need  to be
> encoded as an HTML entities... What on earth caused anybody to use XML
> for storing javascript ?
>
> Wojtek
>


-- 
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

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