Hi,
Either something is "seriously" broken with Nested Layout Components in
1.5.4 OR I am "seriously" confused.
I distilled my previous example even further to the following MINIMAL
code AND it still doesn't work... I have spent 3 *full* days trying to
get this to work... this is TOTALLY ridiculous. Are *nested* Stripes
Layouts horribly broken in 1.5.4????? If so, Stripes Layouts are totally
useless unless you are writing a tutorial or putting together a
rudimentary hello world web page.
The output is as follows:
Before contents
Before test
After test
After contents
However, doesn't everyone expect the following:
Before contents
Before test
Hello World!!!!!!!!!!!!!!
After test
After contents
And here is the code. What exactly am I missing so that I can *behold*
the beauty that is Stripes Layouts? I have looked all over and read
Freddy's book so I know that I need to use ${comp_name} when nesting a
layout comp in a comp... and I have even avoided the dreaded don't use
camelCase OR dashes because it may not work issue... and still no
dice??????????
html_template2.jsp
==============*
*<%@ include file="/WEB-INF/jsp/x4/taglibs.jsp" %>
<s:layout-definition>
Before contents
${contents}
After contents
</s:layout-definition>
3c2.jsp
=====*
*<%@ include file="/WEB-INF/jsp/x4/taglibs.jsp" %>
<s:layout-definition>
<s:layout-render name="/WEB-INF/jsp/x4/base/html_template2.jsp">
<s:layout-component name="contents">
Before test
${test}
After test
</s:layout-component>
</s:layout-render>
</s:layout-definition>
test.jsp
=====*
*<%@ include file="/WEB-INF/jsp/x4/taglibs.jsp" %>
<s:layout-render name="/WEB-INF/jsp/x4/base/3c2.jsp">
<s:layout-component name="test">
Hello World!!!!!!!!!!!!!!
</s:layout-component>
</s:layout-render>
Thanks,
--Nikolaos
Nikolaos Giannopoulos wrote:
Oscar Westra van Holthe - Kind wrote:
Hi Nikolaos,
What I see in short, is this:
1. forwards are to design_site.jsp
2. design_site.jsp renders layout 3c.jsp
(with the components col_center, col_left and col_right replaced)
3. 3c.jsp defines a layout, which renders layout html_template.jsp
(with the component block_body replaced)
4. html_template.jsp does not define a template, but only contains a
component.
You pretty much captured it exactly "except" for a minor correction in
step 4.:
4. html_template.jsp "defines a layout"... and contains a component.
Is this correct? If so, enclose the entire HTML template in a
s:layout-definition tag and behold the result.
Sorry. But isn't html_template.jsp already enclosed in a layout
definition tag (as per the example). Or am I missing something when you
say to wrap the entire HTML template in a layout definition tag?
Apologies if I am misunderstanding.
BTW I should also clarify that I am indeed getting the following result
- not a blank block_body - as originally posted (updated JSP had not
recompiled):
< ... >
<div id="body">
<div id="enclose0">
<div id="col3Center0">
</div>
<div id="col3Left0">
</div>
</div>
<div id="col3Right0">
</div>
</div>
< ... >
So it appears the components in step 2. are not getting injected. Could
this be because I have 3 layout components nested inside a layout
component? i.e. I tried using ${ } for the inner components but it
didn't help.
Looking forward to additional advice and beholding the result....
truly... sincerely... :-)
Thanks,
--Nikolaos
Oscar
------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users
worldwide. Take advantage of special opportunities to increase revenue and
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users
--
Nikolaos Giannopoulos
Director, BrightMinds Software Inc.
e. nikol...@brightminds.org
w. www.brightminds.org
t. 1.613.822.1700
c. 1.613.797.0036
f. 1.613.822.1915
------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users
worldwide. Take advantage of special opportunities to increase revenue and
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users