You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Pedro Ayala (JIRA)" <ji...@apache.org> on 2011/08/10 12:58:27 UTC

[jira] [Issue Comment Edited] (TAP5-1600) A component that is defined inside a does not appear as an embedded component, causing page-load exceptions on the event handlers for the embedded component

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

Pedro Ayala edited comment on TAP5-1600 at 8/10/11 10:56 AM:
-------------------------------------------------------------

The problem we are having is not exactly the same as your code:

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


package org.apache.tapestry5.integration.app1.pages;

import org.apache.tapestry5.alerts.AlertManager;
import org.apache.tapestry5.ioc.annotations.Inject;
import org.apache.tapestry5.Block;
import org.apache.tapestry5.annotations.OnEvent;
import org.apache.tapestry5.EventConstants;
import org.apache.tapestry5.annotations.Component;

public class ComponentInsideBlockDemo
{
    @Inject
    private AlertManager mgr;

    @Inject
    private Block zen;

    public Block getSelectedBlock() {
    	return zen;
    }

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

    @OnEvent(component = "nezForm", value = EventConstants.SUBMIT)
	public Object submitNezForm() {
		mgr.info("submit nez form");
	}
} 


Because the "nez" block is not render into the DOM tapestry is complaining about can't find the "nezForm" component. This issue still happens even if getSelectedBlock can return both blocks just depending of some parameter or other variable.

      was (Author: pjayala):
    The problem we are having is not exactly the same as your code:

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


package org.apache.tapestry5.integration.app1.pages;

import org.apache.tapestry5.alerts.AlertManager;
import org.apache.tapestry5.ioc.annotations.Inject;
import org.apache.tapestry5.Block;
import org.apache.tapestry5.annotations.OnEvent;
import org.apache.tapestry5.EventConstants;
import org.apache.tapestry5.annotations.Component;

public class ComponentInsideBlockDemo
{
    @Inject
    private AlertManager mgr;

    @Inject
    private Block zen;

    public Block getSelectedBlock() {
    	return zen;
    }

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

    @OnEvent(component = "nezForm", value = EventConstants.SUBMIT)
	public Object submitNezForm() {
		mgr.info("submit nez form");
	}
} 


Because the "nez" block is not render into the DOM tapestry is complaining about can't find the "nezForm" component. This issue still happens even if getSelectedBlock can return both method just depending of some parameter or other variable.
  
> 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