You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "dinh anh khoa (JIRA)" <ta...@jakarta.apache.org> on 2006/08/07 09:01:13 UTC
[jira] Created: (TAPESTRY-1046) EventListener invoke all listener
inside a form eventhought only one event was trigger
EventListener invoke all listener inside a form eventhought only one event was trigger
--------------------------------------------------------------------------------------
Key: TAPESTRY-1046
URL: http://issues.apache.org/jira/browse/TAPESTRY-1046
Project: Tapestry
Issue Type: Bug
Components: Annotations
Affects Versions: 4.1
Environment: OS: Sun Solaris
Tapestry version: 4.1.1
Reporter: dinh anh khoa
Priority: Critical
I had a html template as folow:
<form jwcid="myForm@Form" listener="listener:listener1">
<div jwcid="valueDiv@Any" id="valueDiv" >
<span jwcid="@Insert" value="myValue1" />
<span jwcid="@Insert" value="myValue2" />
<div>
<button type="button" jwcid="btn1@Any" id="btn1" value="Hit me1" />
<button type="button" jwcid="btn2@Any" id="btn2" value="Hit me2" />
</form>
And I declared in java file as folow:
public abstract void setMyValue1(String s);
public abstract void setMyValue2(String s);
@EventListener(events = "onclick", targets = "btn1", submitForm = "myForm")
public void listener1(IRequestCycle cycle) {
setMyValue1( Math.random() + "" );
}
@EventListener(events = "onclick", targets = "btn2", submitForm = "myForm")
public void listener2(IRequestCycle cycle) {
setMyValue2( Math.random() + "" );
}
public void listener(IRequestCycle cycle) {
System.out.println("do nothing");
}
After page rendered, If I click on one of two buttons 'Hit me1' or 'Hitme2' then I saw that all of three listener method were called.
I dont known exactly this is a bug or not, maybe I wrong some thing but I have never see this problem if I use Submit component. Please let me known.
--
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
[jira] Resolved: (TAPESTRY-1046) EventListener invoke all listener
inside a form eventhought only one event was trigger
Posted by "Jesse Kuhnert (JIRA)" <ta...@jakarta.apache.org>.
[ http://issues.apache.org/jira/browse/TAPESTRY-1046?page=all ]
Jesse Kuhnert resolved TAPESTRY-1046.
-------------------------------------
Resolution: Fixed
Fixed, thanks for the bug report..That was a big one! :) Expect the snapshot build to have a corrected version by 8/8/06.
> EventListener invoke all listener inside a form eventhought only one event was trigger
> --------------------------------------------------------------------------------------
>
> Key: TAPESTRY-1046
> URL: http://issues.apache.org/jira/browse/TAPESTRY-1046
> Project: Tapestry
> Issue Type: Bug
> Components: Annotations
> Affects Versions: 4.1
> Environment: OS: Sun Solaris
> Tapestry version: 4.1.1
> Reporter: dinh anh khoa
> Assigned To: Jesse Kuhnert
> Fix For: 4.1.1
>
>
> I had a html template as folow:
> <form jwcid="myForm@Form" listener="listener:listener1">
> <div jwcid="valueDiv@Any" id="valueDiv" >
> <span jwcid="@Insert" value="myValue1" />
> <span jwcid="@Insert" value="myValue2" />
> <div>
> <button type="button" jwcid="btn1@Any" id="btn1" value="Hit me1" />
> <button type="button" jwcid="btn2@Any" id="btn2" value="Hit me2" />
> </form>
> And I declared in java file as folow:
> public abstract void setMyValue1(String s);
> public abstract void setMyValue2(String s);
> @EventListener(events = "onclick", targets = "btn1", submitForm = "myForm")
> public void listener1(IRequestCycle cycle) {
> setMyValue1( Math.random() + "" );
> }
> @EventListener(events = "onclick", targets = "btn2", submitForm = "myForm")
> public void listener2(IRequestCycle cycle) {
> setMyValue2( Math.random() + "" );
> }
> public void listener(IRequestCycle cycle) {
> System.out.println("do nothing");
> }
> After page rendered, If I click on one of two buttons 'Hit me1' or 'Hitme2' then I saw that all of three listener method were called.
> I dont known exactly this is a bug or not, maybe I wrong some thing but I have never see this problem if I use Submit component. Please let me known.
--
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
[jira] Updated: (TAPESTRY-1046) EventListener invoke all listener
inside a form eventhought only one event was trigger
Posted by "Jesse Kuhnert (JIRA)" <ta...@jakarta.apache.org>.
[ http://issues.apache.org/jira/browse/TAPESTRY-1046?page=all ]
Jesse Kuhnert updated TAPESTRY-1046:
------------------------------------
Fix Version/s: 4.1.1
Priority: Major (was: Critical)
> EventListener invoke all listener inside a form eventhought only one event was trigger
> --------------------------------------------------------------------------------------
>
> Key: TAPESTRY-1046
> URL: http://issues.apache.org/jira/browse/TAPESTRY-1046
> Project: Tapestry
> Issue Type: Bug
> Components: Annotations
> Affects Versions: 4.1
> Environment: OS: Sun Solaris
> Tapestry version: 4.1.1
> Reporter: dinh anh khoa
> Fix For: 4.1.1
>
>
> I had a html template as folow:
> <form jwcid="myForm@Form" listener="listener:listener1">
> <div jwcid="valueDiv@Any" id="valueDiv" >
> <span jwcid="@Insert" value="myValue1" />
> <span jwcid="@Insert" value="myValue2" />
> <div>
> <button type="button" jwcid="btn1@Any" id="btn1" value="Hit me1" />
> <button type="button" jwcid="btn2@Any" id="btn2" value="Hit me2" />
> </form>
> And I declared in java file as folow:
> public abstract void setMyValue1(String s);
> public abstract void setMyValue2(String s);
> @EventListener(events = "onclick", targets = "btn1", submitForm = "myForm")
> public void listener1(IRequestCycle cycle) {
> setMyValue1( Math.random() + "" );
> }
> @EventListener(events = "onclick", targets = "btn2", submitForm = "myForm")
> public void listener2(IRequestCycle cycle) {
> setMyValue2( Math.random() + "" );
> }
> public void listener(IRequestCycle cycle) {
> System.out.println("do nothing");
> }
> After page rendered, If I click on one of two buttons 'Hit me1' or 'Hitme2' then I saw that all of three listener method were called.
> I dont known exactly this is a bug or not, maybe I wrong some thing but I have never see this problem if I use Submit component. Please let me known.
--
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
[jira] Assigned: (TAPESTRY-1046) EventListener invoke all listener
inside a form eventhought only one event was trigger
Posted by "Jesse Kuhnert (JIRA)" <ta...@jakarta.apache.org>.
[ http://issues.apache.org/jira/browse/TAPESTRY-1046?page=all ]
Jesse Kuhnert reassigned TAPESTRY-1046:
---------------------------------------
Assignee: Jesse Kuhnert
> EventListener invoke all listener inside a form eventhought only one event was trigger
> --------------------------------------------------------------------------------------
>
> Key: TAPESTRY-1046
> URL: http://issues.apache.org/jira/browse/TAPESTRY-1046
> Project: Tapestry
> Issue Type: Bug
> Components: Annotations
> Affects Versions: 4.1
> Environment: OS: Sun Solaris
> Tapestry version: 4.1.1
> Reporter: dinh anh khoa
> Assigned To: Jesse Kuhnert
> Fix For: 4.1.1
>
>
> I had a html template as folow:
> <form jwcid="myForm@Form" listener="listener:listener1">
> <div jwcid="valueDiv@Any" id="valueDiv" >
> <span jwcid="@Insert" value="myValue1" />
> <span jwcid="@Insert" value="myValue2" />
> <div>
> <button type="button" jwcid="btn1@Any" id="btn1" value="Hit me1" />
> <button type="button" jwcid="btn2@Any" id="btn2" value="Hit me2" />
> </form>
> And I declared in java file as folow:
> public abstract void setMyValue1(String s);
> public abstract void setMyValue2(String s);
> @EventListener(events = "onclick", targets = "btn1", submitForm = "myForm")
> public void listener1(IRequestCycle cycle) {
> setMyValue1( Math.random() + "" );
> }
> @EventListener(events = "onclick", targets = "btn2", submitForm = "myForm")
> public void listener2(IRequestCycle cycle) {
> setMyValue2( Math.random() + "" );
> }
> public void listener(IRequestCycle cycle) {
> System.out.println("do nothing");
> }
> After page rendered, If I click on one of two buttons 'Hit me1' or 'Hitme2' then I saw that all of three listener method were called.
> I dont known exactly this is a bug or not, maybe I wrong some thing but I have never see this problem if I use Submit component. Please let me known.
--
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