Return-Path: X-Original-To: apmail-tapestry-dev-archive@www.apache.org Delivered-To: apmail-tapestry-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7ADABEC79 for ; Mon, 28 Jan 2013 14:27:13 +0000 (UTC) Received: (qmail 82273 invoked by uid 500); 28 Jan 2013 14:27:13 -0000 Delivered-To: apmail-tapestry-dev-archive@tapestry.apache.org Received: (qmail 82201 invoked by uid 500); 28 Jan 2013 14:27:12 -0000 Mailing-List: contact commits-help@tapestry.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tapestry.apache.org Delivered-To: mailing list commits@tapestry.apache.org Received: (qmail 82182 invoked by uid 99); 28 Jan 2013 14:27:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Jan 2013 14:27:12 +0000 Date: Mon, 28 Jan 2013 14:27:12 +0000 (UTC) From: "Lance (JIRA)" To: commits@tapestry.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (TAP5-2060) 5.4-alpha-2 - Markup in eventlink body prevents ajax MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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. This code works 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
Link containing markup
Hello World Whereas this works fine (note that the eventlink body does not contain markup) Plain text link Hello World was: I have found a bug in 5.4-alpha-2 which does NOT occur in 5.3.6 when using the exact same code. The symptoms of the bug are: 1. I have a component parameter, "linkBody", which is a block 2. I delegate to the "linkBody" in the body of an ajax eventlink 3. When the "linkBody" parameter contains markup, the serverside event is NOT XHR as expected 4. When the "linkBody" does not contain markup (a simple string), the serverside event is XHR as expected 5. There are no javascript errors shown in the browser (firefox and chrome) 6. This happens for both prototype and jquery The component (below) succeeds for the following tml: ========================================= This is a plain text link body The component (below) throws a "NOT XHR" exception for the following tml: =======================================================
This link body contains markup
MyComponent.tml =============
Hello World
MyComponent.java ============== public class MyComponent { @Parameter(required=true) @Property private Block linkBody; @Inject private Block ajaxBlock; @Inject private Request request; Block onDoIt() { if (!request.isXHR()) { throw new RuntimeException("Request is not XHR"); } return ajaxBlock; } } Summary: 5.4-alpha-2 - Markup in eventlink body prevents ajax (was: 5.4-alpha-2 - Delegate in eventlink body prevents ajax) > 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. This code works 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 > >
Link containing markup
> Hello World > Whereas this works fine (note that the eventlink body does not contain markup) > > Plain text link > Hello World -- 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