You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Andreas Andreou (JIRA)" <ta...@jakarta.apache.org> on 2006/12/19 16:00:27 UTC

[jira] Updated: (TAPESTRY-1200) Block as Shell's delegate

     [ http://issues.apache.org/jira/browse/TAPESTRY-1200?page=all ]

Andreas Andreou updated TAPESTRY-1200:
--------------------------------------

    Affects Version/s:     (was: 3.0.5)
                           (was: 4.1.2)
                           (was: 4.2)

> Block as Shell's delegate
> -------------------------
>
>                 Key: TAPESTRY-1200
>                 URL: http://issues.apache.org/jira/browse/TAPESTRY-1200
>             Project: Tapestry
>          Issue Type: Improvement
>    Affects Versions: 4.0, 4.1, 4.0.1, 4.0.2, 4.1.1
>            Reporter: Samppa Saarela
>            Priority: Minor
>
> Custom headers of Shell would be quite intuitive to be able to define directly in templates, by using Block component:
> <html jwcid="@Shell" delegate="ognl: components.head">
> <head jwcid="head@Block">
> <!-- custom headers that can e.g. use assets for extra scripts --> 
> </head>
> <body>
> ...
> </body>
> </html>
> This kind of usage can be enabled with a slight modification to Shell: 
> IRender delegate = getDelegate();
> if (delegate != null) {
>     if (delegate instanceof Block) {
>         Block block = (Block) delegate;
>         IComponent previousInserter = block.getInserter();
>         block.setInserter(this);
>         block.renderBody(writer, cycle);
>         // reset the inserter as it was before we changed it
>         block.setInserter(previousInserter);
>     } else {
>         delegate.render(writer, cycle);
>     }
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org