The displayed html is blank because you have not given the property text a value.
Try giving the property text an initial value by @InitialValue("literal:Hello World") public abstract String getText(); or set it in the pageBeginRender method. Shing --- Marcus Thiesen <[EMAIL PROTECTED]> wrote: > Hi List, > > I'm currently playing with the new and fancy AJAX > components in Tapestry 4.1.1 > but I can't get them to work. > > My minimal test case is: > > Java: > package pages; > > import > org.apache.tapestry.annotations.EventListener; > import org.apache.tapestry.html.BasePage; > > public abstract class TestInlineEditPage extends > BasePage { > > public abstract String getText(); > > > @EventListener(events = "onSave", > targets="testEdit") > public void onTextUpdate() > { > System.out.println("Event listener called"); > } > > > } > > HTML Template: > <html jwcid="@Shell" title="Test" > browserLogLevel="DEBUG" > consoleEnabled="true" > debugEnabled="false" > > > > <body jwcid="@Body"> > > <div jwcid="testEdit" /> > > </body> > </html> > > Mapping file: > <?xml version="1.0" encoding="UTF-8"?> > <!DOCTYPE page-specification PUBLIC > "-//Apache Software Foundation//Tapestry > Specification 4.0//EN" > > "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd"> > > <page-specification > class="pages.TestInlineEditPage"> > > <component id="testEdit" type="InlineEditBox" > > <binding name="value" value="text" /> > </component> > </page-specification> > > > What I see when I access the above page is more or > less plain nothing (the > generated HTML is at the end of this mail). The > JavaScript error console > shows as last error: > > Error: impl is not a constructor > Source File: > http://localhost:8080/testapp/assets/static/dojo/dojo.js > Line: 1021 > > I played with this for about 5 hours now. The > example application > (TimeTracker) works for me. I copied the setup > (hivemodule.xml and web.xml) > configuration more or less as is into my > application. I tried different > versions of Tapestry (current 4.1.2-SNAPSHOT, the > version that comes with the > prebuild example application) with no effect. > > I have the feeling that I'm missing something quit > obvious but have no idea > what it is. > > Any suggestions? > > Have fun, > Marcus > > Generated HTML Listing: > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 > Transitional//EN" > "http://www.w3.org/TR/html4/loose.dtd"> > <!-- Page: TestInlineEdit --> > <!-- Generated: Wed Jan 31 10:36:43 CET 2007 --> > <html> > <head> > <meta name="generator" content="Tapestry Application > Framework, version > 4.1.2" /> > <meta http-equiv="Content-Type" > content="text/html;charset=UTF-8" /> > <title>Test</title> > <script type="text/javascript">djConfig = > {"isDebug":false,"debugContainerId":"debug","baseRelativePath":"/testapp/assets/static/dojo/","preventBackButtonFix":false,"parseWidgets":false,"locale":"af"} > > </script> > > <script type="text/javascript" > src="/testapp/assets/static/dojo/dojo.js"></script> > <script type="text/javascript"> > dojo.registerModulePath("tapestry", > "/testapp/assets/static/tapestry"); > > </script> > <script type="text/javascript" > src="/testapp/assets/static/tapestry/core.js"></script> > <script type="text/javascript"> > dojo.require("tapestry.namespace"); > </script> > </head> > > > <body id="Body"> > <script type="text/javascript"><!-- > dojo.require("tapestry.widget.Widget"); > dojo.require("tapestry.event"); > // --></script> > > <div id="testEdit"></div> > > <script type="text/javascript"><!-- > dojo.addOnLoad(function(e) { > tapestry.widget.synchronizeWidgetState("testEdit", > "InlineEditBox", > {"widgetId":"testEdit","mode":"text","minWidth":100,"minHeight":200,"doFade":false}, > > false); > > var inlineBox=dojo.widget.byId("testEdit"); > > inlineBox.enable(); > tapestry.cleanConnect(dojo.widget.byId("testEdit"), > "onSave", "event846691032"); > tapestry.event846691032=function(e){ > var > content={beventname:"onSave"}; > > tapestry.event.buildEventProperties(e, content); > if (!content["beventtarget.id"]) > > content["beventtarget.id"]="testEdit"; > > tapestry.bind("/testapp/directevent.svc?component=testEdit&page=TestInlineEdit&session=T", > > content); > }; > > dojo.event.connect(dojo.widget.byId("testEdit"), > "onSave", > tapestry, "event846691032");}); > // --></script></body> > > </html> > <!-- Render time: ~ 16 ms --> > > -- > Marcus Thiesen > Bachelor of Science (BSc) > > freiheit.com technologies gmbh > Straßenbahnring 22 / 20251 Hamburg, Germany > fon +49 (0)40 / 890584-0 > fax +49 (0)40 / 890584-20 > > 0553 222D ABF2 DF71 0CF6 C262 C77E 2AAF 6BE4 4DA4 > > Bücher kaufen und Freie Software fördern | > http://bookzilla.de/ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > Home page : http://uk.geocities.com/matmsh/index.html ___________________________________________________________ Yahoo! Messenger - with free PC-PC calling and photo sharing. http://uk.messenger.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]