tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Andreou (JIRA)" <tapestry-...@jakarta.apache.org>
Subject [jira] Resolved: (TAPESTRY-1200) Block as Shell's delegate
Date Mon, 01 Jan 2007 17:25:27 GMT

     [ http://issues.apache.org/jira/browse/TAPESTRY-1200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Andreas Andreou resolved TAPESTRY-1200.
---------------------------------------

    Resolution: Won't Fix

As mentioned, there's a documented (in the WIKI) way of doing this.

> 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.2, 4.0.1, 4.0, 4.1, 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


Mime
View raw message