Layout reuse "like a component"

classic Classic list List threaded Threaded
21 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Layout reuse "like a component"

Moritz Petersen
Hello everyone,

maybe I'm missing something, but I have trouble doing the following:

The idea is to define a piece of reusable JSP code, that can be
embedded into other JSP pages. I thought it should be quite simple
with Stripes' layout tags.

Take an example: in some JSP pages I'd like to display address
information, so I just want to implement that address view only once.

contact.jsp:

...
<h1>Contact Sheet</h1>
<div>${actionBean.contact.name}</div>
<stripes:layout-render name="/layout/address.jsp"
address="${actionBean.contact.address}" />
...

address.jsp:

...
<stripes:layout-definition>
  <div>${address.street}</div>
  <div>${address.city}</div>
  ...
</stripes:layout-definition>

The idea is, to pass the "address" object to the reusable layout
component and use it there.

Is there any way to do this with Stripes? Any other recommendations?

Thank you & regards,
Moritz

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: Layout reuse "like a component"

Freddy D.
Hi Moritz,

Your code looks right to me. What error are you getting?

Another way is to use a JSP .tag file:

/tags/address.jsp:

<%@ tag body-content="scriptless" %>
<%@ attribute name="address" required="true" rtexprvalue="true"
type="com.example.model.Address" %>
<%@ include file="/jsp/taglibs.jsp" %>

<div>${address.street}</div>
<div>${address.city}</div>

/jsp/taglibs.jsp:
<%-- stripes and JSP taglibs... --%
<%@ taglib prefix="yourPrefix" tagdir="/tags" %>

contact.jsp:

<h1>Contact Sheet</h1>
<div>${actionBean.contact.name}</div>
<yourPrefix:address="${actionBean.contact.address}" />

Then you can go ahead and add more .tag files to the /tags directory and
use them with
<yourPrefix:name> where name corresponds to the file name without the
.jsp extension.

Hope that helps.

Cheers,
Freddy
http://www.fdaoud.com

On Tue, Jan 31, 2012, at 10:13 AM, Moritz Petersen wrote:

> Hello everyone,
>
> maybe I'm missing something, but I have trouble doing the following:
>
> The idea is to define a piece of reusable JSP code, that can be
> embedded into other JSP pages. I thought it should be quite simple
> with Stripes' layout tags.
>
> Take an example: in some JSP pages I'd like to display address
> information, so I just want to implement that address view only once.
>
> contact.jsp:
>
> ...
> <h1>Contact Sheet</h1>
> <div>${actionBean.contact.name}</div>
> <stripes:layout-render name="/layout/address.jsp"
> address="${actionBean.contact.address}" />
> ...
>
> address.jsp:
>
> ...
> <stripes:layout-definition>
>   <div>${address.street}</div>
>   <div>${address.city}</div>
>   ...
> </stripes:layout-definition>
>
> The idea is, to pass the "address" object to the reusable layout
> component and use it there.
>
> Is there any way to do this with Stripes? Any other recommendations?
>
> Thank you & regards,
> Moritz
>
> ------------------------------------------------------------------------------
> 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
> [hidden email]
> 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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: Layout reuse "like a component"

Mike McNally-3
Since 1.5.4, using nested layouts has been somewhat problematic. My
site works in 1.5.3 but fails all over the place in any of the newer
releases.

On Tue, Jan 31, 2012 at 5:39 AM, Freddy Daoud <[hidden email]> wrote:

> Hi Moritz,
>
> Your code looks right to me. What error are you getting?
>
> Another way is to use a JSP .tag file:
>
> /tags/address.jsp:
>
> <%@ tag body-content="scriptless" %>
> <%@ attribute name="address" required="true" rtexprvalue="true"
> type="com.example.model.Address" %>
> <%@ include file="/jsp/taglibs.jsp" %>
>
> <div>${address.street}</div>
> <div>${address.city}</div>
>
> /jsp/taglibs.jsp:
> <%-- stripes and JSP taglibs... --%
> <%@ taglib prefix="yourPrefix" tagdir="/tags" %>
>
> contact.jsp:
>
> <h1>Contact Sheet</h1>
> <div>${actionBean.contact.name}</div>
> <yourPrefix:address="${actionBean.contact.address}" />
>
> Then you can go ahead and add more .tag files to the /tags directory and
> use them with
> <yourPrefix:name> where name corresponds to the file name without the
> .jsp extension.
>
> Hope that helps.
>
> Cheers,
> Freddy
> http://www.fdaoud.com
>
> On Tue, Jan 31, 2012, at 10:13 AM, Moritz Petersen wrote:
>> Hello everyone,
>>
>> maybe I'm missing something, but I have trouble doing the following:
>>
>> The idea is to define a piece of reusable JSP code, that can be
>> embedded into other JSP pages. I thought it should be quite simple
>> with Stripes' layout tags.
>>
>> Take an example: in some JSP pages I'd like to display address
>> information, so I just want to implement that address view only once.
>>
>> contact.jsp:
>>
>> ...
>> <h1>Contact Sheet</h1>
>> <div>${actionBean.contact.name}</div>
>> <stripes:layout-render name="/layout/address.jsp"
>> address="${actionBean.contact.address}" />
>> ...
>>
>> address.jsp:
>>
>> ...
>> <stripes:layout-definition>
>>   <div>${address.street}</div>
>>   <div>${address.city}</div>
>>   ...
>> </stripes:layout-definition>
>>
>> The idea is, to pass the "address" object to the reusable layout
>> component and use it there.
>>
>> Is there any way to do this with Stripes? Any other recommendations?
>>
>> Thank you & regards,
>> Moritz
>>
>> ------------------------------------------------------------------------------
>> 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
>> [hidden email]
>> 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
> [hidden email]
> 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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: Layout reuse "like a component"

Janne Jalkanen

Ditto.  We can't upgrade out of 1.5.3 :-/

(Can we please get the old layout code back as an option, please?)

/Janne

On 31 Jan 2012, at 15:38, Mike McNally wrote:

> Since 1.5.4, using nested layouts has been somewhat problematic. My
> site works in 1.5.3 but fails all over the place in any of the newer
> releases.
>
> On Tue, Jan 31, 2012 at 5:39 AM, Freddy Daoud <[hidden email]> wrote:
>> Hi Moritz,
>>
>> Your code looks right to me. What error are you getting?
>>
>> Another way is to use a JSP .tag file:
>>
>> /tags/address.jsp:
>>
>> <%@ tag body-content="scriptless" %>
>> <%@ attribute name="address" required="true" rtexprvalue="true"
>> type="com.example.model.Address" %>
>> <%@ include file="/jsp/taglibs.jsp" %>
>>
>> <div>${address.street}</div>
>> <div>${address.city}</div>
>>
>> /jsp/taglibs.jsp:
>> <%-- stripes and JSP taglibs... --%
>> <%@ taglib prefix="yourPrefix" tagdir="/tags" %>
>>
>> contact.jsp:
>>
>> <h1>Contact Sheet</h1>
>> <div>${actionBean.contact.name}</div>
>> <yourPrefix:address="${actionBean.contact.address}" />
>>
>> Then you can go ahead and add more .tag files to the /tags directory and
>> use them with
>> <yourPrefix:name> where name corresponds to the file name without the
>> .jsp extension.
>>
>> Hope that helps.
>>
>> Cheers,
>> Freddy
>> http://www.fdaoud.com
>>
>> On Tue, Jan 31, 2012, at 10:13 AM, Moritz Petersen wrote:
>>> Hello everyone,
>>>
>>> maybe I'm missing something, but I have trouble doing the following:
>>>
>>> The idea is to define a piece of reusable JSP code, that can be
>>> embedded into other JSP pages. I thought it should be quite simple
>>> with Stripes' layout tags.
>>>
>>> Take an example: in some JSP pages I'd like to display address
>>> information, so I just want to implement that address view only once.
>>>
>>> contact.jsp:
>>>
>>> ...
>>> <h1>Contact Sheet</h1>
>>> <div>${actionBean.contact.name}</div>
>>> <stripes:layout-render name="/layout/address.jsp"
>>> address="${actionBean.contact.address}" />
>>> ...
>>>
>>> address.jsp:
>>>
>>> ...
>>> <stripes:layout-definition>
>>>   <div>${address.street}</div>
>>>   <div>${address.city}</div>
>>>   ...
>>> </stripes:layout-definition>
>>>
>>> The idea is, to pass the "address" object to the reusable layout
>>> component and use it there.
>>>
>>> Is there any way to do this with Stripes? Any other recommendations?
>>>
>>> Thank you & regards,
>>> Moritz
>>>
>>> ------------------------------------------------------------------------------
>>> 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
>>> [hidden email]
>>> 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
>> [hidden email]
>> 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
> [hidden email]
> 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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: Layout reuse "like a component"

Ben Gunter
I pleaded during the whole process of changing that code for people to test it, and I didn't get much of a response. It has been well over a year since it was finally released. Have either of you reported your problems via Jira? (I just did a quick check and couldn't find any.)

I have debated reverting the code. The problem is that when the new layout code works, it fixes several other significant problems with the old layout code that simply couldn't be fixed otherwise because of the way that code worked. I'm considering reverting to the original and providing the streaming version with a different URL.

On Tue, Jan 31, 2012 at 8:47 AM, Janne Jalkanen <[hidden email]> wrote:

Ditto.  We can't upgrade out of 1.5.3 :-/

(Can we please get the old layout code back as an option, please?)

/Janne

On 31 Jan 2012, at 15:38, Mike McNally wrote:

> Since 1.5.4, using nested layouts has been somewhat problematic. My
> site works in 1.5.3 but fails all over the place in any of the newer
> releases.
>
> On Tue, Jan 31, 2012 at 5:39 AM, Freddy Daoud <[hidden email]> wrote:
>> Hi Moritz,
>>
>> Your code looks right to me. What error are you getting?
>>
>> Another way is to use a JSP .tag file:
>>
>> /tags/address.jsp:
>>
>> <%@ tag body-content="scriptless" %>
>> <%@ attribute name="address" required="true" rtexprvalue="true"
>> type="com.example.model.Address" %>
>> <%@ include file="/jsp/taglibs.jsp" %>
>>
>> <div>${address.street}</div>
>> <div>${address.city}</div>
>>
>> /jsp/taglibs.jsp:
>> <%-- stripes and JSP taglibs... --%
>> <%@ taglib prefix="yourPrefix" tagdir="/tags" %>
>>
>> contact.jsp:
>>
>> <h1>Contact Sheet</h1>
>> <div>${actionBean.contact.name}</div>
>> <yourPrefix:address="${actionBean.contact.address}" />
>>
>> Then you can go ahead and add more .tag files to the /tags directory and
>> use them with
>> <yourPrefix:name> where name corresponds to the file name without the
>> .jsp extension.
>>
>> Hope that helps.
>>
>> Cheers,
>> Freddy
>> http://www.fdaoud.com
>>
>> On Tue, Jan 31, 2012, at 10:13 AM, Moritz Petersen wrote:
>>> Hello everyone,
>>>
>>> maybe I'm missing something, but I have trouble doing the following:
>>>
>>> The idea is to define a piece of reusable JSP code, that can be
>>> embedded into other JSP pages. I thought it should be quite simple
>>> with Stripes' layout tags.
>>>
>>> Take an example: in some JSP pages I'd like to display address
>>> information, so I just want to implement that address view only once.
>>>
>>> contact.jsp:
>>>
>>> ...
>>> <h1>Contact Sheet</h1>
>>> <div>${actionBean.contact.name}</div>
>>> <stripes:layout-render name="/layout/address.jsp"
>>> address="${actionBean.contact.address}" />
>>> ...
>>>
>>> address.jsp:
>>>
>>> ...
>>> <stripes:layout-definition>
>>>   <div>${address.street}</div>
>>>   <div>${address.city}</div>
>>>   ...
>>> </stripes:layout-definition>
>>>
>>> The idea is, to pass the "address" object to the reusable layout
>>> component and use it there.
>>>
>>> Is there any way to do this with Stripes? Any other recommendations?
>>>
>>> Thank you & regards,
>>> Moritz
>>>
>>> ------------------------------------------------------------------------------
>>> 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
>>> [hidden email]
>>> 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
>> [hidden email]
>> 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
> [hidden email]
> 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
[hidden email]
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: Layout reuse "like a component"

Janne Jalkanen

No, sorry. The reason is that our layout is getting so complicated that I cannot provide a simple test case for this, so the bug report would be pretty much useless.  "It eez b0rken, no worky, plz fix" isn't the kind of a bug report I'd like to receive myself... :-)

/Janne

On 31 Jan 2012, at 16:33, Ben Gunter wrote:

I pleaded during the whole process of changing that code for people to test it, and I didn't get much of a response. It has been well over a year since it was finally released. Have either of you reported your problems via Jira? (I just did a quick check and couldn't find any.)

I have debated reverting the code. The problem is that when the new layout code works, it fixes several other significant problems with the old layout code that simply couldn't be fixed otherwise because of the way that code worked. I'm considering reverting to the original and providing the streaming version with a different URL.

On Tue, Jan 31, 2012 at 8:47 AM, Janne Jalkanen <[hidden email]> wrote:

Ditto.  We can't upgrade out of 1.5.3 :-/

(Can we please get the old layout code back as an option, please?)

/Janne

On 31 Jan 2012, at 15:38, Mike McNally wrote:

> Since 1.5.4, using nested layouts has been somewhat problematic. My
> site works in 1.5.3 but fails all over the place in any of the newer
> releases.
>
> On Tue, Jan 31, 2012 at 5:39 AM, Freddy Daoud <[hidden email]> wrote:
>> Hi Moritz,
>>
>> Your code looks right to me. What error are you getting?
>>
>> Another way is to use a JSP .tag file:
>>
>> /tags/address.jsp:
>>
>> <%@ tag body-content="scriptless" %>
>> <%@ attribute name="address" required="true" rtexprvalue="true"
>> type="com.example.model.Address" %>
>> <%@ include file="/jsp/taglibs.jsp" %>
>>
>> <div>${address.street}</div>
>> <div>${address.city}</div>
>>
>> /jsp/taglibs.jsp:
>> <%-- stripes and JSP taglibs... --%
>> <%@ taglib prefix="yourPrefix" tagdir="/tags" %>
>>
>> contact.jsp:
>>
>> <h1>Contact Sheet</h1>
>> <div>${actionBean.contact.name}</div>
>> <yourPrefix:address="${actionBean.contact.address}" />
>>
>> Then you can go ahead and add more .tag files to the /tags directory and
>> use them with
>> <yourPrefix:name> where name corresponds to the file name without the
>> .jsp extension.
>>
>> Hope that helps.
>>
>> Cheers,
>> Freddy
>> http://www.fdaoud.com
>>
>> On Tue, Jan 31, 2012, at 10:13 AM, Moritz Petersen wrote:
>>> Hello everyone,
>>>
>>> maybe I'm missing something, but I have trouble doing the following:
>>>
>>> The idea is to define a piece of reusable JSP code, that can be
>>> embedded into other JSP pages. I thought it should be quite simple
>>> with Stripes' layout tags.
>>>
>>> Take an example: in some JSP pages I'd like to display address
>>> information, so I just want to implement that address view only once.
>>>
>>> contact.jsp:
>>>
>>> ...
>>> <h1>Contact Sheet</h1>
>>> <div>${actionBean.contact.name}</div>
>>> <stripes:layout-render name="/layout/address.jsp"
>>> address="${actionBean.contact.address}" />
>>> ...
>>>
>>> address.jsp:
>>>
>>> ...
>>> <stripes:layout-definition>
>>>   <div>${address.street}</div>
>>>   <div>${address.city}</div>
>>>   ...
>>> </stripes:layout-definition>
>>>
>>> The idea is, to pass the "address" object to the reusable layout
>>> component and use it there.
>>>
>>> Is there any way to do this with Stripes? Any other recommendations?
>>>
>>> Thank you & regards,
>>> Moritz
>>>
>>> ------------------------------------------------------------------------------
>>> 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
>>> [hidden email]
>>> 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
>> [hidden email]
>> 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
> [hidden email]
> 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
[hidden email]
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
[hidden email]
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: Layout reuse "like a component"

Mike McNally-3
In reply to this post by Ben Gunter
Well I can see if I can work up a simple test case. My site isn't
super-complicated, I don't think. I just invoke layout-render inside
of layout-components in many places, sometimes more than two deep.
There are also a number of <jsp:include> calls inside of
layout-components, and some of those call layout-render too.  I also
use many tag files, and many of those call stripes tags. Overall I'm
not sure exactly what goes wrong, but generally the effect is that
layouts are just not rendered at all.


On Tue, Jan 31, 2012 at 8:33 AM, Ben Gunter <[hidden email]> wrote:

> I pleaded during the whole process of changing that code for people to test
> it, and I didn't get much of a response. It has been well over a year since
> it was finally released. Have either of you reported your problems via Jira?
> (I just did a quick check and couldn't find any.)
>
> I have debated reverting the code. The problem is that when the new layout
> code works, it fixes several other significant problems with the old layout
> code that simply couldn't be fixed otherwise because of the way that code
> worked. I'm considering reverting to the original and providing the
> streaming version with a different URL.
>
>
> On Tue, Jan 31, 2012 at 8:47 AM, Janne Jalkanen <[hidden email]>
> wrote:
>>
>>
>> Ditto.  We can't upgrade out of 1.5.3 :-/
>>
>> (Can we please get the old layout code back as an option, please?)
>>
>> /Janne
>>
>> On 31 Jan 2012, at 15:38, Mike McNally wrote:
>>
>> > Since 1.5.4, using nested layouts has been somewhat problematic. My
>> > site works in 1.5.3 but fails all over the place in any of the newer
>> > releases.
>> >
>> > On Tue, Jan 31, 2012 at 5:39 AM, Freddy Daoud <[hidden email]>
>> > wrote:
>> >> Hi Moritz,
>> >>
>> >> Your code looks right to me. What error are you getting?
>> >>
>> >> Another way is to use a JSP .tag file:
>> >>
>> >> /tags/address.jsp:
>> >>
>> >> <%@ tag body-content="scriptless" %>
>> >> <%@ attribute name="address" required="true" rtexprvalue="true"
>> >> type="com.example.model.Address" %>
>> >> <%@ include file="/jsp/taglibs.jsp" %>
>> >>
>> >> <div>${address.street}</div>
>> >> <div>${address.city}</div>
>> >>
>> >> /jsp/taglibs.jsp:
>> >> <%-- stripes and JSP taglibs... --%
>> >> <%@ taglib prefix="yourPrefix" tagdir="/tags" %>
>> >>
>> >> contact.jsp:
>> >>
>> >> <h1>Contact Sheet</h1>
>> >> <div>${actionBean.contact.name}</div>
>> >> <yourPrefix:address="${actionBean.contact.address}" />
>> >>
>> >> Then you can go ahead and add more .tag files to the /tags directory
>> >> and
>> >> use them with
>> >> <yourPrefix:name> where name corresponds to the file name without the
>> >> .jsp extension.
>> >>
>> >> Hope that helps.
>> >>
>> >> Cheers,
>> >> Freddy
>> >> http://www.fdaoud.com
>> >>
>> >> On Tue, Jan 31, 2012, at 10:13 AM, Moritz Petersen wrote:
>> >>> Hello everyone,
>> >>>
>> >>> maybe I'm missing something, but I have trouble doing the following:
>> >>>
>> >>> The idea is to define a piece of reusable JSP code, that can be
>> >>> embedded into other JSP pages. I thought it should be quite simple
>> >>> with Stripes' layout tags.
>> >>>
>> >>> Take an example: in some JSP pages I'd like to display address
>> >>> information, so I just want to implement that address view only once.
>> >>>
>> >>> contact.jsp:
>> >>>
>> >>> ...
>> >>> <h1>Contact Sheet</h1>
>> >>> <div>${actionBean.contact.name}</div>
>> >>> <stripes:layout-render name="/layout/address.jsp"
>> >>> address="${actionBean.contact.address}" />
>> >>> ...
>> >>>
>> >>> address.jsp:
>> >>>
>> >>> ...
>> >>> <stripes:layout-definition>
>> >>>   <div>${address.street}</div>
>> >>>   <div>${address.city}</div>
>> >>>   ...
>> >>> </stripes:layout-definition>
>> >>>
>> >>> The idea is, to pass the "address" object to the reusable layout
>> >>> component and use it there.
>> >>>
>> >>> Is there any way to do this with Stripes? Any other recommendations?
>> >>>
>> >>> Thank you & regards,
>> >>> Moritz
>> >>>
>> >>>
>> >>> ------------------------------------------------------------------------------
>> >>> 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
>> >>> [hidden email]
>> >>> 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
>> >> [hidden email]
>> >> 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
>> > [hidden email]
>> > 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
>> [hidden email]
>> 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
> [hidden email]
> 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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: Layout reuse "like a component"

Mike McNally-3
In reply to this post by Ben Gunter
I should also add that according to a colleague things are a good deal
better in the not-yet-released post-1.5.6 code. I'll see if I can
determine exactly what it is that's not working.

On Tue, Jan 31, 2012 at 8:33 AM, Ben Gunter <[hidden email]> wrote:

> I pleaded during the whole process of changing that code for people to test
> it, and I didn't get much of a response. It has been well over a year since
> it was finally released. Have either of you reported your problems via Jira?
> (I just did a quick check and couldn't find any.)
>
> I have debated reverting the code. The problem is that when the new layout
> code works, it fixes several other significant problems with the old layout
> code that simply couldn't be fixed otherwise because of the way that code
> worked. I'm considering reverting to the original and providing the
> streaming version with a different URL.
>
>
> On Tue, Jan 31, 2012 at 8:47 AM, Janne Jalkanen <[hidden email]>
> wrote:
>>
>>
>> Ditto.  We can't upgrade out of 1.5.3 :-/
>>
>> (Can we please get the old layout code back as an option, please?)
>>
>> /Janne
>>
>> On 31 Jan 2012, at 15:38, Mike McNally wrote:
>>
>> > Since 1.5.4, using nested layouts has been somewhat problematic. My
>> > site works in 1.5.3 but fails all over the place in any of the newer
>> > releases.
>> >
>> > On Tue, Jan 31, 2012 at 5:39 AM, Freddy Daoud <[hidden email]>
>> > wrote:
>> >> Hi Moritz,
>> >>
>> >> Your code looks right to me. What error are you getting?
>> >>
>> >> Another way is to use a JSP .tag file:
>> >>
>> >> /tags/address.jsp:
>> >>
>> >> <%@ tag body-content="scriptless" %>
>> >> <%@ attribute name="address" required="true" rtexprvalue="true"
>> >> type="com.example.model.Address" %>
>> >> <%@ include file="/jsp/taglibs.jsp" %>
>> >>
>> >> <div>${address.street}</div>
>> >> <div>${address.city}</div>
>> >>
>> >> /jsp/taglibs.jsp:
>> >> <%-- stripes and JSP taglibs... --%
>> >> <%@ taglib prefix="yourPrefix" tagdir="/tags" %>
>> >>
>> >> contact.jsp:
>> >>
>> >> <h1>Contact Sheet</h1>
>> >> <div>${actionBean.contact.name}</div>
>> >> <yourPrefix:address="${actionBean.contact.address}" />
>> >>
>> >> Then you can go ahead and add more .tag files to the /tags directory
>> >> and
>> >> use them with
>> >> <yourPrefix:name> where name corresponds to the file name without the
>> >> .jsp extension.
>> >>
>> >> Hope that helps.
>> >>
>> >> Cheers,
>> >> Freddy
>> >> http://www.fdaoud.com
>> >>
>> >> On Tue, Jan 31, 2012, at 10:13 AM, Moritz Petersen wrote:
>> >>> Hello everyone,
>> >>>
>> >>> maybe I'm missing something, but I have trouble doing the following:
>> >>>
>> >>> The idea is to define a piece of reusable JSP code, that can be
>> >>> embedded into other JSP pages. I thought it should be quite simple
>> >>> with Stripes' layout tags.
>> >>>
>> >>> Take an example: in some JSP pages I'd like to display address
>> >>> information, so I just want to implement that address view only once.
>> >>>
>> >>> contact.jsp:
>> >>>
>> >>> ...
>> >>> <h1>Contact Sheet</h1>
>> >>> <div>${actionBean.contact.name}</div>
>> >>> <stripes:layout-render name="/layout/address.jsp"
>> >>> address="${actionBean.contact.address}" />
>> >>> ...
>> >>>
>> >>> address.jsp:
>> >>>
>> >>> ...
>> >>> <stripes:layout-definition>
>> >>>   <div>${address.street}</div>
>> >>>   <div>${address.city}</div>
>> >>>   ...
>> >>> </stripes:layout-definition>
>> >>>
>> >>> The idea is, to pass the "address" object to the reusable layout
>> >>> component and use it there.
>> >>>
>> >>> Is there any way to do this with Stripes? Any other recommendations?
>> >>>
>> >>> Thank you & regards,
>> >>> Moritz
>> >>>
>> >>>
>> >>> ------------------------------------------------------------------------------
>> >>> 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
>> >>> [hidden email]
>> >>> 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
>> >> [hidden email]
>> >> 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
>> > [hidden email]
>> > 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
>> [hidden email]
>> 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
> [hidden email]
> 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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: Layout reuse "like a component"

Nikolaos Giannopoulos
In reply to this post by Mike McNally-3
Some people did test the layouts (like myself up to 1.5.5) and reported multiple errors / issues that Ben worked on to get fixed.  

With that said I myself echo'd Ben's call to have others test and report issues.  From what I recall some did initially and quite a few reported over time.

While I understand where the 2 of you are coming from I think you could really help Stripes evolve if you could distill your issues into a mini project that Ben could debug and resolve.

Because even if the old code is incorporated via an option / flag that does nothing to help those that will hit the same issues you are experiencing when/if their layouts become as complex.  And then they will remark that Stripes sucks because their layouts on latest code do not work... you will tell them... no... no... it does work... just use the old code b/c the new code doesn't work very well for complex layouts or whatever other scenario... and BTW since we know this but haven't been able to provide testable code to resolve... we've done the next best thing and put the old working code into the latest release as an option.

That would be a sad commentary for any project so please help create reproducible cases to help the entire community b/c only those with issues can help us get over this issue once and for all... and help people like myself avoid the issues you face at some point down the road.

Yes... this is solely my opinion... and I'm well aware that some will disagree.

--Nikolaos
Sent from my iPhone


On 2012-01-31, at 9:48 AM, Mike McNally <[hidden email]> wrote:

> Well I can see if I can work up a simple test case. My site isn't
> super-complicated, I don't think. I just invoke layout-render inside
> of layout-components in many places, sometimes more than two deep.
> There are also a number of <jsp:include> calls inside of
> layout-components, and some of those call layout-render too.  I also
> use many tag files, and many of those call stripes tags. Overall I'm
> not sure exactly what goes wrong, but generally the effect is that
> layouts are just not rendered at all.
>
>
> On Tue, Jan 31, 2012 at 8:33 AM, Ben Gunter <[hidden email]> wrote:
>> I pleaded during the whole process of changing that code for people to test
>> it, and I didn't get much of a response. It has been well over a year since
>> it was finally released. Have either of you reported your problems via Jira?
>> (I just did a quick check and couldn't find any.)
>>
>> I have debated reverting the code. The problem is that when the new layout
>> code works, it fixes several other significant problems with the old layout
>> code that simply couldn't be fixed otherwise because of the way that code
>> worked. I'm considering reverting to the original and providing the
>> streaming version with a different URL.
>>
>>
>> On Tue, Jan 31, 2012 at 8:47 AM, Janne Jalkanen <[hidden email]>
>> wrote:
>>>
>>>
>>> Ditto.  We can't upgrade out of 1.5.3 :-/
>>>
>>> (Can we please get the old layout code back as an option, please?)
>>>
>>> /Janne
>>>
>>> On 31 Jan 2012, at 15:38, Mike McNally wrote:
>>>
>>>> Since 1.5.4, using nested layouts has been somewhat problematic. My
>>>> site works in 1.5.3 but fails all over the place in any of the newer
>>>> releases.
>>>>
>>>> On Tue, Jan 31, 2012 at 5:39 AM, Freddy Daoud <[hidden email]>
>>>> wrote:
>>>>> Hi Moritz,
>>>>>
>>>>> Your code looks right to me. What error are you getting?
>>>>>
>>>>> Another way is to use a JSP .tag file:
>>>>>
>>>>> /tags/address.jsp:
>>>>>
>>>>> <%@ tag body-content="scriptless" %>
>>>>> <%@ attribute name="address" required="true" rtexprvalue="true"
>>>>> type="com.example.model.Address" %>
>>>>> <%@ include file="/jsp/taglibs.jsp" %>
>>>>>
>>>>> <div>${address.street}</div>
>>>>> <div>${address.city}</div>
>>>>>
>>>>> /jsp/taglibs.jsp:
>>>>> <%-- stripes and JSP taglibs... --%
>>>>> <%@ taglib prefix="yourPrefix" tagdir="/tags" %>
>>>>>
>>>>> contact.jsp:
>>>>>
>>>>> <h1>Contact Sheet</h1>
>>>>> <div>${actionBean.contact.name}</div>
>>>>> <yourPrefix:address="${actionBean.contact.address}" />
>>>>>
>>>>> Then you can go ahead and add more .tag files to the /tags directory
>>>>> and
>>>>> use them with
>>>>> <yourPrefix:name> where name corresponds to the file name without the
>>>>> .jsp extension.
>>>>>
>>>>> Hope that helps.
>>>>>
>>>>> Cheers,
>>>>> Freddy
>>>>> http://www.fdaoud.com
>>>>>
>>>>> On Tue, Jan 31, 2012, at 10:13 AM, Moritz Petersen wrote:
>>>>>> Hello everyone,
>>>>>>
>>>>>> maybe I'm missing something, but I have trouble doing the following:
>>>>>>
>>>>>> The idea is to define a piece of reusable JSP code, that can be
>>>>>> embedded into other JSP pages. I thought it should be quite simple
>>>>>> with Stripes' layout tags.
>>>>>>
>>>>>> Take an example: in some JSP pages I'd like to display address
>>>>>> information, so I just want to implement that address view only once.
>>>>>>
>>>>>> contact.jsp:
>>>>>>
>>>>>> ...
>>>>>> <h1>Contact Sheet</h1>
>>>>>> <div>${actionBean.contact.name}</div>
>>>>>> <stripes:layout-render name="/layout/address.jsp"
>>>>>> address="${actionBean.contact.address}" />
>>>>>> ...
>>>>>>
>>>>>> address.jsp:
>>>>>>
>>>>>> ...
>>>>>> <stripes:layout-definition>
>>>>>>   <div>${address.street}</div>
>>>>>>   <div>${address.city}</div>
>>>>>>   ...
>>>>>> </stripes:layout-definition>
>>>>>>
>>>>>> The idea is, to pass the "address" object to the reusable layout
>>>>>> component and use it there.
>>>>>>
>>>>>> Is there any way to do this with Stripes? Any other recommendations?
>>>>>>
>>>>>> Thank you & regards,
>>>>>> Moritz
>>>>>>
>>>>>>
>>>>>> ------------------------------------------------------------------------------
>>>>>> 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
>>>>>> [hidden email]
>>>>>> 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
>>>>> [hidden email]
>>>>> 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
>>>> [hidden email]
>>>> 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
>>> [hidden email]
>>> 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
>> [hidden email]
>> 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
> [hidden email]
> 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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: Layout reuse "like a component"

Iwao AVE!
In reply to this post by Mike McNally-3
Hi Mike,

The only pattern I had to change during the transition to streaming
layout was stripes:layout-render inside fmt:bundle.
It was kind of making sense to me, so I corrected them and everything
works fine after that.

And my JSPs have the most patterns you mentioned except: 'invoke
layout-render inside of layout-components'.
So it might be a good place to start.

Hope this helps,
Iwao

2012/2/1 Mike McNally <[hidden email]>:

> I should also add that according to a colleague things are a good deal
> better in the not-yet-released post-1.5.6 code. I'll see if I can
> determine exactly what it is that's not working.
>
> On Tue, Jan 31, 2012 at 8:33 AM, Ben Gunter <[hidden email]> wrote:
>> I pleaded during the whole process of changing that code for people to test
>> it, and I didn't get much of a response. It has been well over a year since
>> it was finally released. Have either of you reported your problems via Jira?
>> (I just did a quick check and couldn't find any.)
>>
>> I have debated reverting the code. The problem is that when the new layout
>> code works, it fixes several other significant problems with the old layout
>> code that simply couldn't be fixed otherwise because of the way that code
>> worked. I'm considering reverting to the original and providing the
>> streaming version with a different URL.
>>
>>
>> On Tue, Jan 31, 2012 at 8:47 AM, Janne Jalkanen <[hidden email]>
>> wrote:
>>>
>>>
>>> Ditto.  We can't upgrade out of 1.5.3 :-/
>>>
>>> (Can we please get the old layout code back as an option, please?)
>>>
>>> /Janne
>>>
>>> On 31 Jan 2012, at 15:38, Mike McNally wrote:
>>>
>>> > Since 1.5.4, using nested layouts has been somewhat problematic. My
>>> > site works in 1.5.3 but fails all over the place in any of the newer
>>> > releases.
>>> >
>>> > On Tue, Jan 31, 2012 at 5:39 AM, Freddy Daoud <[hidden email]>
>>> > wrote:
>>> >> Hi Moritz,
>>> >>
>>> >> Your code looks right to me. What error are you getting?
>>> >>
>>> >> Another way is to use a JSP .tag file:
>>> >>
>>> >> /tags/address.jsp:
>>> >>
>>> >> <%@ tag body-content="scriptless" %>
>>> >> <%@ attribute name="address" required="true" rtexprvalue="true"
>>> >> type="com.example.model.Address" %>
>>> >> <%@ include file="/jsp/taglibs.jsp" %>
>>> >>
>>> >> <div>${address.street}</div>
>>> >> <div>${address.city}</div>
>>> >>
>>> >> /jsp/taglibs.jsp:
>>> >> <%-- stripes and JSP taglibs... --%
>>> >> <%@ taglib prefix="yourPrefix" tagdir="/tags" %>
>>> >>
>>> >> contact.jsp:
>>> >>
>>> >> <h1>Contact Sheet</h1>
>>> >> <div>${actionBean.contact.name}</div>
>>> >> <yourPrefix:address="${actionBean.contact.address}" />
>>> >>
>>> >> Then you can go ahead and add more .tag files to the /tags directory
>>> >> and
>>> >> use them with
>>> >> <yourPrefix:name> where name corresponds to the file name without the
>>> >> .jsp extension.
>>> >>
>>> >> Hope that helps.
>>> >>
>>> >> Cheers,
>>> >> Freddy
>>> >> http://www.fdaoud.com
>>> >>
>>> >> On Tue, Jan 31, 2012, at 10:13 AM, Moritz Petersen wrote:
>>> >>> Hello everyone,
>>> >>>
>>> >>> maybe I'm missing something, but I have trouble doing the following:
>>> >>>
>>> >>> The idea is to define a piece of reusable JSP code, that can be
>>> >>> embedded into other JSP pages. I thought it should be quite simple
>>> >>> with Stripes' layout tags.
>>> >>>
>>> >>> Take an example: in some JSP pages I'd like to display address
>>> >>> information, so I just want to implement that address view only once.
>>> >>>
>>> >>> contact.jsp:
>>> >>>
>>> >>> ...
>>> >>> <h1>Contact Sheet</h1>
>>> >>> <div>${actionBean.contact.name}</div>
>>> >>> <stripes:layout-render name="/layout/address.jsp"
>>> >>> address="${actionBean.contact.address}" />
>>> >>> ...
>>> >>>
>>> >>> address.jsp:
>>> >>>
>>> >>> ...
>>> >>> <stripes:layout-definition>
>>> >>>   <div>${address.street}</div>
>>> >>>   <div>${address.city}</div>
>>> >>>   ...
>>> >>> </stripes:layout-definition>
>>> >>>
>>> >>> The idea is, to pass the "address" object to the reusable layout
>>> >>> component and use it there.
>>> >>>
>>> >>> Is there any way to do this with Stripes? Any other recommendations?
>>> >>>
>>> >>> Thank you & regards,
>>> >>> Moritz
>>> >>>
>>> >>>
>>> >>> ------------------------------------------------------------------------------
>>> >>> 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
>>> >>> [hidden email]
>>> >>> 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
>>> >> [hidden email]
>>> >> 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
>>> > [hidden email]
>>> > 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
>>> [hidden email]
>>> 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
>> [hidden email]
>> 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
> [hidden email]
> 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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: Layout reuse "like a component"

Thomas Menke
In reply to this post by Moritz Petersen
On 01/31/2012 10:13 AM, Moritz Petersen wrote:
> Hello everyone,
>
> maybe I'm missing something, but I have trouble doing the following:
>
> The idea is to define a piece of reusable JSP code, that can be
> embedded into other JSP pages. I thought it should be quite simple
> with Stripes' layout tags.
>
> Is there any way to do this with Stripes? Any other recommendations?

Have you considered using JSP 2.0 tag files?
http://stackoverflow.com/a/3257426

This is a quite powerful solution and it is "supported" by eclipse (in
the means that eclipse provides code completion for your custom tags and
attributes and since it is built into JSP you can use it in any environment.
Only drawback is that you can't use it if you are stuck on an old JSP
version.

>
> Thank you&  regards,
> Moritz

Thomas

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: Layout reuse "like a component"

Mike McNally-3
In reply to this post by Nikolaos Giannopoulos

I completely agree and I will certainly try to get a test case or two set up.

On Jan 31, 2012 11:06 AM, "Nikolaos Giannopoulos" <[hidden email]> wrote:
Some people did test the layouts (like myself up to 1.5.5) and reported multiple errors / issues that Ben worked on to get fixed.

With that said I myself echo'd Ben's call to have others test and report issues.  From what I recall some did initially and quite a few reported over time.

While I understand where the 2 of you are coming from I think you could really help Stripes evolve if you could distill your issues into a mini project that Ben could debug and resolve.

Because even if the old code is incorporated via an option / flag that does nothing to help those that will hit the same issues you are experiencing when/if their layouts become as complex.  And then they will remark that Stripes sucks because their layouts on latest code do not work... you will tell them... no... no... it does work... just use the old code b/c the new code doesn't work very well for complex layouts or whatever other scenario... and BTW since we know this but haven't been able to provide testable code to resolve... we've done the next best thing and put the old working code into the latest release as an option.

That would be a sad commentary for any project so please help create reproducible cases to help the entire community b/c only those with issues can help us get over this issue once and for all... and help people like myself avoid the issues you face at some point down the road.

Yes... this is solely my opinion... and I'm well aware that some will disagree.

--Nikolaos
Sent from my iPhone


On 2012-01-31, at 9:48 AM, Mike McNally <[hidden email]> wrote:

> Well I can see if I can work up a simple test case. My site isn't
> super-complicated, I don't think. I just invoke layout-render inside
> of layout-components in many places, sometimes more than two deep.
> There are also a number of <jsp:include> calls inside of
> layout-components, and some of those call layout-render too.  I also
> use many tag files, and many of those call stripes tags. Overall I'm
> not sure exactly what goes wrong, but generally the effect is that
> layouts are just not rendered at all.
>
>
> On Tue, Jan 31, 2012 at 8:33 AM, Ben Gunter <[hidden email]> wrote:
>> I pleaded during the whole process of changing that code for people to test
>> it, and I didn't get much of a response. It has been well over a year since
>> it was finally released. Have either of you reported your problems via Jira?
>> (I just did a quick check and couldn't find any.)
>>
>> I have debated reverting the code. The problem is that when the new layout
>> code works, it fixes several other significant problems with the old layout
>> code that simply couldn't be fixed otherwise because of the way that code
>> worked. I'm considering reverting to the original and providing the
>> streaming version with a different URL.
>>
>>
>> On Tue, Jan 31, 2012 at 8:47 AM, Janne Jalkanen <[hidden email]>
>> wrote:
>>>
>>>
>>> Ditto.  We can't upgrade out of 1.5.3 :-/
>>>
>>> (Can we please get the old layout code back as an option, please?)
>>>
>>> /Janne
>>>
>>> On 31 Jan 2012, at 15:38, Mike McNally wrote:
>>>
>>>> Since 1.5.4, using nested layouts has been somewhat problematic. My
>>>> site works in 1.5.3 but fails all over the place in any of the newer
>>>> releases.
>>>>
>>>> On Tue, Jan 31, 2012 at 5:39 AM, Freddy Daoud <[hidden email]>
>>>> wrote:
>>>>> Hi Moritz,
>>>>>
>>>>> Your code looks right to me. What error are you getting?
>>>>>
>>>>> Another way is to use a JSP .tag file:
>>>>>
>>>>> /tags/address.jsp:
>>>>>
>>>>> <%@ tag body-content="scriptless" %>
>>>>> <%@ attribute name="address" required="true" rtexprvalue="true"
>>>>> type="com.example.model.Address" %>
>>>>> <%@ include file="/jsp/taglibs.jsp" %>
>>>>>
>>>>> <div>${address.street}</div>
>>>>> <div>${address.city}</div>
>>>>>
>>>>> /jsp/taglibs.jsp:
>>>>> <%-- stripes and JSP taglibs... --%
>>>>> <%@ taglib prefix="yourPrefix" tagdir="/tags" %>
>>>>>
>>>>> contact.jsp:
>>>>>
>>>>> <h1>Contact Sheet</h1>
>>>>> <div>${actionBean.contact.name}</div>
>>>>> <yourPrefix:address="${actionBean.contact.address}" />
>>>>>
>>>>> Then you can go ahead and add more .tag files to the /tags directory
>>>>> and
>>>>> use them with
>>>>> <yourPrefix:name> where name corresponds to the file name without the
>>>>> .jsp extension.
>>>>>
>>>>> Hope that helps.
>>>>>
>>>>> Cheers,
>>>>> Freddy
>>>>> http://www.fdaoud.com
>>>>>
>>>>> On Tue, Jan 31, 2012, at 10:13 AM, Moritz Petersen wrote:
>>>>>> Hello everyone,
>>>>>>
>>>>>> maybe I'm missing something, but I have trouble doing the following:
>>>>>>
>>>>>> The idea is to define a piece of reusable JSP code, that can be
>>>>>> embedded into other JSP pages. I thought it should be quite simple
>>>>>> with Stripes' layout tags.
>>>>>>
>>>>>> Take an example: in some JSP pages I'd like to display address
>>>>>> information, so I just want to implement that address view only once.
>>>>>>
>>>>>> contact.jsp:
>>>>>>
>>>>>> ...
>>>>>> <h1>Contact Sheet</h1>
>>>>>> <div>${actionBean.contact.name}</div>
>>>>>> <stripes:layout-render name="/layout/address.jsp"
>>>>>> address="${actionBean.contact.address}" />
>>>>>> ...
>>>>>>
>>>>>> address.jsp:
>>>>>>
>>>>>> ...
>>>>>> <stripes:layout-definition>
>>>>>>   <div>${address.street}</div>
>>>>>>   <div>${address.city}</div>
>>>>>>   ...
>>>>>> </stripes:layout-definition>
>>>>>>
>>>>>> The idea is, to pass the "address" object to the reusable layout
>>>>>> component and use it there.
>>>>>>
>>>>>> Is there any way to do this with Stripes? Any other recommendations?
>>>>>>
>>>>>> Thank you & regards,
>>>>>> Moritz
>>>>>>
>>>>>>
>>>>>> ------------------------------------------------------------------------------
>>>>>> 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
>>>>>> [hidden email]
>>>>>> 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
>>>>> [hidden email]
>>>>> 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
>>>> [hidden email]
>>>> 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
>>> [hidden email]
>>> 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
>> [hidden email]
>> 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
> [hidden email]
> 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
[hidden email]
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: Layout reuse "like a component"

Moritz Petersen-2
In reply to this post by Thomas Menke
Thank you everyone for the constructive replies. That JSP 2.0 tag files was a good advice and it works perfectly well.

Actually, I wasn't getting a real error message, but just weird behavior. The tag files solved my problem and are quite an elegant solution.

Regards,
Moritz


Am 31.01.2012 um 17:55 schrieb Thomas Menke:

> On 01/31/2012 10:13 AM, Moritz Petersen wrote:
>> Hello everyone,
>>
>> maybe I'm missing something, but I have trouble doing the following:
>>
>> The idea is to define a piece of reusable JSP code, that can be
>> embedded into other JSP pages. I thought it should be quite simple
>> with Stripes' layout tags.
>>
>> Is there any way to do this with Stripes? Any other recommendations?
>
> Have you considered using JSP 2.0 tag files?
> http://stackoverflow.com/a/3257426
>
> This is a quite powerful solution and it is "supported" by eclipse (in
> the means that eclipse provides code completion for your custom tags and
> attributes and since it is built into JSP you can use it in any environment.
> Only drawback is that you can't use it if you are stuck on an old JSP
> version.
>
>>
>> Thank you&  regards,
>> Moritz
>
> Thomas
>
> ------------------------------------------------------------------------------
> 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
> [hidden email]
> 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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: Layout reuse "like a component"

Grzegorz Krugły
In reply to this post by Ben Gunter
I would recommend against reverting the code. Maybe it should be
refactored so that layout engine can be chosen using a param in web.xml?
Defaulting to streaming one, because it seems to be better except for
overcomplicated solutions. Having said that, I myself have quite an
overcomplicated solution that uses Stripes' layout engine to render
content chunks inside a CMS of sorts and it works MUCH smoother since
You changed the layout code.

W dniu 2012-01-31 15:33, Ben Gunter pisze:
>
> I have debated reverting the code. The problem is that when the new
> layout code works, it fixes several other significant problems with
> the old layout code that simply couldn't be fixed otherwise because of
> the way that code worked. I'm considering reverting to the original
> and providing the streaming version with a different URL.
>


------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: Layout reuse "like a component"

Mike McNally-3
In reply to this post by Moritz Petersen-2
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.

On Tue, Jan 31, 2012 at 3:59 PM, Moritz Petersen
<[hidden email]> wrote:

> Thank you everyone for the constructive replies. That JSP 2.0 tag files was a good advice and it works perfectly well.
>
> Actually, I wasn't getting a real error message, but just weird behavior. The tag files solved my problem and are quite an elegant solution.
>
> Regards,
> Moritz
>
>
> Am 31.01.2012 um 17:55 schrieb Thomas Menke:
>
>> On 01/31/2012 10:13 AM, Moritz Petersen wrote:
>>> Hello everyone,
>>>
>>> maybe I'm missing something, but I have trouble doing the following:
>>>
>>> The idea is to define a piece of reusable JSP code, that can be
>>> embedded into other JSP pages. I thought it should be quite simple
>>> with Stripes' layout tags.
>>>
>>> Is there any way to do this with Stripes? Any other recommendations?
>>
>> Have you considered using JSP 2.0 tag files?
>> http://stackoverflow.com/a/3257426
>>
>> This is a quite powerful solution and it is "supported" by eclipse (in
>> the means that eclipse provides code completion for your custom tags and
>> attributes and since it is built into JSP you can use it in any environment.
>> Only drawback is that you can't use it if you are stuck on an old JSP
>> version.
>>
>>>
>>> Thank you&  regards,
>>> Moritz
>>
>> Thomas
>>
>> ------------------------------------------------------------------------------
>> 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
>> [hidden email]
>> 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
> [hidden email]
> 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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: Layout reuse "like a component"

W. Hartung

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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: Layout reuse "like a component"

Mike McNally-3
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 <[hidden email]> 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
> [hidden email]
> 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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: Layout reuse "like a component"

Moritz Petersen
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 <[hidden email]> 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 <[hidden email]> 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
>> [hidden email]
>> 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
> [hidden email]
> 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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: Layout reuse "like a component"

Mike McNally-3
wow.  Learn something every day :-)

On Wed, Feb 1, 2012 at 7:00 AM, Moritz Petersen <[hidden email]> wrote:

> 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 <[hidden email]> 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 <[hidden email]> 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
>>> [hidden email]
>>> 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
>> [hidden email]
>> 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
> [hidden email]
> 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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: Layout reuse "like a component"

Ben Gunter
In reply to this post by Mike McNally-3
I just wanted to follow up on this conversation. Mike, earlier in the thread you mentioned that there were <jsp:include> calls within your layouts that also called layouts. That is a known problem that I'm working on trying to solve before I release 1.5.7. I've made a lot of progress since 1.5.6 so if you want to see how things look right now, you can test against the latest 1.5.7-SNAPSHOT from Sonatype. Also see ...


... for more information.

Further, I wanted to let everyone know that when 1.5.7 is released it will contain both the new streaming layout tags and the original buffered tags. The buffered tags have been moved to a new package, are defined in a new TLD and can be imported with a new URI, like so ...

<%@ taglib prefix="buffered" uri="http://stripes.sourceforge.net/stripes-buffered-layout.tld"%>

So the default implementation will be streaming, but the buffered tags will be available for backward compatibility. This should help those who find themselves stuck on 1.5.3 because of layout issues.

-Ben

On Tue, Jan 31, 2012 at 12:25 PM, Mike McNally <[hidden email]> wrote:

I completely agree and I will certainly try to get a test case or two set up.

On Jan 31, 2012 11:06 AM, "Nikolaos Giannopoulos" <[hidden email]> wrote:
Some people did test the layouts (like myself up to 1.5.5) and reported multiple errors / issues that Ben worked on to get fixed.

With that said I myself echo'd Ben's call to have others test and report issues.  From what I recall some did initially and quite a few reported over time.

While I understand where the 2 of you are coming from I think you could really help Stripes evolve if you could distill your issues into a mini project that Ben could debug and resolve.

Because even if the old code is incorporated via an option / flag that does nothing to help those that will hit the same issues you are experiencing when/if their layouts become as complex.  And then they will remark that Stripes sucks because their layouts on latest code do not work... you will tell them... no... no... it does work... just use the old code b/c the new code doesn't work very well for complex layouts or whatever other scenario... and BTW since we know this but haven't been able to provide testable code to resolve... we've done the next best thing and put the old working code into the latest release as an option.

That would be a sad commentary for any project so please help create reproducible cases to help the entire community b/c only those with issues can help us get over this issue once and for all... and help people like myself avoid the issues you face at some point down the road.

Yes... this is solely my opinion... and I'm well aware that some will disagree.

--Nikolaos
Sent from my iPhone


On 2012-01-31, at 9:48 AM, Mike McNally <[hidden email]> wrote:

> Well I can see if I can work up a simple test case. My site isn't
> super-complicated, I don't think. I just invoke layout-render inside
> of layout-components in many places, sometimes more than two deep.
> There are also a number of <jsp:include> calls inside of
> layout-components, and some of those call layout-render too.  I also
> use many tag files, and many of those call stripes tags. Overall I'm
> not sure exactly what goes wrong, but generally the effect is that
> layouts are just not rendered at all.
>
>
> On Tue, Jan 31, 2012 at 8:33 AM, Ben Gunter <[hidden email]> wrote:
>> I pleaded during the whole process of changing that code for people to test
>> it, and I didn't get much of a response. It has been well over a year since
>> it was finally released. Have either of you reported your problems via Jira?
>> (I just did a quick check and couldn't find any.)
>>
>> I have debated reverting the code. The problem is that when the new layout
>> code works, it fixes several other significant problems with the old layout
>> code that simply couldn't be fixed otherwise because of the way that code
>> worked. I'm considering reverting to the original and providing the
>> streaming version with a different URL.
>>
>>
>> On Tue, Jan 31, 2012 at 8:47 AM, Janne Jalkanen <[hidden email]>
>> wrote:
>>>
>>>
>>> Ditto.  We can't upgrade out of 1.5.3 :-/
>>>
>>> (Can we please get the old layout code back as an option, please?)
>>>
>>> /Janne
>>>
>>> On 31 Jan 2012, at 15:38, Mike McNally wrote:
>>>
>>>> Since 1.5.4, using nested layouts has been somewhat problematic. My
>>>> site works in 1.5.3 but fails all over the place in any of the newer
>>>> releases.
>>>>
>>>> On Tue, Jan 31, 2012 at 5:39 AM, Freddy Daoud <[hidden email]>
>>>> wrote:
>>>>> Hi Moritz,
>>>>>
>>>>> Your code looks right to me. What error are you getting?
>>>>>
>>>>> Another way is to use a JSP .tag file:
>>>>>
>>>>> /tags/address.jsp:
>>>>>
>>>>> <%@ tag body-content="scriptless" %>
>>>>> <%@ attribute name="address" required="true" rtexprvalue="true"
>>>>> type="com.example.model.Address" %>
>>>>> <%@ include file="/jsp/taglibs.jsp" %>
>>>>>
>>>>> <div>${address.street}</div>
>>>>> <div>${address.city}</div>
>>>>>
>>>>> /jsp/taglibs.jsp:
>>>>> <%-- stripes and JSP taglibs... --%
>>>>> <%@ taglib prefix="yourPrefix" tagdir="/tags" %>
>>>>>
>>>>> contact.jsp:
>>>>>
>>>>> <h1>Contact Sheet</h1>
>>>>> <div>${actionBean.contact.name}</div>
>>>>> <yourPrefix:address="${actionBean.contact.address}" />
>>>>>
>>>>> Then you can go ahead and add more .tag files to the /tags directory
>>>>> and
>>>>> use them with
>>>>> <yourPrefix:name> where name corresponds to the file name without the
>>>>> .jsp extension.
>>>>>
>>>>> Hope that helps.
>>>>>
>>>>> Cheers,
>>>>> Freddy
>>>>> http://www.fdaoud.com
>>>>>
>>>>> On Tue, Jan 31, 2012, at 10:13 AM, Moritz Petersen wrote:
>>>>>> Hello everyone,
>>>>>>
>>>>>> maybe I'm missing something, but I have trouble doing the following:
>>>>>>
>>>>>> The idea is to define a piece of reusable JSP code, that can be
>>>>>> embedded into other JSP pages. I thought it should be quite simple
>>>>>> with Stripes' layout tags.
>>>>>>
>>>>>> Take an example: in some JSP pages I'd like to display address
>>>>>> information, so I just want to implement that address view only once.
>>>>>>
>>>>>> contact.jsp:
>>>>>>
>>>>>> ...
>>>>>> <h1>Contact Sheet</h1>
>>>>>> <div>${actionBean.contact.name}</div>
>>>>>> <stripes:layout-render name="/layout/address.jsp"
>>>>>> address="${actionBean.contact.address}" />
>>>>>> ...
>>>>>>
>>>>>> address.jsp:
>>>>>>
>>>>>> ...
>>>>>> <stripes:layout-definition>
>>>>>>   <div>${address.street}</div>
>>>>>>   <div>${address.city}</div>
>>>>>>   ...
>>>>>> </stripes:layout-definition>
>>>>>>
>>>>>> The idea is, to pass the "address" object to the reusable layout
>>>>>> component and use it there.
>>>>>>
>>>>>> Is there any way to do this with Stripes? Any other recommendations?
>>>>>>
>>>>>> Thank you & regards,
>>>>>> Moritz
>>>>>>
>>>>>>
>>>>>> ------------------------------------------------------------------------------
>>>>>> 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
>>>>>> [hidden email]
>>>>>> 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
>>>>> [hidden email]
>>>>> 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
>>>> [hidden email]
>>>> 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
>>> [hidden email]
>>> 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
>> [hidden email]
>> 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
> [hidden email]
> 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
[hidden email]
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users



------------------------------------------------------------------------------
Try before you buy = See our experts in action!
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-dev2
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
12