[ https://issues.apache.org/jira/browse/TAP5-2060?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lance updated TAP5-2060: ------------------------ Description: When I use markup in an eventlink body, it prevents the eventlink from being an ajax/XHR request. When I use a simple string as the eventlink body, the ajax event fires as expected. This error does not occur in tapestry 5.3.6. For the following page: public class TestPage { @Inject private Request request; @Inject private Block ajaxBlock; Block onDoIt() { if (!request.isXHR()) throw new RuntimeException("Event is not ajax"); return ajaxBlock; } } The following tml throws an "Event is not ajax request" exception TestPage.tml ========== <t:zone t:id="myZone" /> <t:eventlink event="doIt" zone="myZone"><div>Link containing markup</div></t:eventlink> <t:block t:id="ajaxBlock">Hello World</t:block> Whereas this works fine (note that the eventlink body does not contain markup) TestPage.tml ========== <t:zone t:id="myZone" /> <t:eventlink event="doIt" zone="myZone">Plain text link</t:eventlink> <t:block t:id="ajaxBlock">Hello World</t:block> was: When I use markup in an eventlink body, it prevents the eventlink from being an ajax/XHR request. When I use a simple string as the eventlink body, the ajax event fires as expected. This error does not occur in tapestry 5.3.6. For the following page: public class TestPage { @Inject private Request request; @Inject private Block ajaxBlock; Block onDoIt() { if (!request.isXHR()) { throw new RuntimeException("Event is not ajax"); } return ajaxBlock; } } The following tml throws an "Event is not ajax request" exception TestPage.tml ========== <t:zone t:id="myZone" /> <t:eventlink event="doIt" zone="myZone"><div>Link containing markup</div></t:eventlink> <t:block t:id="ajaxBlock">Hello World</t:block> Whereas this works fine (note that the eventlink body does not contain markup) TestPage.tml ========== <t:zone t:id="myZone" /> <t:eventlink event="doIt" zone="myZone">Plain text link</t:eventlink> <t:block t:id="ajaxBlock">Hello World</t:block> > 5.4-alpha-2 - Markup in eventlink body prevents ajax > ---------------------------------------------------- > > Key: TAP5-2060 > URL: https://issues.apache.org/jira/browse/TAP5-2060 > Project: Tapestry 5 > Issue Type: Bug > Components: tapestry-core > Affects Versions: 5.4 > Reporter: Lance > > When I use markup in an eventlink body, it prevents the eventlink from being > an ajax/XHR request. When I use a simple string as the eventlink body, the > ajax event fires as expected. This error does not occur in tapestry 5.3.6. > For the following page: > public class TestPage { > @Inject > private Request request; > > @Inject > private Block ajaxBlock; > > Block onDoIt() { > if (!request.isXHR()) throw new RuntimeException("Event is not ajax"); > return ajaxBlock; > } > } > The following tml throws an "Event is not ajax request" exception > TestPage.tml > ========== > <t:zone t:id="myZone" /> > <t:eventlink event="doIt" zone="myZone"><div>Link containing > markup</div></t:eventlink> > <t:block t:id="ajaxBlock">Hello World</t:block> > Whereas this works fine (note that the eventlink body does not contain markup) > TestPage.tml > ========== > <t:zone t:id="myZone" /> > <t:eventlink event="doIt" zone="myZone">Plain text link</t:eventlink> > <t:block t:id="ajaxBlock">Hello World</t:block> -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira