oh my gosh! it works like a charm! thanks very very very much on this thiago.you save my day, i've been cracking my head open the past few days trying to figure this out. thanks much =D
sincered regards, wesley Thiago H. de Paula Figueiredo wrote: > > Em Wed, 04 Feb 2009 15:23:41 -0300, wesleywj2 <wesley...@yahoo.co.uk> > escreveu: > >> hi thiago, > > Hi again! > >> i've added the configuration inside my AppModule for the javascript: >> i 've actually implemented the tree inside my class, >> >> @AfterRender >> public void afterRender() { >> String jsString = ""; >> jsString += "Event.observe(window,'load',function(){"; >> jsString += " treeObj = new JSDragDropTree(); "; >> jsString += " treeObj.setTreeId('bststruct'); "; >> jsString += " treeObj.setImageFolder('../images/'); "; >> jsString += " treeObj.setRenameAllowed(false); "; >> jsString += " treeObj.setDeleteAllowed(false); "; >> jsString += " treeObj.initTree(); "; >> renderSupport.addScript(String.format(jsString)); >> } > > Seems ok. > >> next is what about in the tml page? > > Nothing! You should see you Javascript code added to a <script> tag inside > the page. > >> <t:Tree treeid='literal:bststruct' source="treeNodes" >> currentNode="node"> >> <t:actionlink t:id="tree" context="node.identifier"> >> ${node.name} >> </t:actionlink> >> </t:Tree> >> >> <script type="text/javascript"> >> treeObj = new JSDragDropTree(); >> treeObj.setTreeId('bststruct'); >> treeObj.setImageFolder('../images/'); >> treeObj.setRenameAllowed(false); >> treeObj.setDeleteAllowed(false); >> treeObj.initTree(); >> </script> > > You should never use a script tag to include Javascript in your .tml file. > That's what renderSupport.addScript() does, but it does in the right > place. ;) > > -- > Thiago H. de Paula Figueiredo > Independent Java consultant, developer, and instructor > http://www.arsmachina.com.br/thiago > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > > -- View this message in context: http://www.nabble.com/how-to-use-%40IncludeJavaScriptLibrary-to-include-more-than-1-library-in-page-tp21834042p21836760.html Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org