[jira] [Created] (TAP5-2059) Bridging to undefined clojure methods may throw NullPointerException

2013-01-28 Thread Jochen Kemnade (JIRA)
Jochen Kemnade created TAP5-2059:


 Summary: Bridging to undefined clojure methods may throw 
NullPointerException
 Key: TAP5-2059
 URL: https://issues.apache.org/jira/browse/TAP5-2059
 Project: Tapestry 5
  Issue Type: Improvement
  Components: tapestry-clojure
Affects Versions: 5.3.6, 5.4
Reporter: Jochen Kemnade
Priority: Minor
 Attachments: 
0001-Throw-an-exception-if-the-retrieved-Clojure-var-for-.patch

When bridging to an undefined clojure method, the `Var` lookup will return 
`null`. When this `null` is injected into the `PlasticField`, either an 
`AssertionError` will be thrown, or, if assertions are disabled, a 
`NullPointerException` will eventually be thrown from somewhere deep in the 
generated bytecode. A meaningful exception would be better in that case.

--
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


[jira] [Updated] (TAP5-2059) Bridging to undefined clojure methods may throw NullPointerException

2013-01-28 Thread Jochen Kemnade (JIRA)

 [ 
https://issues.apache.org/jira/browse/TAP5-2059?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jochen Kemnade updated TAP5-2059:
-

Attachment: 0001-Throw-an-exception-if-the-retrieved-Clojure-var-for-.patch

 Bridging to undefined clojure methods may throw NullPointerException
 

 Key: TAP5-2059
 URL: https://issues.apache.org/jira/browse/TAP5-2059
 Project: Tapestry 5
  Issue Type: Improvement
  Components: tapestry-clojure
Affects Versions: 5.3.6, 5.4
Reporter: Jochen Kemnade
Priority: Minor
  Labels: NullPointerException, assertion, clojure, patch
 Attachments: 
 0001-Throw-an-exception-if-the-retrieved-Clojure-var-for-.patch


 When bridging to an undefined clojure method, the `Var` lookup will return 
 `null`. When this `null` is injected into the `PlasticField`, either an 
 `AssertionError` will be thrown, or, if assertions are disabled, a 
 `NullPointerException` will eventually be thrown from somewhere deep in the 
 generated bytecode. A meaningful exception would be better in that case.

--
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


[jira] [Created] (TAP5-2060) 5.4-alpha-2 - Delegate in eventlink body prevents ajax

2013-01-28 Thread Lance (JIRA)
Lance created TAP5-2060:
---

 Summary: 5.4-alpha-2 - Delegate 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


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: 
= 
t:myComponent
   p:linkBodyThis is a plain text link body/p:linkBody
/t:myComponent

The component (below) throws a NOT XHR exception for the following tml: 
=== 
t:myComponent
   p:linkBodydivThis link body contains markup/div/p:linkBody
/t:myComponent

MyComponent.tml 
= 
div xmlns:t=http://tapestry.apache.org/schema/tapestry_5_3.xsd; 
xmlns:p=tapestry:parameter
t:zone t:id=myZone /
t:eventlink event=doIt zone=myZone
t:delegate to=linkBody /
/t:eventlink
t:block t:id=ajaxBlock
Hello World 
/t:block
/div

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; 
} 
}


--
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


[jira] [Updated] (TAP5-879) 404 is never raised automatically if the application has an index page.

2013-01-28 Thread Massimo Lusetti (JIRA)

 [ 
https://issues.apache.org/jira/browse/TAP5-879?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Massimo Lusetti updated TAP5-879:
-

Labels:   (was: bulk-close-candidate)

 404 is never raised automatically if the application has an index page.
 ---

 Key: TAP5-879
 URL: https://issues.apache.org/jira/browse/TAP5-879
 Project: Tapestry 5
  Issue Type: Bug
  Components: tapestry-core
Affects Versions: 5.1.0.5
Reporter: Christophe Cordenier
 Attachments: TAP5-879.txt, TAP5-986.txt


 The default behavior of PageRenderDispatcher when a user access to a URL like 
 'http://localhost/demo/blah' (where 'demo' is the application context and 
 'blah' is a page that does not exist) is to translate to 
 'http://localhost/demo/index/blah' if an index page exists even if it has no 
 activation method.
 It could be a better solution to check if a the index page has an activation 
 method with the corresponding parameter number and type, and automatically 
 raise a http 404 if not.

--
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


[jira] [Assigned] (TAP5-879) 404 is never raised automatically if the application has an index page.

2013-01-28 Thread Massimo Lusetti (JIRA)

 [ 
https://issues.apache.org/jira/browse/TAP5-879?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Massimo Lusetti reassigned TAP5-879:


Assignee: Massimo Lusetti

 404 is never raised automatically if the application has an index page.
 ---

 Key: TAP5-879
 URL: https://issues.apache.org/jira/browse/TAP5-879
 Project: Tapestry 5
  Issue Type: Bug
  Components: tapestry-core
Affects Versions: 5.1.0.5
Reporter: Christophe Cordenier
Assignee: Massimo Lusetti
 Attachments: TAP5-879.txt, TAP5-986.txt


 The default behavior of PageRenderDispatcher when a user access to a URL like 
 'http://localhost/demo/blah' (where 'demo' is the application context and 
 'blah' is a page that does not exist) is to translate to 
 'http://localhost/demo/index/blah' if an index page exists even if it has no 
 activation method.
 It could be a better solution to check if a the index page has an activation 
 method with the corresponding parameter number and type, and automatically 
 raise a http 404 if not.

--
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


[jira] [Commented] (TAP5-879) 404 is never raised automatically if the application has an index page.

2013-01-28 Thread Massimo Lusetti (JIRA)

[ 
https://issues.apache.org/jira/browse/TAP5-879?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13564295#comment-13564295
 ] 

Massimo Lusetti commented on TAP5-879:
--

I take this just to be sure it will not be closed in the bulk operation while 
discussion is ongoing on the dev list.

 404 is never raised automatically if the application has an index page.
 ---

 Key: TAP5-879
 URL: https://issues.apache.org/jira/browse/TAP5-879
 Project: Tapestry 5
  Issue Type: Bug
  Components: tapestry-core
Affects Versions: 5.1.0.5
Reporter: Christophe Cordenier
Assignee: Massimo Lusetti
 Attachments: TAP5-879.txt, TAP5-986.txt


 The default behavior of PageRenderDispatcher when a user access to a URL like 
 'http://localhost/demo/blah' (where 'demo' is the application context and 
 'blah' is a page that does not exist) is to translate to 
 'http://localhost/demo/index/blah' if an index page exists even if it has no 
 activation method.
 It could be a better solution to check if a the index page has an activation 
 method with the corresponding parameter number and type, and automatically 
 raise a http 404 if not.

--
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


[jira] [Updated] (TAP5-2060) 5.4-alpha-2 - Markup in eventlink body prevents ajax

2013-01-28 Thread Lance (JIRA)

 [ 
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
   t:zone t:id=myZone /
   t:eventlink event=doIt zone=myZonedivLink containing 
markup/div/t:eventlink
   t:block t:id=ajaxBlockHello World/t:block

Whereas this works fine (note that the eventlink body does not contain markup)
   t:zone t:id=myZone /
   t:eventlink event=doIt zone=myZonePlain text link/t:eventlink
   t:block t:id=ajaxBlockHello World/t:block

  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: 
= 
t:myComponent
   p:linkBodyThis is a plain text link body/p:linkBody
/t:myComponent

The component (below) throws a NOT XHR exception for the following tml: 
=== 
t:myComponent
   p:linkBodydivThis link body contains markup/div/p:linkBody
/t:myComponent

MyComponent.tml 
= 
div xmlns:t=http://tapestry.apache.org/schema/tapestry_5_3.xsd; 
xmlns:p=tapestry:parameter
t:zone t:id=myZone /
t:eventlink event=doIt zone=myZone
t:delegate to=linkBody /
/t:eventlink
t:block t:id=ajaxBlock
Hello World 
/t:block
/div

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
t:zone t:id=myZone /
t:eventlink event=doIt zone=myZonedivLink containing 
 markup/div/t:eventlink
t:block t:id=ajaxBlockHello World/t:block
 Whereas this works fine (note that the eventlink body does not contain markup)
t:zone t:id=myZone /
t:eventlink event=doIt zone=myZonePlain text link/t:eventlink
t:block t:id=ajaxBlockHello 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


[jira] [Updated] (TAP5-2060) 5.4-alpha-2 - Markup in eventlink body prevents ajax

2013-01-28 Thread Lance (JIRA)

 [ 
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=myZonedivLink containing 
markup/div/t:eventlink
   t:block t:id=ajaxBlockHello 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=myZonePlain text link/t:eventlink
   t:block t:id=ajaxBlockHello World/t:block

  was:
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
   t:zone t:id=myZone /
   t:eventlink event=doIt zone=myZonedivLink containing 
markup/div/t:eventlink
   t:block t:id=ajaxBlockHello World/t:block

Whereas this works fine (note that the eventlink body does not contain markup)
   t:zone t:id=myZone /
   t:eventlink event=doIt zone=myZonePlain text link/t:eventlink
   t:block t:id=ajaxBlockHello 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=myZonedivLink containing 
 markup/div/t:eventlink
t:block t:id=ajaxBlockHello 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=myZonePlain text link/t:eventlink
t:block t:id=ajaxBlockHello 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


[jira] [Updated] (TAP5-2060) 5.4-alpha-2 - Markup in eventlink body prevents ajax

2013-01-28 Thread Lance (JIRA)

 [ 
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=myZonedivLink containing 
markup/div/t:eventlink
   t:block t:id=ajaxBlockHello 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=myZonePlain text link/t:eventlink
   t:block t:id=ajaxBlockHello 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=myZonedivLink containing 
markup/div/t:eventlink
   t:block t:id=ajaxBlockHello 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=myZonePlain text link/t:eventlink
   t:block t:id=ajaxBlockHello 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=myZonedivLink containing 
 markup/div/t:eventlink
t:block t:id=ajaxBlockHello 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=myZonePlain text link/t:eventlink
t:block t:id=ajaxBlockHello 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