As far as I understood the example at
http://stackoverflow.com/questions/1296235/jsp-tricks-to-make-templating-easier/3257426#3257426,
you can actually do it:

<%@tag description="User Page template" pageEncoding="UTF-8"%>
<%@taglib prefix="t" tagdir="/WEB-INF/tags" %>
<%@attribute name="userName" required="true"%>

<t:genericpage>
    <jsp:attribute name="header">
      <h1>Welcome ${userName}</h1>
    </jsp:attribute>
    <jsp:attribute name="footer">
      <p id="copyright">Copyright 1927, Future Bits When There Be Bits Inc.</p>
    </jsp:attribute>
    <jsp:body>
        <jsp:doBody/>
    </jsp:body>
</t:genericpage>

Here, you pass JSP fragements encapsulated in jsp:attribute. I didn't
try that myself, though.

-Moritz

On Wed, Feb 1, 2012 at 1:27 PM, Mike McNally <emmecin...@gmail.com> wrote:
> With a layout, a "parameter" can consist of a large block of JSP.
> Like, the page body, or a large fraction of it, or a dialog body, or
> page navigation block. There can be any number of such parameters.
>
> You can do that with a Java-coded tag but not a tag file, other than
> the single "body".
>
> That said, I like tags too :-)
>
> On Tue, Jan 31, 2012 at 10:42 PM, Will Hartung <redro...@sbcglobal.net> wrote:
>>
>> On Jan 31, 2012, at 3:12 PM, Mike McNally wrote:
>>
>>> Tags are great for a variety of things. Stripes layouts are (to me)
>>> really like "super tags". One of the main qualitative improvements
>>> over tag files is that a layout component can be a whole bunch of JSP
>>> (including, once and I hope again soon, more invocations of layouts
>>> :-)
>>>
>>> To me the use of nested layouts is a simplification, not a
>>> complication. I use a surrounding layout for the overall page, and
>>> then when there are common page components that call for more than
>>> what a tag or (ick) a jsp include can do, I use more layouts. It makes
>>> it much easier to manage site-wide changes.
>>
>> I've never used Layout, I've always used Tag Files. I'm a Tag File zealot. 
>> They're simply too simple and too powerful to make be bother to look 
>> anywhere else. Tag files give JSP a refactorability and elegance I haven't 
>> found really in any other markup solution.
>>
>> Regards,
>>
>> Will Hartung
>>
>>
>> ------------------------------------------------------------------------------
>> Keep Your Developer Skills Current with LearnDevNow!
>> The most comprehensive online learning library for Microsoft developers
>> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
>> Metro Style Apps, more. Free future releases when you subscribe now!
>> http://p.sf.net/sfu/learndevnow-d2d
>> _______________________________________________
>> Stripes-users mailing list
>> Stripes-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/stripes-users
>
>
>
> --
> Turtle, turtle, on the ground,
> Pink and shiny, turn around.
>
> ------------------------------------------------------------------------------
> Keep Your Developer Skills Current with LearnDevNow!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-d2d
> _______________________________________________
> Stripes-users mailing list
> Stripes-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/stripes-users

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to