Will Hartung | 1 Feb 05:42
Picon
Favicon

Re: Layout reuse "like a component"


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
(Continue reading)

Mike McNally | 1 Feb 13:27
Picon
Gravatar

Re: Layout reuse "like a component"

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 <redrocks@...> 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,
(Continue reading)

Moritz Petersen | 1 Feb 14:00
Picon

Re: Layout reuse "like a component"

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 <emmecinque@...> 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.
>
(Continue reading)

Mike McNally | 1 Feb 16:16
Picon
Gravatar

Re: Layout reuse "like a component"

wow.  Learn something every day :-)

On Wed, Feb 1, 2012 at 7:00 AM, Moritz Petersen
<mail@...> 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 <emmecinque@...> wrote:
(Continue reading)

Ben Gunter | 6 Feb 17:33

Re: Layout reuse "like a component"

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 ...

<% <at> 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 <emmecinque-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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" <nikolaos-jmldEbMaNsO09vOPjlrUmA@public.gmane.org> 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 <emmecinque-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 <bgunter-4k5ACwR9inIAvxtiuMwx3w@public.gmane.org> 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 <janne.jalkanen-4lrhCRj/bmMAvxtiuMwx3w@public.gmane.org>
>> 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 <xf2697-97jfqw80gc6171pxa8y+qA@public.gmane.org>
>>>> 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:
>>>>>
>>>>> <% <at> tag body-content="scriptless" %>
>>>>> <% <at> attribute name="address" required="true" rtexprvalue="true"
>>>>> type="com.example.model.Address" %>
>>>>> <% <at> include file="/jsp/taglibs.jsp" %>
>>>>>
>>>>> <div>${address.street}</div>
>>>>> <div>${address.city}</div>
>>>>>
>>>>> /jsp/taglibs.jsp:
>>>>> <%-- stripes and JSP taglibs... --%
>>>>> <% <at> 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
>>>>>> Stripes-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
>>>>>> https://lists.sourceforge.net/lists/listinfo/stripes-users
>>>>>>
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> Keep Your Developer Skills Current with LearnDevNow!
>>>>> The most comprehensive online learning library for Microsoft developers
>>>>> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3,
>>>>> MVC3,
>>>>> Metro Style Apps, more. Free future releases when you subscribe now!
>>>>> http://p.sf.net/sfu/learndevnow-d2d
>>>>> _______________________________________________
>>>>> Stripes-users mailing list
>>>>> Stripes-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
>>>>> https://lists.sourceforge.net/lists/listinfo/stripes-users
>>>>
>>>>
>>>>
>>>> --
>>>> Turtle, turtle, on the ground,
>>>> Pink and shiny, turn around.
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Keep Your Developer Skills Current with LearnDevNow!
>>>> The most comprehensive online learning library for Microsoft developers
>>>> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
>>>> Metro Style Apps, more. Free future releases when you subscribe now!
>>>> http://p.sf.net/sfu/learndevnow-d2d
>>>> _______________________________________________
>>>> Stripes-users mailing list
>>>> Stripes-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
>>>> https://lists.sourceforge.net/lists/listinfo/stripes-users
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Keep Your Developer Skills Current with LearnDevNow!
>>> The most comprehensive online learning library for Microsoft developers
>>> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
>>> Metro Style Apps, more. Free future releases when you subscribe now!
>>> http://p.sf.net/sfu/learndevnow-d2d
>>> _______________________________________________
>>> Stripes-users mailing list
>>> Stripes-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
>>> https://lists.sourceforge.net/lists/listinfo/stripes-users
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Keep Your Developer Skills Current with LearnDevNow!
>> The most comprehensive online learning library for Microsoft developers
>> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
>> Metro Style Apps, more. Free future releases when you subscribe now!
>> http://p.sf.net/sfu/learndevnow-d2d
>> _______________________________________________
>> Stripes-users mailing list
>> Stripes-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
>> https://lists.sourceforge.net/lists/listinfo/stripes-users
>>
>
>
>
> --
> Turtle, turtle, on the ground,
> Pink and shiny, turn around.
>
> ------------------------------------------------------------------------------
> Keep Your Developer Skills Current with LearnDevNow!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-d2d
> _______________________________________________
> Stripes-users mailing list
> Stripes-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>

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

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

New CDI Extension brewing...

Hey all, old user of Stripes (been about a year since I've used it actively) here and just wanted to let you all know I'm trying out a way to get Stripes and CDI/EE6 integration going. So far results are promising, and I'm hoping for minimal changes needed to Stripes itself to get the nicest possible integration between the two. I've got a github project setup if anyone is interested: https://github.com/nstuart/stripes-cdi

Beware, this is the result of two days of hacking, so it's very sparse at the moment, but, even with that it still is working at the basic level of interaction. (and no real test cases yet!)

I'll update the stripes wiki itself at some point if I get to the point where I feel comfortable with the working level of the code, but it's not there yet. I mainly wanted throw this out there to see if anyone else has considered this route yet and taken a look at possible issues and/or complications with it. Right now, my big issues is how to cleanly handle the Proxies CDI/Weld are returning for when Stripes tries to do some inspection on them, and this is where I think I might need to tweak some internal code a bit.

Let me know what you think! 
-Nick
------------------------------------------------------------------------------
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
Stripes-users@...
https://lists.sourceforge.net/lists/listinfo/stripes-users
Mike McNally | 6 Feb 18:01
Picon
Gravatar

Re: Layout reuse "like a component"

OK awesome.  I'll see about trying the snapshot.

On Mon, Feb 6, 2012 at 10:33 AM, Ben Gunter <bgunter@...> wrote:
> 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 ...
>
> http://www.stripesframework.org/jira/browse/STS-817
>
> ... 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 <emmecinque@...> 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"
>> <nikolaos@...> 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 <emmecinque@...> 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 <bgunter@...> 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
>>> >> <janne.jalkanen@...>
>>> >> 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 <xf2697@...>
>>> >>>> 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
>>> >>>>>> Stripes-users@...
>>> >>>>>> https://lists.sourceforge.net/lists/listinfo/stripes-users
>>> >>>>>>
>>> >>>>>
>>> >>>>>
>>> >>>>>
>>> >>>>> ------------------------------------------------------------------------------
>>> >>>>> Keep Your Developer Skills Current with LearnDevNow!
>>> >>>>> The most comprehensive online learning library for Microsoft
>>> >>>>> developers
>>> >>>>> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3,
>>> >>>>> MVC3,
>>> >>>>> Metro Style Apps, more. Free future releases when you subscribe
>>> >>>>> now!
>>> >>>>> http://p.sf.net/sfu/learndevnow-d2d
>>> >>>>> _______________________________________________
>>> >>>>> Stripes-users mailing list
>>> >>>>> Stripes-users@...
>>> >>>>> https://lists.sourceforge.net/lists/listinfo/stripes-users
>>> >>>>
>>> >>>>
>>> >>>>
>>> >>>> --
>>> >>>> Turtle, turtle, on the ground,
>>> >>>> Pink and shiny, turn around.
>>> >>>>
>>> >>>>
>>> >>>>
>>> >>>> ------------------------------------------------------------------------------
>>> >>>> Keep Your Developer Skills Current with LearnDevNow!
>>> >>>> The most comprehensive online learning library for Microsoft
>>> >>>> developers
>>> >>>> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3,
>>> >>>> MVC3,
>>> >>>> Metro Style Apps, more. Free future releases when you subscribe now!
>>> >>>> http://p.sf.net/sfu/learndevnow-d2d
>>> >>>> _______________________________________________
>>> >>>> Stripes-users mailing list
>>> >>>> Stripes-users@...
>>> >>>> https://lists.sourceforge.net/lists/listinfo/stripes-users
>>> >>>
>>> >>>
>>> >>>
>>> >>>
>>> >>> ------------------------------------------------------------------------------
>>> >>> Keep Your Developer Skills Current with LearnDevNow!
>>> >>> The most comprehensive online learning library for Microsoft
>>> >>> developers
>>> >>> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3,
>>> >>> MVC3,
>>> >>> Metro Style Apps, more. Free future releases when you subscribe now!
>>> >>> http://p.sf.net/sfu/learndevnow-d2d
>>> >>> _______________________________________________
>>> >>> Stripes-users mailing list
>>> >>> Stripes-users@...
>>> >>> https://lists.sourceforge.net/lists/listinfo/stripes-users
>>> >>
>>> >>
>>> >>
>>> >>
>>> >> ------------------------------------------------------------------------------
>>> >> Keep Your Developer Skills Current with LearnDevNow!
>>> >> The most comprehensive online learning library for Microsoft
>>> >> developers
>>> >> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3,
>>> >> MVC3,
>>> >> Metro Style Apps, more. Free future releases when you subscribe now!
>>> >> http://p.sf.net/sfu/learndevnow-d2d
>>> >> _______________________________________________
>>> >> Stripes-users mailing list
>>> >> Stripes-users@...
>>> >> https://lists.sourceforge.net/lists/listinfo/stripes-users
>>> >>
>>> >
>>> >
>>> >
>>> > --
>>> > Turtle, turtle, on the ground,
>>> > Pink and shiny, turn around.
>>> >
>>> >
>>> > ------------------------------------------------------------------------------
>>> > Keep Your Developer Skills Current with LearnDevNow!
>>> > The most comprehensive online learning library for Microsoft developers
>>> > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3,
>>> > MVC3,
>>> > Metro Style Apps, more. Free future releases when you subscribe now!
>>> > http://p.sf.net/sfu/learndevnow-d2d
>>> > _______________________________________________
>>> > Stripes-users mailing list
>>> > Stripes-users@...
>>> > https://lists.sourceforge.net/lists/listinfo/stripes-users
>>> >
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Keep Your Developer Skills Current with LearnDevNow!
>>> The most comprehensive online learning library for Microsoft developers
>>> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
>>> Metro Style Apps, more. Free future releases when you subscribe now!
>>> http://p.sf.net/sfu/learndevnow-d2d
>>> _______________________________________________
>>> Stripes-users mailing list
>>> Stripes-users@...
>>> https://lists.sourceforge.net/lists/listinfo/stripes-users
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Keep Your Developer Skills Current with LearnDevNow!
>> The most comprehensive online learning library for Microsoft developers
>> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
>> Metro Style Apps, more. Free future releases when you subscribe now!
>> http://p.sf.net/sfu/learndevnow-d2d
>> _______________________________________________
>> Stripes-users mailing list
>> Stripes-users@...
>> 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
> Stripes-users@...
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>

--

-- 
Turtle, turtle, on the ground,
Pink and shiny, turn around.

------------------------------------------------------------------------------
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
Samuel Santos | 6 Feb 18:44
Picon
Gravatar

Re: New CDI Extension brewing...

Hi Nick,

You can use Stripes Injection Enricher which supports <at> EJB, <at> Inject (CDI) and <at> Resource standard Java EE annotations:
http://www.stripesframework.org/display/stripes/Stripes+Injection+Enricher

Cheers,

--
Samuel Santos
http://www.samaxes.com/


On Mon, Feb 6, 2012 at 4:29 PM, Nick Stuart <nick.stuart-LHwHoU48gxlVtazZjgo0Tw@public.gmane.org> wrote:
Hey all, old user of Stripes (been about a year since I've used it actively) here and just wanted to let you all know I'm trying out a way to get Stripes and CDI/EE6 integration going. So far results are promising, and I'm hoping for minimal changes needed to Stripes itself to get the nicest possible integration between the two. I've got a github project setup if anyone is interested: https://github.com/nstuart/stripes-cdi

Beware, this is the result of two days of hacking, so it's very sparse at the moment, but, even with that it still is working at the basic level of interaction. (and no real test cases yet!)

I'll update the stripes wiki itself at some point if I get to the point where I feel comfortable with the working level of the code, but it's not there yet. I mainly wanted throw this out there to see if anyone else has considered this route yet and taken a look at possible issues and/or complications with it. Right now, my big issues is how to cleanly handle the Proxies CDI/Weld are returning for when Stripes tries to do some inspection on them, and this is where I think I might need to tweak some internal code a bit.

Let me know what you think! 
-Nick

------------------------------------------------------------------------------
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
Stripes-users <at> lists.sourceforge.net
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
Stripes-users@...
https://lists.sourceforge.net/lists/listinfo/stripes-users
Nick Stuart | 6 Feb 19:13

Re: New CDI Extension brewing...

Hi Samuel, thanks for pointing that out, missed it in my browsing. One difference between that and what I'm trying to accomplish is that I would like almost everything to me 'CDI' managed if possible. That means everything from Interceptors, to ActionBeans, to whatever, allowing for tighter integration and communication with ee6 stuff. I greatly dislike JSF, and Spring MVC brings along all of Spring, which doesn't really 'smell' nice if I am aiming towards using CDI for stuff.

As far as I can tell the Enricher is an Interceptor which handles just the ActionBeans, and still does the lookup out of the BeanManager itself. I'm trying to make it so CDI does all that work by making ActionBeans fully fledged managed objects, allowing for things like Scoped ActionBeans and the like as well.

-Nick

On Mon, Feb 6, 2012 at 12:44 PM, Samuel Santos <samaxes-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Hi Nick,

You can use Stripes Injection Enricher which supports <at> EJB, <at> Inject (CDI) and <at> Resource standard Java EE annotations:
http://www.stripesframework.org/display/stripes/Stripes+Injection+Enricher

Cheers,

--
Samuel Santos
http://www.samaxes.com/


On Mon, Feb 6, 2012 at 4:29 PM, Nick Stuart <nick.stuart-LHwHoU48gxlVtazZjgo0Tw@public.gmane.org> wrote:
Hey all, old user of Stripes (been about a year since I've used it actively) here and just wanted to let you all know I'm trying out a way to get Stripes and CDI/EE6 integration going. So far results are promising, and I'm hoping for minimal changes needed to Stripes itself to get the nicest possible integration between the two. I've got a github project setup if anyone is interested: https://github.com/nstuart/stripes-cdi

Beware, this is the result of two days of hacking, so it's very sparse at the moment, but, even with that it still is working at the basic level of interaction. (and no real test cases yet!)

I'll update the stripes wiki itself at some point if I get to the point where I feel comfortable with the working level of the code, but it's not there yet. I mainly wanted throw this out there to see if anyone else has considered this route yet and taken a look at possible issues and/or complications with it. Right now, my big issues is how to cleanly handle the Proxies CDI/Weld are returning for when Stripes tries to do some inspection on them, and this is where I think I might need to tweak some internal code a bit.

Let me know what you think! 
-Nick

------------------------------------------------------------------------------
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
Stripes-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
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
Stripes-users <at> lists.sourceforge.net
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
Stripes-users@...
https://lists.sourceforge.net/lists/listinfo/stripes-users
Chris Johnson | 7 Feb 17:06
Picon

Checkboxes

Can someone explain exactly when checkboxes are rendered checked.. 
I've done some playing around but it's still unclear to me how exactly
they should work:

<stripes:checkbox name="item.id" value="A" checked="A"/> not checked ?
<stripes:checkbox name="item.id" value="A" checked="B"/> not checked ?

The documentation says:  If the value of the checkbox is found to equal or be 
contained by the 'checked' object then the checkbox will default to
rendering as checked.

I find that if the value of the checkbox is found to be 
equal to the value in name then the checkbox is checked..

Can someone explain how i should be using this ? 

Thanks,
..Chris

------------------------------------------------------------------------------
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

Gmane