[Stripes-users] Layout reuse "like a component"

2012-01-31 Thread 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 displa

Re: [Stripes-users] Layout reuse "like a component"

2012-01-31 Thread Freddy Daoud
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.j

Re: [Stripes-users] Layout reuse "like a component"

2012-01-31 Thread Mike McNally
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 wrote: > Hi Moritz, > > Your code looks right to me. What error are you getting? > > Another way is to u

Re: [Stripes-users] Layout reuse "like a component"

2012-01-31 Thread 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 t

Re: [Stripes-users] Layout reuse "like a component"

2012-01-31 Thread 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 reve

Re: [Stripes-users] Layout reuse "like a component"

2012-01-31 Thread 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

Re: [Stripes-users] Layout reuse "like a component"

2012-01-31 Thread Mike McNally
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 calls inside of layout-components, and some of those call layout-rend

Re: [Stripes-users] Layout reuse "like a component"

2012-01-31 Thread Mike McNally
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 wrote: > I pleaded during the whole process of changing that code f

Re: [Stripes-users] Layout reuse "like a component"

2012-01-31 Thread Iwao AVE!
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-ren

Re: [Stripes-users] Layout reuse "like a component"

2012-01-31 Thread Nikolaos Giannopoulos
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

Re: [Stripes-users] Layout reuse "like a component"

2012-01-31 Thread 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 t

Re: [Stripes-users] Layout reuse "like a component"

2012-01-31 Thread Mike McNally
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" 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

Re: [Stripes-users] Layout reuse "like a component"

2012-01-31 Thread Grzegorz Krugły
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 sol

Re: [Stripes-users] Layout reuse "like a component"

2012-01-31 Thread Moritz Petersen
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

Re: [Stripes-users] Layout reuse "like a component"

2012-01-31 Thread Mike McNally
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 nest

Re: [Stripes-users] Layout reuse "like a component"

2012-01-31 Thread Will 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 s

Re: [Stripes-users] Layout reuse "like a component"

2012-02-01 Thread Mike McNally
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 sa

Re: [Stripes-users] Layout reuse "like a component"

2012-02-01 Thread 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"

Re: [Stripes-users] Layout reuse "like a component"

2012-02-01 Thread Mike McNally
wow. Learn something every day :-) On Wed, Feb 1, 2012 at 7:00 AM, Moritz Petersen 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 templat

Re: [Stripes-users] Layout reuse "like a component"

2012-02-06 Thread Ben Gunter
I just wanted to follow up on this conversation. Mike, earlier in the thread you mentioned that there were 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

Re: [Stripes-users] Layout reuse "like a component"

2012-02-06 Thread Mike McNally
OK awesome. I'll see about trying the snapshot. On Mon, Feb 6, 2012 at 10:33 AM, Ben Gunter wrote: > I just wanted to follow up on this conversation. Mike, earlier in the thread > you mentioned that there were calls within your layouts that > also called layouts. That is a known problem that I'