You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Adam Saltiel <ad...@btinternet.com> on 2003/07/14 01:45:04 UTC

javascript in tapestry - 1

Indah,
This should be addressed to Tapestry users.
I have gathered some pointers from others emails for reference.
I included replies and original message(s) in reverse - as they appear
in the list.
Adam Saltiel

Howard M. Lewis Ship [hlship@attbi.com] Mon 05/05/2003 15:06
'Tapestry users'
RE: JavaScript from private asset not included into page
I <private-asset> just declares an asset, it doesn't include it in the
page. The Script component can help here.

--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/tapestry



> -----Original Message-----
> From: Denis Ponomarev [mailto:oz@romsat.ua]
> Sent: Monday, May 05, 2003 7:02 AM
> To: tapestry-user@jakarta.apache.org
> Subject: JavaScript from private asset not included into page
>
>
> Hello tapestry users!
>
> I've designed my component, which uses external static
> JavaScript. I want to put this script into the component's
> library jar. So I need to specify private asset in my *.jwc:
>
> <private-asset name="script" resource-path="MyScript.js"/>
>
> I've expected something like
>
> <script language="JavaScript" type="text/javascript"
> src="/mysite/app?service=asset&HereIsFullPathToMyScrip.js"></script>
>
> on the rendered page, but there is no such.
> Page contains Body and Shell components.
> Did I forgot something else?
>
> Please help.
>
> Thank you.
>
> --
> Denis
>
>
> ---------------------------------------------------------------------

Joel Trunick [Joel@SmartPrice.com] Wed 04/06/2003 14:51
'Tapestry users'
RE: JavaScript Menu --PLEASE!!!
If the pages you are redirecting to need data passed in, you can use the
IExternalPage functionality. Otherwise, you can use PageLink or even
build the page links "by hand".

J

-----Original Message-----
From: Per Norrman [mailto:pernorrman@telia.com]
Sent: Wednesday, June 04, 2003 5:05 AM
To: 'Tapestry users'
Subject: SV: JavaScript Menu --PLEASE!!!


Hi,



>>Right now, I cannot see how to provide URL:s for your menu items, but
>>I'm sure someone else has come across this before and solved it.

/pmn


> -----Ursprungligt meddelande-----
> Fr�n: Joan Harrison [mailto:srcfrguser@yahoo.co.uk]
> Skickat: den 4 juni 2003 00:14
> Till: tapestry-user@jakarta.apache.org
> �mne: JavaScript Menu --PLEASE!!!
>
>
> Hi All,
>    I am really need help from this forum please !!!.
> As any body in this forum have ever tried buiding Menu with
> Tapestry2.4/3.0 using javascript!.??
>
> For our project we are trying to biuld dropdown menu and data
> to menu ( javascript) is from Database ( and not hard coded).
>
> I heard from many people in this forum that knitting
> Javascript within Tapestry is very easy but I can't get this
> idea at all.
>
> would some one in this forum please help me to build menu.
>
> FYI, menus I am trying to build is like the one shown in
> BrainJar.com ( http://www.brainjar.com/dhtml/menubar/demo.html).
>
> your help is much much appreciated.
>
> R.
> Joan.
>
>
>
>
>
>
> ---------------------------------
> Yahoo! Plus - For a better Internet experience
>


---------------------------------------------------------------------

Neil Clayton [neil@cloudnine.net.nz] Thu 05/06/2003 22:20
Tapestry users
Re: Tree Components (and the Misko Hevery TreeComponent)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Righteo then ... the source HTML to TreeView has a @Body tag (this is
from
memory, I hope it is called TreeView - I think it is).

from what I understand so far, this is the root component, which you
need to
provide a model (which includes both state and data). The TreeView
component
is the one that inserts the appropriate Javascript into the rendered
page.

When you include this component inside a page which already has a Body
component,  you get an exception.

I'm not using frames at all. This is a single page, where the TreeView
is
simply another component nested alongside other components.

Neil

On Thursday 05 Jun 2003 9:41 pm, F. Da Costa Gomez wrote:
> Whoah dude,
>
> Basically I modded some little bits and pieces. The only real work
> were the node renderer and the state-model. Also changed the script
> somewhat to muck about a bit with hashtables. Can't remember doing
> anything semi-smart to the html code though.
>
> So, what do you exactly mean by: "How do you use it INSIDE an existing

> Body tag" I'm using the tree within a popup or a frame (for now that
> is). Maybe thats the reason why I'm not folowing exactly?
>
> Tell ye what though.
> 2Mrow I have to be present at a wedding  :-( so I'll try to clean the
> code up a bit over the weekend and post the src to the list (wish
> tsvetelin was back already so he could he a look as well).
>
> Cheers,
> Fermin DCG
>
> Neil Clayton wrote:
> >-----BEGIN PGP SIGNED MESSAGE-----
> >Hash: SHA1
> >
> >Great.
> >
> >I'm using it to present the source(s) and destination(s) for a backup

> >application, whereby each location can have rules associated with it.

> >I  could do this with other UI components, but I like trees and it
> >feels  natural.
> >
> >One question tho:
> >How do you use it INSIDE an existing Body tag? The TreeView (which
> >also contains the script component) has it's own, and it is not
> >possibe in Tapestry to nest body components....
> >
> >also the build.xml appears to build an incorrect jar - did you find
> >this  as well?
> >
> >Neil
> >
> >On Thursday 05 Jun 2003 11:41 am, F. Da Costa Gomez wrote:
> >>Hi,
> >>
> >>Y'r abs right, it does work quite well.
> >>Dunno what y'll be using it for but I've just finished (or almost at
> >>least) making the thing selectable.
> >>Meaning? a checkbox next to every node so that a user can do 'check'

> >>(uncheck). Since less traffic is better I had to implement some
> >>additional js as well make sure that the server is only hit when a
> >>branch node is clicked. In order to 'remember what had been selected

> >>(and possibly hidden from sight again) I had to expand the
> >>state-model to incorporate a 'checked or not' memory.
> >>Actual 'checked' processing takes place on submission of the tree to
a
> >>listener (this is when the whole thing gets processed for the goal
the
> >>tree is being used). Again, this saves a lot of rendering and
traffic.
> >>Also prepping the thing to include cursorkey-navigation (got some js
> >>snippets but still have to add them, nice to have).
> >>
> >>Done all that so there is only one thing left and that is updating
> >>the originating page with the results fromm the tree. Again, dunno
> >>what your aim is but if you got an idea on it plz don't hesitate.
> >>
> >>Cheers,
> >>Fermin DCG
> >>
> >>btw. Wanna get the code checked by tsvetelin prior to 'handing' it
> >>to tacos 'official like'.
> >>
> >>Neil Clayton wrote:
> >>>-----BEGIN PGP SIGNED MESSAGE-----
> >>>Hash: SHA1
> >>>
> >>>I did a while ago (before deciding to use Miskos one), and it
> >>>didn't render properly on Mozilla.  Upon trying it again I see it
> >>>does. Upon looking at the code I see it has a much better data and
> >>>state model.
> >>>
> >>>sold to the man in the green shirt.
> >>>
> >>>does anyone know why it's not part of the standard contrib of
> >>>Tapestry?
> >>>
> >>>Neil
> >>>
> >>>On Wednesday 04 Jun 2003 11:50 pm, Shantanu Deo wrote:
> >>>>have you tried the tacos-tree component yet ?
> >>>>
> >>>>There is Tree component implementation that is part of tacos
> >>>>project: http://tacos.sourceforge.net/tacos-tree
> >>>>There are 2 simple demos too (please visit a
> >>>>http://tree.rushmore-register.com/tree for file system demo).
> >>>
> >- --
> >Regards,
> >Neil Clayton
> >
> >(PS: If you see strange text you don't understand underneath my
> >email,  don't worry - it's just my PGP signature) -----BEGIN PGP

- --
Regards,
Neil Clayton

(PS: If you see strange text you don't understand underneath my email,
don't
worry - it's just my PGP signature)