Nested layouts: allow enclosing layout-render tag to layout components within a 
nested layout-definition (not just its own layout-definition)
---------------------------------------------------------------------------------------------------------------------------------------------

                 Key: STS-317
                 URL: http://mc4j.org/jira/browse/STS-317
             Project: Stripes
          Issue Type: Improvement
          Components: Tag Library
    Affects Versions: Release 1.4.2
            Reporter: Philippe Laflamme
         Assigned To: Tim Fennell
         Attachments: layout-1.4.2.patch

I've hit a small but annoying limitation with nesting layout-definition tags.

Lets say I create a new layout-definition file (/layout/special.jsp)  that 
renders the /layout/default.jsp definition like so:

<layout-definition>
  <layout-render name="/layout/default.jsp">
    <layout-component name="contents">
     <div id="imspecial">
        ${somethingSpecial} <%-- comming from a layout-component in enclosing 
tag--%>
      </div>
    </layout-component>
  </layout-render>
</layout-definition>

This works only in the situation where the enclosing tag only lays out the 
"somethingSpecial" component. There is no way to override or layout any of the 
"default.jsp" components such as header or footer.

My suggestion (and patch) is that when a layout-render tag is within a 
layout-definition tag, the context of the layout-definition should override the 
context of the layout-render tag. This would move layout-components and 
parameters "downstream" into embedded layout-definitions until one of them 
renders it. I find that it makes layout-definitions  easier to "extend".

This might not find within the tags initial intent. If such an improvement is 
not possible, I'd like to know what are the best-practices when nesting layouts 
or event an alternative solutions to nesting...


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

        

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to