You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Julian Wood (JIRA)" <de...@tapestry.apache.org> on 2007/05/29 23:08:16 UTC
[jira] Created: (TAPESTRY-1524) Lose EventListener handling if you
update a component containing that EventListener target
Lose EventListener handling if you update a component containing that EventListener target
------------------------------------------------------------------------------------------
Key: TAPESTRY-1524
URL: https://issues.apache.org/jira/browse/TAPESTRY-1524
Project: Tapestry
Issue Type: Bug
Components: XHR/dhtml/Ajax
Affects Versions: 4.1.2
Environment: java 1.5.0_07, osx 10.4.9, tomcat 5.5.24
Reporter: Julian Wood
Priority: Minor
It seems that if you update a component inside which there is another component on which there is an EventListener, you will lose that EventListener.
For example:
<div jwcid="myTable@Any">
<div id="nameHeader">Name<span jwcid="@Insert" value="ognl:sortAscending?' ^':' v'"/></div>
</div>
@InitialValue("ognl:false")
@Persist
public abstract Boolean getSortAscending();
public abstract void setSortAscending(Boolean sortAscending);
@EventListener(elements = "nameHeader", events = "onclick", async = true)
public void sort(IRequestCycle cycle)
{
setSortAscending(!getSortAscending());
cycle.getResponseBuilder().updateComponent("myTable");
}
So if you load this up in a browser, then click on 'Name v', it changes to 'Name ^' like it should. But if you click it again, it has lost it's EventListener, and 'Name ^' doesn't change. The ajax response didn't include this bit which creates and connects the event:
tapestry.cleanConnect(dojo.byId("nameHeader"), "onclick", "event1702620775");
tapestry.event1702620775=function(e){
var content={beventname:"onclick"};
tapestry.event.buildEventProperties(e, content);
if (!content["beventtarget.id"]) content["beventtarget.id"]="nameHeader";
tapestry.bind("/myapp/app?component=adminBillableItems&page=Admin&service=directevent&session=T", content);
};
dojo.event.connect(dojo.byId("nameHeader"), "onclick", tapestry, "event1702620775");});
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Updated: (TAPESTRY-1524) Lose EventListener handling if you
update a component containing that EventListener target
Posted by "Marcus Schulte (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-1524?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marcus Schulte updated TAPESTRY-1524:
-------------------------------------
Fix Version/s: (was: 4.1.6)
4.1.7
> Lose EventListener handling if you update a component containing that EventListener target
> ------------------------------------------------------------------------------------------
>
> Key: TAPESTRY-1524
> URL: https://issues.apache.org/jira/browse/TAPESTRY-1524
> Project: Tapestry
> Issue Type: Bug
> Components: XHR/dhtml/Ajax
> Affects Versions: 4.1.2
> Environment: java 1.5.0_07, osx 10.4.9, tomcat 5.5.24
> Reporter: Julian Wood
> Priority: Minor
> Fix For: 4.1.7
>
>
> It seems that if you update a component inside which there is another component on which there is an EventListener, you will lose that EventListener.
> For example:
> <div jwcid="myTable@Any">
> <div id="nameHeader">Name<span jwcid="@Insert" value="ognl:sortAscending?' ^':' v'"/></div>
> </div>
> @InitialValue("ognl:false")
> @Persist
> public abstract Boolean getSortAscending();
> public abstract void setSortAscending(Boolean sortAscending);
> @EventListener(elements = "nameHeader", events = "onclick", async = true)
> public void sort(IRequestCycle cycle)
> {
> setSortAscending(!getSortAscending());
> cycle.getResponseBuilder().updateComponent("myTable");
> }
> So if you load this up in a browser, then click on 'Name v', it changes to 'Name ^' like it should. But if you click it again, it has lost it's EventListener, and 'Name ^' doesn't change. The ajax response didn't include this bit which creates and connects the event:
> tapestry.cleanConnect(dojo.byId("nameHeader"), "onclick", "event1702620775");
> tapestry.event1702620775=function(e){
> var content={beventname:"onclick"};
> tapestry.event.buildEventProperties(e, content);
> if (!content["beventtarget.id"]) content["beventtarget.id"]="nameHeader";
> tapestry.bind("/myapp/app?component=adminBillableItems&page=Admin&service=directevent&session=T", content);
> };
> dojo.event.connect(dojo.byId("nameHeader"), "onclick", tapestry, "event1702620775");});
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Updated: (TAPESTRY-1524) Lose EventListener handling if you
update a component containing that EventListener target
Posted by "Jesse Kuhnert (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-1524?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jesse Kuhnert updated TAPESTRY-1524:
------------------------------------
Fix Version/s: 4.1.3
> Lose EventListener handling if you update a component containing that EventListener target
> ------------------------------------------------------------------------------------------
>
> Key: TAPESTRY-1524
> URL: https://issues.apache.org/jira/browse/TAPESTRY-1524
> Project: Tapestry
> Issue Type: Bug
> Components: XHR/dhtml/Ajax
> Affects Versions: 4.1.2
> Environment: java 1.5.0_07, osx 10.4.9, tomcat 5.5.24
> Reporter: Julian Wood
> Priority: Minor
> Fix For: 4.1.3
>
>
> It seems that if you update a component inside which there is another component on which there is an EventListener, you will lose that EventListener.
> For example:
> <div jwcid="myTable@Any">
> <div id="nameHeader">Name<span jwcid="@Insert" value="ognl:sortAscending?' ^':' v'"/></div>
> </div>
> @InitialValue("ognl:false")
> @Persist
> public abstract Boolean getSortAscending();
> public abstract void setSortAscending(Boolean sortAscending);
> @EventListener(elements = "nameHeader", events = "onclick", async = true)
> public void sort(IRequestCycle cycle)
> {
> setSortAscending(!getSortAscending());
> cycle.getResponseBuilder().updateComponent("myTable");
> }
> So if you load this up in a browser, then click on 'Name v', it changes to 'Name ^' like it should. But if you click it again, it has lost it's EventListener, and 'Name ^' doesn't change. The ajax response didn't include this bit which creates and connects the event:
> tapestry.cleanConnect(dojo.byId("nameHeader"), "onclick", "event1702620775");
> tapestry.event1702620775=function(e){
> var content={beventname:"onclick"};
> tapestry.event.buildEventProperties(e, content);
> if (!content["beventtarget.id"]) content["beventtarget.id"]="nameHeader";
> tapestry.bind("/myapp/app?component=adminBillableItems&page=Admin&service=directevent&session=T", content);
> };
> dojo.event.connect(dojo.byId("nameHeader"), "onclick", tapestry, "event1702620775");});
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Commented: (TAPESTRY-1524) Lose EventListener handling if
you update a component containing that EventListener target
Posted by "Julian Wood (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-1524?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12499930 ]
Julian Wood commented on TAPESTRY-1524:
---------------------------------------
An easy work around (changed nameHeader to a component and used targets instead of elements):
<div jwcid="myTable@Any">
<div jwciid="nameHeader@Any">Name<span jwcid="@Insert" value="ognl:sortAscending?' ^':' v'"/></div>
</div>
@InitialValue("ognl:false")
@Persist
public abstract Boolean getSortAscending();
public abstract void setSortAscending(Boolean sortAscending);
@EventListener(targets = "nameHeader", events = "onclick", async = true)
public void sort(IRequestCycle cycle)
{
setSortAscending(!getSortAscending());
cycle.getResponseBuilder().updateComponent("myTable");
}
> Lose EventListener handling if you update a component containing that EventListener target
> ------------------------------------------------------------------------------------------
>
> Key: TAPESTRY-1524
> URL: https://issues.apache.org/jira/browse/TAPESTRY-1524
> Project: Tapestry
> Issue Type: Bug
> Components: XHR/dhtml/Ajax
> Affects Versions: 4.1.2
> Environment: java 1.5.0_07, osx 10.4.9, tomcat 5.5.24
> Reporter: Julian Wood
> Priority: Minor
>
> It seems that if you update a component inside which there is another component on which there is an EventListener, you will lose that EventListener.
> For example:
> <div jwcid="myTable@Any">
> <div id="nameHeader">Name<span jwcid="@Insert" value="ognl:sortAscending?' ^':' v'"/></div>
> </div>
> @InitialValue("ognl:false")
> @Persist
> public abstract Boolean getSortAscending();
> public abstract void setSortAscending(Boolean sortAscending);
> @EventListener(elements = "nameHeader", events = "onclick", async = true)
> public void sort(IRequestCycle cycle)
> {
> setSortAscending(!getSortAscending());
> cycle.getResponseBuilder().updateComponent("myTable");
> }
> So if you load this up in a browser, then click on 'Name v', it changes to 'Name ^' like it should. But if you click it again, it has lost it's EventListener, and 'Name ^' doesn't change. The ajax response didn't include this bit which creates and connects the event:
> tapestry.cleanConnect(dojo.byId("nameHeader"), "onclick", "event1702620775");
> tapestry.event1702620775=function(e){
> var content={beventname:"onclick"};
> tapestry.event.buildEventProperties(e, content);
> if (!content["beventtarget.id"]) content["beventtarget.id"]="nameHeader";
> tapestry.bind("/myapp/app?component=adminBillableItems&page=Admin&service=directevent&session=T", content);
> };
> dojo.event.connect(dojo.byId("nameHeader"), "onclick", tapestry, "event1702620775");});
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Updated: (TAPESTRY-1524) Lose EventListener handling if you
update a component containing that EventListener target
Posted by "Jesse Kuhnert (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-1524?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jesse Kuhnert updated TAPESTRY-1524:
------------------------------------
Fix Version/s: (was: 4.1.3)
4.1.4
> Lose EventListener handling if you update a component containing that EventListener target
> ------------------------------------------------------------------------------------------
>
> Key: TAPESTRY-1524
> URL: https://issues.apache.org/jira/browse/TAPESTRY-1524
> Project: Tapestry
> Issue Type: Bug
> Components: XHR/dhtml/Ajax
> Affects Versions: 4.1.2
> Environment: java 1.5.0_07, osx 10.4.9, tomcat 5.5.24
> Reporter: Julian Wood
> Priority: Minor
> Fix For: 4.1.4
>
>
> It seems that if you update a component inside which there is another component on which there is an EventListener, you will lose that EventListener.
> For example:
> <div jwcid="myTable@Any">
> <div id="nameHeader">Name<span jwcid="@Insert" value="ognl:sortAscending?' ^':' v'"/></div>
> </div>
> @InitialValue("ognl:false")
> @Persist
> public abstract Boolean getSortAscending();
> public abstract void setSortAscending(Boolean sortAscending);
> @EventListener(elements = "nameHeader", events = "onclick", async = true)
> public void sort(IRequestCycle cycle)
> {
> setSortAscending(!getSortAscending());
> cycle.getResponseBuilder().updateComponent("myTable");
> }
> So if you load this up in a browser, then click on 'Name v', it changes to 'Name ^' like it should. But if you click it again, it has lost it's EventListener, and 'Name ^' doesn't change. The ajax response didn't include this bit which creates and connects the event:
> tapestry.cleanConnect(dojo.byId("nameHeader"), "onclick", "event1702620775");
> tapestry.event1702620775=function(e){
> var content={beventname:"onclick"};
> tapestry.event.buildEventProperties(e, content);
> if (!content["beventtarget.id"]) content["beventtarget.id"]="nameHeader";
> tapestry.bind("/myapp/app?component=adminBillableItems&page=Admin&service=directevent&session=T", content);
> };
> dojo.event.connect(dojo.byId("nameHeader"), "onclick", tapestry, "event1702620775");});
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Updated: (TAPESTRY-1524) Lose EventListener handling if you
update a component containing that EventListener target
Posted by "Jesse Kuhnert (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-1524?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jesse Kuhnert updated TAPESTRY-1524:
------------------------------------
Fix Version/s: (was: 4.1.5)
4.1.6
> Lose EventListener handling if you update a component containing that EventListener target
> ------------------------------------------------------------------------------------------
>
> Key: TAPESTRY-1524
> URL: https://issues.apache.org/jira/browse/TAPESTRY-1524
> Project: Tapestry
> Issue Type: Bug
> Components: XHR/dhtml/Ajax
> Affects Versions: 4.1.2
> Environment: java 1.5.0_07, osx 10.4.9, tomcat 5.5.24
> Reporter: Julian Wood
> Priority: Minor
> Fix For: 4.1.6
>
>
> It seems that if you update a component inside which there is another component on which there is an EventListener, you will lose that EventListener.
> For example:
> <div jwcid="myTable@Any">
> <div id="nameHeader">Name<span jwcid="@Insert" value="ognl:sortAscending?' ^':' v'"/></div>
> </div>
> @InitialValue("ognl:false")
> @Persist
> public abstract Boolean getSortAscending();
> public abstract void setSortAscending(Boolean sortAscending);
> @EventListener(elements = "nameHeader", events = "onclick", async = true)
> public void sort(IRequestCycle cycle)
> {
> setSortAscending(!getSortAscending());
> cycle.getResponseBuilder().updateComponent("myTable");
> }
> So if you load this up in a browser, then click on 'Name v', it changes to 'Name ^' like it should. But if you click it again, it has lost it's EventListener, and 'Name ^' doesn't change. The ajax response didn't include this bit which creates and connects the event:
> tapestry.cleanConnect(dojo.byId("nameHeader"), "onclick", "event1702620775");
> tapestry.event1702620775=function(e){
> var content={beventname:"onclick"};
> tapestry.event.buildEventProperties(e, content);
> if (!content["beventtarget.id"]) content["beventtarget.id"]="nameHeader";
> tapestry.bind("/myapp/app?component=adminBillableItems&page=Admin&service=directevent&session=T", content);
> };
> dojo.event.connect(dojo.byId("nameHeader"), "onclick", tapestry, "event1702620775");});
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org