DOH! --- silly spelling mistake. Thanks. Its working now.


mxc wrote:
> 
> Hi all,
> 
> I cant get dojo EventListener to work. I am trying to build a drop down
> combo box so that when one selects a country the child drop down box of
> cities is automatically updated. However I cant get even a simple
> eventlistener to work :(
> 
> Below is my TestPage. Basically it should update the element id="output"
> when a click event occurs on the element id="testbutton"
> 
> I can see from the debug output that the event is being fired but the
> update never occurs. :(
> 
> 
> TestPage.html
> ==================================
> <html jwcid="@MainFrame" title="Wazzup - List Regions" heading="Regions
> List">
>               <div id="testbutton">Click Me</div>
>               <div jwcid="[EMAIL PROTECTED]">
>                       Test
>             </div>
> </html>
> 
> MainFrame.html
> =======================
> <?xml version="1.0"?>
> <html jwcid="@Shell" title="ognl:title" ajaxEnabled="true" 
> browserLogLevel="DEBUG">
>     <body jwcid="@Body">
>               <div style="float:left">
>                                       <table>
>                                               <tr><td> # Test Page </td></tr>
>                                               </table>
>               </div>
>               <div><h1>Some Heading Here</h1></div>
>               <div  jwcid="@RenderBody">Some Content Here</div>
>     </body>
>  </html> 
> 
> TestPage.java
> ================
> 
> public abstract class TestPage extends BasePage  {
>       public abstract void setTestText(String text);
>       public abstract String getTestText();
> 
>       @EventListener(elements = "testbutton", events = "onclick")
>       public void changeText(IRequestCycle cycle, BrowserEvent event)
>       {
>               setTestText("Help");
>               cycle.getResponseBuilder().updateComponent("output");
>       }
> }
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Cant-get-Ajax-%40EventListener-to-work-%3A%28-tf3484687.html#a9765181
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to