You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Jeremy F. Kassis (JIRA)" <de...@tapestry.apache.org> on 2007/06/17 17:38:26 UTC

[jira] Created: (TAPESTRY-1583) Cannot Pass Blocks to Layout Components

Cannot Pass Blocks to Layout Components
---------------------------------------

                 Key: TAPESTRY-1583
                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1583
             Project: Tapestry
          Issue Type: Bug
    Affects Versions: 5.0.4
            Reporter: Jeremy F. Kassis


As per http://tapestry.apache.org/tapestry5/tapestry-core/guide/templates.html, the template of a page that calls a layout component must look like this:

<t:layout xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
  My Page Specific Content
</t:layout>

The layout component looks like this:
<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
    <head>
        <title>My Tapestry Application</title>
    </head>
    <body>
        <t:body/>
    </body>
</html>

If I want a more sophisticated layout that renders blocks passed as parameters instead of just a body, i'd be tempted to try this:
<t:layout xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd" block1="block:block1" block2="block:block2">
   <t:block id="block1">My Page Specific Content for Block 1</t:block>
   <t:block id="block2">My Page Specific Content for Block 2</t:block>
</t:layout>

But tapestry can't bind block1 and block2, because they appear in the template after the binding point.

This solution works, but produces an extra <html> tag in the output document:
<html  xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
<t:block id="block1">My Page Specific Content for Block 1</t:block>
<t:block id="block2">My Page Specific Content for Block 2</t:block>
<t:layout block1="block:block1" block2="block:block2"></t:layout>
</html>



-- 
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: (TAPESTRY-1583) Cannot Pass Blocks to Layout Components

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

Howard M. Lewis Ship reassigned TAPESTRY-1583:
----------------------------------------------

    Assignee: Howard M. Lewis Ship

> Cannot Pass Blocks to Layout Components
> ---------------------------------------
>
>                 Key: TAPESTRY-1583
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1583
>             Project: Tapestry
>          Issue Type: Bug
>    Affects Versions: 5.0.4
>            Reporter: Jeremy F. Kassis
>            Assignee: Howard M. Lewis Ship
>             Fix For: 5.0.5
>
>
> As per http://tapestry.apache.org/tapestry5/tapestry-core/guide/templates.html, the template of a page that calls a layout component must look like this:
> <t:layout xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
>   My Page Specific Content
> </t:layout>
> The layout component looks like this:
> <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
>     <head>
>         <title>My Tapestry Application</title>
>     </head>
>     <body>
>         <t:body/>
>     </body>
> </html>
> If I want a more sophisticated layout that renders blocks passed as parameters instead of just a body, i'd be tempted to try this:
> <t:layout xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd" block1="block:block1" block2="block:block2">
>    <t:block id="block1">My Page Specific Content for Block 1</t:block>
>    <t:block id="block2">My Page Specific Content for Block 2</t:block>
> </t:layout>
> But tapestry can't bind block1 and block2, because they appear in the template after the binding point.
> This solution works, but produces an extra <html> tag in the output document:
> <html  xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
> <t:block id="block1">My Page Specific Content for Block 1</t:block>
> <t:block id="block2">My Page Specific Content for Block 2</t:block>
> <t:layout block1="block:block1" block2="block:block2"></t:layout>
> </html>

-- 
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-1583) Cannot Pass Blocks to Layout Components

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

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

I'd like to see a more realistic test case; what you have should be working, even though <t:parameter> was designed specifically to address what you are attempting.

> Cannot Pass Blocks to Layout Components
> ---------------------------------------
>
>                 Key: TAPESTRY-1583
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1583
>             Project: Tapestry
>          Issue Type: Bug
>    Affects Versions: 5.0.4
>            Reporter: Jeremy F. Kassis
>
> As per http://tapestry.apache.org/tapestry5/tapestry-core/guide/templates.html, the template of a page that calls a layout component must look like this:
> <t:layout xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
>   My Page Specific Content
> </t:layout>
> The layout component looks like this:
> <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
>     <head>
>         <title>My Tapestry Application</title>
>     </head>
>     <body>
>         <t:body/>
>     </body>
> </html>
> If I want a more sophisticated layout that renders blocks passed as parameters instead of just a body, i'd be tempted to try this:
> <t:layout xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd" block1="block:block1" block2="block:block2">
>    <t:block id="block1">My Page Specific Content for Block 1</t:block>
>    <t:block id="block2">My Page Specific Content for Block 2</t:block>
> </t:layout>
> But tapestry can't bind block1 and block2, because they appear in the template after the binding point.
> This solution works, but produces an extra <html> tag in the output document:
> <html  xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
> <t:block id="block1">My Page Specific Content for Block 1</t:block>
> <t:block id="block2">My Page Specific Content for Block 2</t:block>
> <t:layout block1="block:block1" block2="block:block2"></t:layout>
> </html>

-- 
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: (TAPESTRY-1583) The "block:" binding prefix may only reference blocks that appear before the reference in the template, an error occurs if the block is defined later in the template

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

Howard M. Lewis Ship closed TAPESTRY-1583.
------------------------------------------

       Resolution: Fixed
    Fix Version/s: 5.0.5

> The "block:" binding prefix may only reference blocks that appear before the reference in the template, an error occurs if the block is defined later in the template
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TAPESTRY-1583
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1583
>             Project: Tapestry
>          Issue Type: Bug
>    Affects Versions: 5.0.4
>            Reporter: Jeremy F. Kassis
>            Assignee: Howard M. Lewis Ship
>             Fix For: 5.0.5
>
>
> As per http://tapestry.apache.org/tapestry5/tapestry-core/guide/templates.html, the template of a page that calls a layout component must look like this:
> <t:layout xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
>   My Page Specific Content
> </t:layout>
> The layout component looks like this:
> <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
>     <head>
>         <title>My Tapestry Application</title>
>     </head>
>     <body>
>         <t:body/>
>     </body>
> </html>
> If I want a more sophisticated layout that renders blocks passed as parameters instead of just a body, i'd be tempted to try this:
> <t:layout xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd" block1="block:block1" block2="block:block2">
>    <t:block id="block1">My Page Specific Content for Block 1</t:block>
>    <t:block id="block2">My Page Specific Content for Block 2</t:block>
> </t:layout>
> But tapestry can't bind block1 and block2, because they appear in the template after the binding point.
> This solution works, but produces an extra <html> tag in the output document:
> <html  xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
> <t:block id="block1">My Page Specific Content for Block 1</t:block>
> <t:block id="block2">My Page Specific Content for Block 2</t:block>
> <t:layout block1="block:block1" block2="block:block2"></t:layout>
> </html>

-- 
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-1583) Cannot Pass Blocks to Layout Components

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

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

I dug around a little and I see the problem.

The block: binding prefix is evaluated "in line", so you are right, it can't reference blocks that haven't yet been encountered during the processing of the template.

I'll defer out the resolution of the block until it is needed and that should take care of the problem.

> Cannot Pass Blocks to Layout Components
> ---------------------------------------
>
>                 Key: TAPESTRY-1583
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1583
>             Project: Tapestry
>          Issue Type: Bug
>    Affects Versions: 5.0.4
>            Reporter: Jeremy F. Kassis
>
> As per http://tapestry.apache.org/tapestry5/tapestry-core/guide/templates.html, the template of a page that calls a layout component must look like this:
> <t:layout xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
>   My Page Specific Content
> </t:layout>
> The layout component looks like this:
> <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
>     <head>
>         <title>My Tapestry Application</title>
>     </head>
>     <body>
>         <t:body/>
>     </body>
> </html>
> If I want a more sophisticated layout that renders blocks passed as parameters instead of just a body, i'd be tempted to try this:
> <t:layout xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd" block1="block:block1" block2="block:block2">
>    <t:block id="block1">My Page Specific Content for Block 1</t:block>
>    <t:block id="block2">My Page Specific Content for Block 2</t:block>
> </t:layout>
> But tapestry can't bind block1 and block2, because they appear in the template after the binding point.
> This solution works, but produces an extra <html> tag in the output document:
> <html  xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
> <t:block id="block1">My Page Specific Content for Block 1</t:block>
> <t:block id="block2">My Page Specific Content for Block 2</t:block>
> <t:layout block1="block:block1" block2="block:block2"></t:layout>
> </html>

-- 
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: (TAPESTRY-1583) The "block:" binding prefix may only reference blocks that appear before the reference in the template, an error occurs if the block is defined later in the template

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

Howard M. Lewis Ship updated TAPESTRY-1583:
-------------------------------------------

    Summary: The "block:" binding prefix may only reference blocks that appear before the reference in the template, an error occurs if the block is defined later in the template  (was: Cannot Pass Blocks to Layout Components)

> The "block:" binding prefix may only reference blocks that appear before the reference in the template, an error occurs if the block is defined later in the template
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TAPESTRY-1583
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1583
>             Project: Tapestry
>          Issue Type: Bug
>    Affects Versions: 5.0.4
>            Reporter: Jeremy F. Kassis
>            Assignee: Howard M. Lewis Ship
>             Fix For: 5.0.5
>
>
> As per http://tapestry.apache.org/tapestry5/tapestry-core/guide/templates.html, the template of a page that calls a layout component must look like this:
> <t:layout xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
>   My Page Specific Content
> </t:layout>
> The layout component looks like this:
> <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
>     <head>
>         <title>My Tapestry Application</title>
>     </head>
>     <body>
>         <t:body/>
>     </body>
> </html>
> If I want a more sophisticated layout that renders blocks passed as parameters instead of just a body, i'd be tempted to try this:
> <t:layout xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd" block1="block:block1" block2="block:block2">
>    <t:block id="block1">My Page Specific Content for Block 1</t:block>
>    <t:block id="block2">My Page Specific Content for Block 2</t:block>
> </t:layout>
> But tapestry can't bind block1 and block2, because they appear in the template after the binding point.
> This solution works, but produces an extra <html> tag in the output document:
> <html  xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
> <t:block id="block1">My Page Specific Content for Block 1</t:block>
> <t:block id="block2">My Page Specific Content for Block 2</t:block>
> <t:layout block1="block:block1" block2="block:block2"></t:layout>
> </html>

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