Yes, a lot of code has changed there. Can you create a JIRA issue,
preferably with a sample app to demonstrate the problem?
On Mon, Feb 16, 2009 at 7:17 AM, Dragan Djuric wrote:
>
> I have some pretty straightforward Ajax code in my project. I do not use any
> custom JavaScript or anything external to tapestry - just zones and blocks.
> I'm using Tapestry 5.1.0.0-SNAPSHOT. Everything worked fine until 15.
> February 2009, when Tapestry started complaining about the BlockImpl
> returned from the event listener. Earlier snapshots still work.
>
> Does anyone else have similar problems and if does, what should be changed
> in the code that is using zone? Or maybe it is a bug?
>
> Now, I have two cases:
> 1. A simple zone with updating behavior, without forms, for testing
> purposes. Just a link inside a zone that updates the zone to display some
> text.
> 2. A form inside a component with inherited:zone. When the zone is updated,
> the block is returned. There is inheritance and a few components are nested,
> but the logic is simple and, to repeat, I do not use any exotic hack. Just
> what is provided by tapestry.
>
> Snapshots prior to 15.Feb: both cases work.
> Snapshots after 15. Feb. changes (and there are lots of them so I can not
> find a source of the problem):
> 1. Still works
> 2: I get a ComponentEventException
>
> The exception report:
> #
> A component event handler method returned the value Block[edit within
> model/CreateGirlfriend:creategirlfriend, at
> classpath:org/aloole/tapestry/tapestryioc/app/components/model/CreateGirlfriend.tml,
> line 6]. Return type org.apache.tapestry5.internal.structure.BlockImpl can
> not be handled. Configured return types are java.lang.Class,
> java.lang.String, java.net.URL, org.apache.tapestry5.Link,
> org.apache.tapestry5.StreamResponse, org.apache.tapestry5.runtime.Component.
>
> context
> eventType
>action
> location
>
> classpath:org/aloole/tapestry/tapestryioc/app/components/model/EditGirlfriend.tml,
> line 2
>1xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
>2
>3
>4 GirlfriendEditor
>5
>6t:value="agreement"/>
>7value="Save"/>
>
> # org.apache.tapestry5.runtime.ComponentEventException
> A component event handler method returned the value Block[edit within
> model/CreateGirlfriend:creategirlfriend, at
> classpath:org/aloole/tapestry/tapestryioc/app/components/model/CreateGirlfriend.tml,
> line 6]. Return type org.apache.tapestry5.internal.structure.BlockImpl can
> not be handled. Configured return types are java.lang.Class,
> java.lang.String, java.net.URL, org.apache.tapestry5.Link,
> org.apache.tapestry5.StreamResponse, org.apache.tapestry5.runtime.Component.
>
> context
> eventType
>failure
> location
>
> classpath:org/aloole/tapestry/tapestryioc/app/components/model/EditGirlfriend.tml,
> line 2
>
> # java.lang.RuntimeException
> A component event handler method returned the value Block[edit within
> model/CreateGirlfriend:creategirlfriend, at
> classpath:org/aloole/tapestry/tapestryioc/app/components/model/CreateGirlfriend.tml,
> line 6]. Return type org.apache.tapestry5.internal.structure.BlockImpl can
> not be handled. Configured return types are java.lang.Class,
> java.lang.String, java.net.URL, org.apache.tapestry5.Link,
> org.apache.tapestry5.StreamResponse, org.apache.tapestry5.runtime.Component.
>
> Hide uninteresting stack frames Stack trace
>
>*
> org.apache.tapestry5.internal.services.ObjectComponentEventResultProcessor.processResultValue(ObjectComponentEventResultProcessor.java:39)
>*
> $ComponentEventResultProcessor_11f7fa7e128.processResultValue($ComponentEventResultProcessor_11f7fa7e128.java)
>*
> $ComponentEventResultProcessor_11f7fa7e0b8.processResultValue($ComponentEventResultProcessor_11f7fa7e0b8.java)
>*
> org.apache.tapestry5.internal.services.ComponentResultProcessorWrapper.handleResult(ComponentResultProcessorWrapper.java:42)
>*
> org.apache.tapestry5.internal.structure.ComponentPageElementImpl$6.handleResult(ComponentPageElementImpl.java:1040)
>*
> org.apache.tapestry5.internal.services.EventImpl.storeResult(EventImpl.java:74)
>*
> org.aloole.tapestry.base.components.ObjectDetails.dispatchComponentEvent(ObjectDetails.java)
>*
> org.apache.tapestry5.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:889)
>*
> org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1068)
>*
> org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.triggerContextEvent(InternalComponentResourcesImpl.java:263)
>*
> org.apache.tapestry5.corelib.components.Form._$advised$onAction(Form.java:391)
>*
> org.apache.tapestry5.corelib.components.Form$onAction$invocation_11f7fa803ce.invokeAdvisedMethod(Form$onAction$invocation_11f7fa803ce.java)
>*
> org.apache.tapestry5.inter