tapestry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andy Blower (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TAP5-1600) A component that is defined inside a <t:block> does not appear as an embedded component, causing page-load exceptions on the event handlers for the embedded component
Date Thu, 11 Aug 2011 11:29:27 GMT

    [ https://issues.apache.org/jira/browse/TAP5-1600?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13083067#comment-13083067
] 

Andy Blower commented on TAP5-1600:
-----------------------------------

Your test case is not the same because you are not injecting the block into the component
so it could be conditionally returned by a method into the delegate component. I'm not sure
why you're removing part of the test case and then saying it all works fine.

I have added this extra complexity below so you can see more what we're getting at, but the
test as detailed by Pedro breaks in the same manner.

TML:

<html t:type="Border" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd">
    <t:delegate to="selectBlock"/>

    <t:block id="zen">
            <t:actionlink t:id="goForBroke">go for broke</t:actionlink>
    </t:block>

    <t:block id="nez">
            <t:form t:id="nezForm"> form content </t:form>
    </t:block>
</html> 

Java:

public class ComponentInsideBlockDemo
{
    @Inject
    private AlertManager mgr;
    @Inject
    private Block zen;
    @Inject
    private Block nez;

    private boolean xennez;
    
    public Block getSelectedBlock() {
    	if (xennez) {
    		return zen;
    	} else {
    		return nez;
    	}
    }

    void onActionFromGoForBroke() {
        mgr.info("Go For Broke Clicked");
    }

    @OnEvent(component = "neverForm", value = EventConstants.SUBMIT)
    void neverFormSubmitted()
    {
     	mgr.info("Never Form Submitted. How?");
    } 
} 

> A component that is defined inside a <t:block> does not appear as an embedded component,
causing page-load exceptions on the event handlers for the embedded component
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TAP5-1600
>                 URL: https://issues.apache.org/jira/browse/TAP5-1600
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.3
>            Reporter: Howard M. Lewis Ship
>            Assignee: Howard M. Lewis Ship
>
> Reported from ProQuest, but not yet verified.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message