You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Jesse Kuhnert (JIRA)" <ta...@jakarta.apache.org> on 2006/08/09 23:58:14 UTC

[jira] Assigned: (TAPESTRY-1051) EventListener does not allow use of versions of methods with BrowserEvent and RequestCyle parameters

     [ http://issues.apache.org/jira/browse/TAPESTRY-1051?page=all ]

Jesse Kuhnert reassigned TAPESTRY-1051:
---------------------------------------

    Assignee: Jesse Kuhnert

> EventListener does not allow use of versions of methods with BrowserEvent and RequestCyle parameters
> ----------------------------------------------------------------------------------------------------
>
>                 Key: TAPESTRY-1051
>                 URL: http://issues.apache.org/jira/browse/TAPESTRY-1051
>             Project: Tapestry
>          Issue Type: Bug
>          Components: Annotations
>    Affects Versions: 4.1, 4.1.1
>         Environment: XP
> Tomcat 5.0.1.9
> Java 1.5.0_01
> Tapestry 4.1 or 4.1.1 snapshot
>            Reporter: Dom Couldwell
>         Assigned To: Jesse Kuhnert
>
> I've split this down into a very simple example:
> TestEventListener.hml:
> <html jwcid="@Shell" title="Tes Event Listener">
> <body jwcid="@Body">
>   <form jwcid="myForm@Form">
>     <div>
>       <input id="test" type="button" value="Hi"/>
>     </div>
>     <div>
>       <span jwcid="refreshme@Insert"
>             value="ognl:clicked"
>             id="refreshme"
>             class=""/>
>     </div>
>   </form>
> </body>
> </html>
> TestEventListener.java
> package com.db.rdq.web.page;
> import org.apache.commons.logging.Log;
> import org.apache.commons.logging.LogFactory;
> import org.apache.tapestry.IExternalPage;
> import org.apache.tapestry.IRequestCycle;
> import org.apache.tapestry.annotations.EventListener;
> import org.apache.tapestry.annotations.InitialValue;
> import org.apache.tapestry.annotations.Persist;
> import org.apache.tapestry.event.BrowserEvent;
> import org.apache.tapestry.html.BasePage;
> public abstract class TestEventListener extends BasePage implements
>         IExternalPage {
>     
>     @Persist
>     @InitialValue("true")
>     public abstract void setClicked(boolean bool);
>     public abstract boolean getClicked();
>     private static final Log log = LogFactory.getLog(TestEventListener.class);
>     
>     public void activateExternalPage(Object[] parameters, IRequestCycle cycle) {
>     }
>     @EventListener(events = "onclick", elements = "test", submitForm = "myForm")
>     public void clicked(){
>         log.info("Hi");
>         log.info(getClicked());
>         setClicked(!getClicked());
>         getRequestCycle().getResponseBuilder().updateComponent("refreshme"); 
>     }
> }
> This all works ok but if then update clicked to be:
>     @EventListener(events = "onclick", elements = "test", submitForm = "myForm")
>     public void clicked(BrowserEvent event){
>         log.info("Hi");
>         log.info(getClicked());
>         setClicked(!getClicked());
>         getRequestCycle().getResponseBuilder().updateComponent("refreshme"); 
>     }
> it blows up at runtime with the error:
> No listener method named 'clicked' suitable for no listener parameters found in $TestEventListener_61@20e54a[TestEventListener].
> I'm accesing thsi test using the URL:
> http://dbnycws72331.dbg.ads.db.com:8080/RDQ/app?service=external&page=TestEventListener
> yell if you need any more info.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org