You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Peter Beshai (JIRA)" <de...@tapestry.apache.org> on 2008/04/03 16:38:24 UTC

[jira] Created: (TAPESTRY-2326) Nested Zone ComponentEventException bug

Nested Zone ComponentEventException bug
---------------------------------------

                 Key: TAPESTRY-2326
                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2326
             Project: Tapestry
          Issue Type: Bug
          Components: Core Components
    Affects Versions: 5.0.12
         Environment: Jetty 5.1.12; Tapestry 5.0.12
            Reporter: Peter Beshai


Given a template with:

<t:zone t:id="testZone">
	<t:delegate to="testBlock" />
</t:zone>

<t:block t:id="testBlock">
	<t:zone t:id="zone1">
		<t:delegate to="zone1Block"/>
	</t:zone>
	
	<t:zone t:id="zone2">
		<t:delegate to="zone2Block"/>
	</t:zone>				
</t:block>	

<t:block t:id="zone1Block">
	<t:actionlink t:id="showZone2Block2" zone="zone2">show zone2Block2</t:actionlink><br/>
	<t:actionlink t:id="refreshTestZone" zone="testZone">refresh testZone</t:actionlink>		
</t:block>

<t:block t:id="zone2Block">
	zone2Block
</t:block>

<t:block t:id="zone2Block2">
	<b>zone2Block2</b>
</t:block>	


and with code:
@Inject
@Property
private Block _testBlock;
	
@Inject
@Property
private Block _zone2Block2;

@Inject
@Property
private Block _zone1Block;

@Inject
@Property
private Block _zone2Block;

Object onActionFromShowZone2Block2()
{
	return _zone2Block2;
}

Object onActionFromRefreshTestZone()
{
	return _testBlock;
}

------

I can click the 'show zone2Block2' as many times as I want (at first), but after clicking 'refresh testZone' (which will refresh the testZone properly) if I try clicking either of the actionlinks I get a ComponentEventException that is expecting a regular action request return type instead of an Ajax one::

org.apache.tapestry.runtime.ComponentEventException
A component event handler method returned the value org.apache.tapestry.internal.structure.BlockImpl@38c8c5. Return type org.apache.tapestry.internal.structure.BlockImpl can not be handled. Configured return types are java.lang.Class, java.lang.String, java.net.URL, org.apache.tapestry.Link, org.apache.tapestry.StreamResponse, org.apache.tapestry.runtime.Component.


Stack trace:

Stack trace

        * org.apache.tapestry.internal.services.ObjectComponentEventResultProcessor.processResultValue(ObjectComponentEventResultProcessor.java:39)
        * org.apache.tapestry.internal.services.ComponentResultProcessorWrapper.handleResult(ComponentResultProcessorWrapper.java:42)
        * org.apache.tapestry.internal.structure.ComponentPageElementImpl$15.handleResult(ComponentPageElementImpl.java:980)
        * org.apache.tapestry.internal.services.EventImpl.storeResult(EventImpl.java:56)
        * net.rim.appdir.pages.test.TestIndex.dispatchComponentEvent(TestIndex.java)
        * org.apache.tapestry.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:843)
        * org.apache.tapestry.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1004)
        * org.apache.tapestry.internal.services.ComponentEventRequestHandlerImpl.handle(ComponentEventRequestHandlerImpl.java:67)
        * org.apache.tapestry.internal.services.ImmediateActionRenderResponseFilter.handle(ImmediateActionRenderResponseFilter.java:42)
        * org.apache.tapestry.internal.services.AjaxFilter.handle(AjaxFilter.java:42)
        * org.apache.tapestry.services.TapestryModule$40.handle(TapestryModule.java:2121)
        * org.apache.tapestry.internal.services.ComponentEventDispatcher.dispatch(ComponentEventDispatcher.java:135)
        * org.apache.tapestry.services.TapestryModule$13.service(TapestryModule.java:955)
from buildTimingFilter in AppModule:: return handler.service(request, response);




-- 
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] Assigned: (TAP5-22) Nested Zone ComponentEventException bug

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-22?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship reassigned TAP5-22:
----------------------------------------

    Assignee: Howard M. Lewis Ship

> Nested Zone ComponentEventException bug
> ---------------------------------------
>
>                 Key: TAP5-22
>                 URL: https://issues.apache.org/jira/browse/TAP5-22
>             Project: Tapestry 5
>          Issue Type: Bug
>    Affects Versions: 5.0.15
>         Environment: Jetty 5.1.12; Tapestry 5.0.12
>            Reporter: Peter Beshai
>            Assignee: Howard M. Lewis Ship
>
> Given a template with:
> <t:zone t:id="testZone">
> 	<t:delegate to="testBlock" />
> </t:zone>
> <t:block t:id="testBlock">
> 	<t:zone t:id="zone1">
> 		<t:delegate to="zone1Block"/>
> 	</t:zone>
> 	
> 	<t:zone t:id="zone2">
> 		<t:delegate to="zone2Block"/>
> 	</t:zone>				
> </t:block>	
> <t:block t:id="zone1Block">
> 	<t:actionlink t:id="showZone2Block2" zone="zone2">show zone2Block2</t:actionlink><br/>
> 	<t:actionlink t:id="refreshTestZone" zone="testZone">refresh testZone</t:actionlink>		
> </t:block>
> <t:block t:id="zone2Block">
> 	zone2Block
> </t:block>
> <t:block t:id="zone2Block2">
> 	<b>zone2Block2</b>
> </t:block>	
> and with code:
> @Inject
> @Property
> private Block _testBlock;
> 	
> @Inject
> @Property
> private Block _zone2Block2;
> @Inject
> @Property
> private Block _zone1Block;
> @Inject
> @Property
> private Block _zone2Block;
> Object onActionFromShowZone2Block2()
> {
> 	return _zone2Block2;
> }
> Object onActionFromRefreshTestZone()
> {
> 	return _testBlock;
> }
> ------
> I can click the 'show zone2Block2' as many times as I want (at first), but after clicking 'refresh testZone' (which will refresh the testZone properly) if I try clicking either of the actionlinks I get a ComponentEventException that is expecting a regular action request return type instead of an Ajax one::
> org.apache.tapestry.runtime.ComponentEventException
> A component event handler method returned the value org.apache.tapestry.internal.structure.BlockImpl@38c8c5. Return type org.apache.tapestry.internal.structure.BlockImpl can not be handled. Configured return types are java.lang.Class, java.lang.String, java.net.URL, org.apache.tapestry.Link, org.apache.tapestry.StreamResponse, org.apache.tapestry.runtime.Component.
> Stack trace:
> Stack trace
>         * org.apache.tapestry.internal.services.ObjectComponentEventResultProcessor.processResultValue(ObjectComponentEventResultProcessor.java:39)
>         * org.apache.tapestry.internal.services.ComponentResultProcessorWrapper.handleResult(ComponentResultProcessorWrapper.java:42)
>         * org.apache.tapestry.internal.structure.ComponentPageElementImpl$15.handleResult(ComponentPageElementImpl.java:980)
>         * org.apache.tapestry.internal.services.EventImpl.storeResult(EventImpl.java:56)
>         * net.rim.appdir.pages.test.TestIndex.dispatchComponentEvent(TestIndex.java)
>         * org.apache.tapestry.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:843)
>         * org.apache.tapestry.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1004)
>         * org.apache.tapestry.internal.services.ComponentEventRequestHandlerImpl.handle(ComponentEventRequestHandlerImpl.java:67)
>         * org.apache.tapestry.internal.services.ImmediateActionRenderResponseFilter.handle(ImmediateActionRenderResponseFilter.java:42)
>         * org.apache.tapestry.internal.services.AjaxFilter.handle(AjaxFilter.java:42)
>         * org.apache.tapestry.services.TapestryModule$40.handle(TapestryModule.java:2121)
>         * org.apache.tapestry.internal.services.ComponentEventDispatcher.dispatch(ComponentEventDispatcher.java:135)
>         * org.apache.tapestry.services.TapestryModule$13.service(TapestryModule.java:955)
> from buildTimingFilter in AppModule:: return handler.service(request, response);

-- 
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] Closed: (TAP5-22) Better client side reporting of problems with Zones and triggers is needed

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-22?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship closed TAP5-22.
------------------------------------

       Resolution: Fixed
    Fix Version/s: 5.0.16

> Better client side reporting of problems with Zones and triggers is needed
> --------------------------------------------------------------------------
>
>                 Key: TAP5-22
>                 URL: https://issues.apache.org/jira/browse/TAP5-22
>             Project: Tapestry 5
>          Issue Type: Bug
>    Affects Versions: 5.0.15
>         Environment: Jetty 5.1.12; Tapestry 5.0.12
>            Reporter: Peter Beshai
>            Assignee: Howard M. Lewis Ship
>             Fix For: 5.0.16
>
>
> Given a template with:
> <t:zone t:id="testZone">
> 	<t:delegate to="testBlock" />
> </t:zone>
> <t:block t:id="testBlock">
> 	<t:zone t:id="zone1">
> 		<t:delegate to="zone1Block"/>
> 	</t:zone>
> 	
> 	<t:zone t:id="zone2">
> 		<t:delegate to="zone2Block"/>
> 	</t:zone>				
> </t:block>	
> <t:block t:id="zone1Block">
> 	<t:actionlink t:id="showZone2Block2" zone="zone2">show zone2Block2</t:actionlink><br/>
> 	<t:actionlink t:id="refreshTestZone" zone="testZone">refresh testZone</t:actionlink>		
> </t:block>
> <t:block t:id="zone2Block">
> 	zone2Block
> </t:block>
> <t:block t:id="zone2Block2">
> 	<b>zone2Block2</b>
> </t:block>	
> and with code:
> @Inject
> @Property
> private Block _testBlock;
> 	
> @Inject
> @Property
> private Block _zone2Block2;
> @Inject
> @Property
> private Block _zone1Block;
> @Inject
> @Property
> private Block _zone2Block;
> Object onActionFromShowZone2Block2()
> {
> 	return _zone2Block2;
> }
> Object onActionFromRefreshTestZone()
> {
> 	return _testBlock;
> }
> ------
> I can click the 'show zone2Block2' as many times as I want (at first), but after clicking 'refresh testZone' (which will refresh the testZone properly) if I try clicking either of the actionlinks I get a ComponentEventException that is expecting a regular action request return type instead of an Ajax one::
> org.apache.tapestry.runtime.ComponentEventException
> A component event handler method returned the value org.apache.tapestry.internal.structure.BlockImpl@38c8c5. Return type org.apache.tapestry.internal.structure.BlockImpl can not be handled. Configured return types are java.lang.Class, java.lang.String, java.net.URL, org.apache.tapestry.Link, org.apache.tapestry.StreamResponse, org.apache.tapestry.runtime.Component.
> Stack trace:
> Stack trace
>         * org.apache.tapestry.internal.services.ObjectComponentEventResultProcessor.processResultValue(ObjectComponentEventResultProcessor.java:39)
>         * org.apache.tapestry.internal.services.ComponentResultProcessorWrapper.handleResult(ComponentResultProcessorWrapper.java:42)
>         * org.apache.tapestry.internal.structure.ComponentPageElementImpl$15.handleResult(ComponentPageElementImpl.java:980)
>         * org.apache.tapestry.internal.services.EventImpl.storeResult(EventImpl.java:56)
>         * net.rim.appdir.pages.test.TestIndex.dispatchComponentEvent(TestIndex.java)
>         * org.apache.tapestry.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:843)
>         * org.apache.tapestry.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1004)
>         * org.apache.tapestry.internal.services.ComponentEventRequestHandlerImpl.handle(ComponentEventRequestHandlerImpl.java:67)
>         * org.apache.tapestry.internal.services.ImmediateActionRenderResponseFilter.handle(ImmediateActionRenderResponseFilter.java:42)
>         * org.apache.tapestry.internal.services.AjaxFilter.handle(AjaxFilter.java:42)
>         * org.apache.tapestry.services.TapestryModule$40.handle(TapestryModule.java:2121)
>         * org.apache.tapestry.internal.services.ComponentEventDispatcher.dispatch(ComponentEventDispatcher.java:135)
>         * org.apache.tapestry.services.TapestryModule$13.service(TapestryModule.java:955)
> from buildTimingFilter in AppModule:: return handler.service(request, response);

-- 
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-2326) Nested Zone ComponentEventException bug

Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
    [ https://issues.apache.org/jira/browse/TAPESTRY-2326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12629655#action_12629655 ] 

Howard M. Lewis Ship commented on TAPESTRY-2326:
------------------------------------------------

Does this still occur?  Have you tried binding the id parameter of the zone?  The latter will ensure that the a refresh of the inner zone does not end up with a different client-side id.

I believe what is happening is that the inner Zone's <div> is refreshed and gets a new id, and the client-side event handler defaults to sending a non-Ajax request to the server.

> Nested Zone ComponentEventException bug
> ---------------------------------------
>
>                 Key: TAPESTRY-2326
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2326
>             Project: Tapestry
>          Issue Type: Bug
>          Components: Core Components
>    Affects Versions: 5.0.12
>         Environment: Jetty 5.1.12; Tapestry 5.0.12
>            Reporter: Peter Beshai
>
> Given a template with:
> <t:zone t:id="testZone">
> 	<t:delegate to="testBlock" />
> </t:zone>
> <t:block t:id="testBlock">
> 	<t:zone t:id="zone1">
> 		<t:delegate to="zone1Block"/>
> 	</t:zone>
> 	
> 	<t:zone t:id="zone2">
> 		<t:delegate to="zone2Block"/>
> 	</t:zone>				
> </t:block>	
> <t:block t:id="zone1Block">
> 	<t:actionlink t:id="showZone2Block2" zone="zone2">show zone2Block2</t:actionlink><br/>
> 	<t:actionlink t:id="refreshTestZone" zone="testZone">refresh testZone</t:actionlink>		
> </t:block>
> <t:block t:id="zone2Block">
> 	zone2Block
> </t:block>
> <t:block t:id="zone2Block2">
> 	<b>zone2Block2</b>
> </t:block>	
> and with code:
> @Inject
> @Property
> private Block _testBlock;
> 	
> @Inject
> @Property
> private Block _zone2Block2;
> @Inject
> @Property
> private Block _zone1Block;
> @Inject
> @Property
> private Block _zone2Block;
> Object onActionFromShowZone2Block2()
> {
> 	return _zone2Block2;
> }
> Object onActionFromRefreshTestZone()
> {
> 	return _testBlock;
> }
> ------
> I can click the 'show zone2Block2' as many times as I want (at first), but after clicking 'refresh testZone' (which will refresh the testZone properly) if I try clicking either of the actionlinks I get a ComponentEventException that is expecting a regular action request return type instead of an Ajax one::
> org.apache.tapestry.runtime.ComponentEventException
> A component event handler method returned the value org.apache.tapestry.internal.structure.BlockImpl@38c8c5. Return type org.apache.tapestry.internal.structure.BlockImpl can not be handled. Configured return types are java.lang.Class, java.lang.String, java.net.URL, org.apache.tapestry.Link, org.apache.tapestry.StreamResponse, org.apache.tapestry.runtime.Component.
> Stack trace:
> Stack trace
>         * org.apache.tapestry.internal.services.ObjectComponentEventResultProcessor.processResultValue(ObjectComponentEventResultProcessor.java:39)
>         * org.apache.tapestry.internal.services.ComponentResultProcessorWrapper.handleResult(ComponentResultProcessorWrapper.java:42)
>         * org.apache.tapestry.internal.structure.ComponentPageElementImpl$15.handleResult(ComponentPageElementImpl.java:980)
>         * org.apache.tapestry.internal.services.EventImpl.storeResult(EventImpl.java:56)
>         * net.rim.appdir.pages.test.TestIndex.dispatchComponentEvent(TestIndex.java)
>         * org.apache.tapestry.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:843)
>         * org.apache.tapestry.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1004)
>         * org.apache.tapestry.internal.services.ComponentEventRequestHandlerImpl.handle(ComponentEventRequestHandlerImpl.java:67)
>         * org.apache.tapestry.internal.services.ImmediateActionRenderResponseFilter.handle(ImmediateActionRenderResponseFilter.java:42)
>         * org.apache.tapestry.internal.services.AjaxFilter.handle(AjaxFilter.java:42)
>         * org.apache.tapestry.services.TapestryModule$40.handle(TapestryModule.java:2121)
>         * org.apache.tapestry.internal.services.ComponentEventDispatcher.dispatch(ComponentEventDispatcher.java:135)
>         * org.apache.tapestry.services.TapestryModule$13.service(TapestryModule.java:955)
> from buildTimingFilter in AppModule:: return handler.service(request, response);

-- 
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: (TAP5-22) Nested Zone ComponentEventException bug

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-22?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12644825#action_12644825 ] 

Howard M. Lewis Ship commented on TAP5-22:
------------------------------------------

I am able to reproduce your problem.

The issue is that the zone components' id parameter is not bound.

When the testZone is re-rendered, the Zone components inside generate new client-side ids.

When you click the rendered ActionLink, it no longer can access the Zone's <DIV> because its been overwritten, and the new <DIV> has a different client-side id.

The solution is to "lock down" the Zone's id by binding the id parameter; this exact id will then be used as the client-side id, even in an Ajax partial render.

What's happening on the client-side is that the <DIV> can't be found, a JavaScript exception is thrown, and the normal click behavior for a link occurs, which results in a traditional page-oriented (not Ajax) request.

I think two things should change:
1) The click event should be aborted first, and possible the href attribute of the <a> tag should be overwritten (to "#").
2) The failure to resolve the Zone's <div> should be intercepted and an error written to the client-side console.

> Nested Zone ComponentEventException bug
> ---------------------------------------
>
>                 Key: TAP5-22
>                 URL: https://issues.apache.org/jira/browse/TAP5-22
>             Project: Tapestry 5
>          Issue Type: Bug
>    Affects Versions: 5.0.15
>         Environment: Jetty 5.1.12; Tapestry 5.0.12
>            Reporter: Peter Beshai
>            Assignee: Howard M. Lewis Ship
>
> Given a template with:
> <t:zone t:id="testZone">
> 	<t:delegate to="testBlock" />
> </t:zone>
> <t:block t:id="testBlock">
> 	<t:zone t:id="zone1">
> 		<t:delegate to="zone1Block"/>
> 	</t:zone>
> 	
> 	<t:zone t:id="zone2">
> 		<t:delegate to="zone2Block"/>
> 	</t:zone>				
> </t:block>	
> <t:block t:id="zone1Block">
> 	<t:actionlink t:id="showZone2Block2" zone="zone2">show zone2Block2</t:actionlink><br/>
> 	<t:actionlink t:id="refreshTestZone" zone="testZone">refresh testZone</t:actionlink>		
> </t:block>
> <t:block t:id="zone2Block">
> 	zone2Block
> </t:block>
> <t:block t:id="zone2Block2">
> 	<b>zone2Block2</b>
> </t:block>	
> and with code:
> @Inject
> @Property
> private Block _testBlock;
> 	
> @Inject
> @Property
> private Block _zone2Block2;
> @Inject
> @Property
> private Block _zone1Block;
> @Inject
> @Property
> private Block _zone2Block;
> Object onActionFromShowZone2Block2()
> {
> 	return _zone2Block2;
> }
> Object onActionFromRefreshTestZone()
> {
> 	return _testBlock;
> }
> ------
> I can click the 'show zone2Block2' as many times as I want (at first), but after clicking 'refresh testZone' (which will refresh the testZone properly) if I try clicking either of the actionlinks I get a ComponentEventException that is expecting a regular action request return type instead of an Ajax one::
> org.apache.tapestry.runtime.ComponentEventException
> A component event handler method returned the value org.apache.tapestry.internal.structure.BlockImpl@38c8c5. Return type org.apache.tapestry.internal.structure.BlockImpl can not be handled. Configured return types are java.lang.Class, java.lang.String, java.net.URL, org.apache.tapestry.Link, org.apache.tapestry.StreamResponse, org.apache.tapestry.runtime.Component.
> Stack trace:
> Stack trace
>         * org.apache.tapestry.internal.services.ObjectComponentEventResultProcessor.processResultValue(ObjectComponentEventResultProcessor.java:39)
>         * org.apache.tapestry.internal.services.ComponentResultProcessorWrapper.handleResult(ComponentResultProcessorWrapper.java:42)
>         * org.apache.tapestry.internal.structure.ComponentPageElementImpl$15.handleResult(ComponentPageElementImpl.java:980)
>         * org.apache.tapestry.internal.services.EventImpl.storeResult(EventImpl.java:56)
>         * net.rim.appdir.pages.test.TestIndex.dispatchComponentEvent(TestIndex.java)
>         * org.apache.tapestry.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:843)
>         * org.apache.tapestry.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1004)
>         * org.apache.tapestry.internal.services.ComponentEventRequestHandlerImpl.handle(ComponentEventRequestHandlerImpl.java:67)
>         * org.apache.tapestry.internal.services.ImmediateActionRenderResponseFilter.handle(ImmediateActionRenderResponseFilter.java:42)
>         * org.apache.tapestry.internal.services.AjaxFilter.handle(AjaxFilter.java:42)
>         * org.apache.tapestry.services.TapestryModule$40.handle(TapestryModule.java:2121)
>         * org.apache.tapestry.internal.services.ComponentEventDispatcher.dispatch(ComponentEventDispatcher.java:135)
>         * org.apache.tapestry.services.TapestryModule$13.service(TapestryModule.java:955)
> from buildTimingFilter in AppModule:: return handler.service(request, response);

-- 
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: (TAP5-22) Better client side reporting of problems with Zones and triggers is needed

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-22?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship updated TAP5-22:
-------------------------------------

    Summary: Better client side reporting of problems with Zones and triggers is needed  (was: Nested Zone ComponentEventException bug)

> Better client side reporting of problems with Zones and triggers is needed
> --------------------------------------------------------------------------
>
>                 Key: TAP5-22
>                 URL: https://issues.apache.org/jira/browse/TAP5-22
>             Project: Tapestry 5
>          Issue Type: Bug
>    Affects Versions: 5.0.15
>         Environment: Jetty 5.1.12; Tapestry 5.0.12
>            Reporter: Peter Beshai
>            Assignee: Howard M. Lewis Ship
>
> Given a template with:
> <t:zone t:id="testZone">
> 	<t:delegate to="testBlock" />
> </t:zone>
> <t:block t:id="testBlock">
> 	<t:zone t:id="zone1">
> 		<t:delegate to="zone1Block"/>
> 	</t:zone>
> 	
> 	<t:zone t:id="zone2">
> 		<t:delegate to="zone2Block"/>
> 	</t:zone>				
> </t:block>	
> <t:block t:id="zone1Block">
> 	<t:actionlink t:id="showZone2Block2" zone="zone2">show zone2Block2</t:actionlink><br/>
> 	<t:actionlink t:id="refreshTestZone" zone="testZone">refresh testZone</t:actionlink>		
> </t:block>
> <t:block t:id="zone2Block">
> 	zone2Block
> </t:block>
> <t:block t:id="zone2Block2">
> 	<b>zone2Block2</b>
> </t:block>	
> and with code:
> @Inject
> @Property
> private Block _testBlock;
> 	
> @Inject
> @Property
> private Block _zone2Block2;
> @Inject
> @Property
> private Block _zone1Block;
> @Inject
> @Property
> private Block _zone2Block;
> Object onActionFromShowZone2Block2()
> {
> 	return _zone2Block2;
> }
> Object onActionFromRefreshTestZone()
> {
> 	return _testBlock;
> }
> ------
> I can click the 'show zone2Block2' as many times as I want (at first), but after clicking 'refresh testZone' (which will refresh the testZone properly) if I try clicking either of the actionlinks I get a ComponentEventException that is expecting a regular action request return type instead of an Ajax one::
> org.apache.tapestry.runtime.ComponentEventException
> A component event handler method returned the value org.apache.tapestry.internal.structure.BlockImpl@38c8c5. Return type org.apache.tapestry.internal.structure.BlockImpl can not be handled. Configured return types are java.lang.Class, java.lang.String, java.net.URL, org.apache.tapestry.Link, org.apache.tapestry.StreamResponse, org.apache.tapestry.runtime.Component.
> Stack trace:
> Stack trace
>         * org.apache.tapestry.internal.services.ObjectComponentEventResultProcessor.processResultValue(ObjectComponentEventResultProcessor.java:39)
>         * org.apache.tapestry.internal.services.ComponentResultProcessorWrapper.handleResult(ComponentResultProcessorWrapper.java:42)
>         * org.apache.tapestry.internal.structure.ComponentPageElementImpl$15.handleResult(ComponentPageElementImpl.java:980)
>         * org.apache.tapestry.internal.services.EventImpl.storeResult(EventImpl.java:56)
>         * net.rim.appdir.pages.test.TestIndex.dispatchComponentEvent(TestIndex.java)
>         * org.apache.tapestry.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:843)
>         * org.apache.tapestry.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1004)
>         * org.apache.tapestry.internal.services.ComponentEventRequestHandlerImpl.handle(ComponentEventRequestHandlerImpl.java:67)
>         * org.apache.tapestry.internal.services.ImmediateActionRenderResponseFilter.handle(ImmediateActionRenderResponseFilter.java:42)
>         * org.apache.tapestry.internal.services.AjaxFilter.handle(AjaxFilter.java:42)
>         * org.apache.tapestry.services.TapestryModule$40.handle(TapestryModule.java:2121)
>         * org.apache.tapestry.internal.services.ComponentEventDispatcher.dispatch(ComponentEventDispatcher.java:135)
>         * org.apache.tapestry.services.TapestryModule$13.service(TapestryModule.java:955)
> from buildTimingFilter in AppModule:: return handler.service(request, response);

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