Try removing the part <head> <title>Ajax</title> <link jwcid="@Style" href="stylesheets/main.css" media="all"/> </head>
from your template html file , because is already generated by the @Shell component in the resulted html file. Cheers, Alex On 1/10/07, Daniel Anguita O. <[EMAIL PROTECTED]> wrote:
Hi Mika Mika Tammilehto escribi�: > Hi Daniel > >> I wrote that to the page head and it's OK. I run the app and i don't >> get any error message... BUT, it doesnt works... the 'ajax-thing' >> dont do anything.. >> What do you mean with : "same params apply for Shell-component as >> well". What Shell-component? sorry, but im learning :D > > The Shell component outputs the same script tags required for > dojo/ajax, but also the <html> as well as <head>, i.e. basically > everything required around the <body>. > >> >> im using the Firefox Console Error and it's everything all right now, >> but it doesnt works. >> to develope my app i'm using eclipse and tomcat for windows... I'm >> learning from the book "Enjoying Web Development with Tapestry". >> >> HELP! if you need to see the code just ask for it, please help! >> > > Maybe have a look at the html source that is rendered, e.g. if there > are onclick events on your DirectLinks etc. > > Did you set async="true" on the components (form, link)? Did you set > updateComponents="..."? > > Hope that helps you a little bit further! > > mika > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > This is what my: Class:--------------------------------------- import org.apache.tapestry.html.BasePage; import org.apache.tapestry.annotations.EventListener; import org.apache.tapestry.event.*; public abstract class Ajax extends BasePage{ @EventListener(elements = "deDiv", events = "onclick", async=true) public void watchText(BrowserEvent e) { System.out.println("Hola <script>alert('hola');</script>"); } } --------------------------------------------- Page:--------------------------------------- <?xml version="1.0"?> <!DOCTYPE page-specification PUBLIC "-//Apache Software Foundation//Tapestry Specification 4.1//EN" "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_1.dtd"> <page-specification class="austec.chileansky.remotecontrol.Ajax"> </page-specification> -------------------------------------------- Html--------------------------------------- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html jwcid="@Shell" title="Ajax"> <head> <title>Ajax</title> <link jwcid="@Style" href="stylesheets/main.css" media="all"/> </head> <body jwcid="@Body"> <div id="deDiv" class="box">Big brother is watching you.</div> </body> </html> -------------------------------------------- and finally, the html rendered with Firefox: HTML Rendered--------------------------- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- Application: RemoteControl --> <!-- Page: Ajax --> <!-- Generated: Wed Jan 10 17:50:45 CLST 2007 --> <html> <head> <meta name="generator" content="Tapestry Application Framework, version 4.1.1" /> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /> <title>Ajax</title> <script type="text/javascript">djConfig = {"isDebug":true,"debugContainerId":"debug","baseRelativePath":"/RemoteControl/app?service=asset&path=%2Fdojo%2F","preventBackButtonFix":false,"parseWidgets":false,"locale":"es-ar"} </script> <script type="text/javascript" src="/RemoteControl/app?service=asset&path=%2Fdojo%2Fdojo.js"></script> <script type="text/javascript"> dojo.registerModulePath("tapestry", "/RemoteControl/app?service=asset&path=%2Ftapestry%2F"); </script> <script type="text/javascript" src="/RemoteControl/app?service=asset&path=%2Ftapestry%2Fcore.js"></script> <script type="text/javascript"> dojo.require("dojo.logging.Logger"); dojo.log.setLevel(dojo.log.getLevel("WARNING")); dojo.require("tapestry.namespace"); </script> <link rel="stylesheet" type="text/css" media="all" href="stylesheets/main.css" /> </head> <head> <title>Ajax</title> </head> <body id="Body"> <script type="text/javascript"><!-- dojo.require("tapestry.event"); // --></script> <div id="deDiv" class="box">Big brother is watching you.</div> <script type="text/javascript"><!-- dojo.addOnLoad(function(e) { tapestry.cleanConnect(dojo.byId("deDiv"), "onclick", "event389921977"); tapestry.event389921977=function(e){ var content={beventname:"onclick"}; tapestry.event.buildEventProperties(e, content); if (!content["beventtarget.id"]) content["beventtarget.id"]="deDiv"; tapestry.bind("/RemoteControl/app?page=Ajax&service=directevent", content); }; dojo.event.connect(dojo.byId("deDiv"), "onclick", tapestry, "event389921977");}); // --></script></body> - </html> <!-- Render time: ~ 78 ms --> -------------------------------------------- Everything seems to be right and working... no error prompts and nothing bad... but, when i click de Div, nothing happens.. i can see that there's no "onclick" statement on my div, that I suppose tapestry have to insert.. but it doesnt.. or i have to put the onclick myself?.. with what paramas?.. etc... HELP! Cheers --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]