I had what may be the same problem - Stylesheets defined in the page class using @IncludeStylesheet would render before stylesheets defined the same way for the layout. I needed the page to be able to override the common settings at the layout level. I couldn't figure out a good way to reorder them by hooking in to the render phases, so I made a component that just links in a stylesheet. I place that as the first component in the layout and then everything renders correctly.
Before anyone can beat me to it, I do kind of feel like this is a hack and I think a change to the framework would be better. I understand why the page css renders before the layout, but I think it's more logical to have it render like "tapestry", "layout", "page", "other components". I could open a Jira if others have the same problem. The component looks like this: public class StylesheetLink { @Inject private RenderSupport renderSupport; @Parameter(defaultPrefix = BindingConstants.ASSET) private Asset stylesheet; @SuppressWarnings("unused") private void setupRender() { renderSupport.addStylesheetLink(stylesheet, null); } } And the page tml looks like this: <html t:type="layout" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd" xmlns:p="tapestry:parameter"> <t:stylesheetLink t:stylesheet="MyPage.css"/> ... Hope this helps, Brian ________________________________________ From: Thiago H. de Paula Figueiredo [thiag...@gmail.com] Sent: Tuesday, April 13, 2010 4:19 AM To: Tapestry users Subject: Re: Get final ouput of page rendering On Tue, 13 Apr 2010 06:49:18 -0300, iapilgrim <iapilg...@gmail.com> wrote: > Hi, Hi! > I want to reorder css/js files to make my custom css/js files at high > priority ( ex, move to end). But I don't know which phase of rendering we > grab entire dom. I would use @AfterRender. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, software architect and developer, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org