Hello list!

This is something that I was looking for in the previous version of tiles
and I know there was some thought about it then.

Basically what I would like is for the ability to do a two-phase rendering,
the idea is that sometimes an enclosed tile has a dependency on a css or js
file that should be put in the head. So I have head tiles for js includes
and css includes that use a list-attribute. I'd like to be able to append to
that list from an included tile farther down the tree. The idea would be
something like this:

<definition name="js-tile" template="/WEB-INF/tiles/fragments/jstile.jsp">

    <put-list-attribute name="js_files">

     <add-attribute value="/js/prototype.js"/>

     <add-attribute value="/js/common.js" />

     <add-attribute value="/js/messages.js" />

     <add-attribute value="/js/mousePos.js"/>
    </put-list-attribute>
</definition>


<definition name="my-other-tile">
    <put-list-attribute name="js_files">
        <add-attribute value="/js/myotherjs.js"/>
    </put-list-attribute>
</definition>


I could see how this could be expanded to maybe use an
<append-list-attribute> tag instead to be more explicit.

Is there a way to do this in code if not in the tiles.xml?

Thanks,

Rick


Reply via email to