Hi Tony,

The problem is that you are nesting s:layout-component tags. Instead,
for creating layout "decorators" as you are doing, use the ${} notation
to render the content of the child. In your case (second layout):

<s:layout-component name="content">
  <form beanclass="${formBeanClass}">
    <div id="searchCritera">
      ${searchCriteria}
    </div>
    <div id="searchResults">
      ${searchResults}
    </div>
  </form>
</s:layout-component>

And to render the layout:

<s:layout-render name="/WEB-INF/jsp/layout/paginatedtablelayout.jsp"  
title="${actionBean.title} ">
         <s:layout-component name="searchCriteria">
             Search Criteria  in jsp
         </s:layout-component>
     <s:layout-component name="searchResults">
         Search Results in jsp
     </s:layout-component>
</s:layout-render>

Hope that helps.

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

On Mon, 2 Feb 2009 11:09:40 -0500, "Tony Nelson" <[email protected]>
said:
> Hi All, I'm trying to create a layout that I thought would be  
> relatively simple, but I'm missing something.
> 
> I have a standard base layout that is relatively large, but at the end  
> of the day it has:
> 
> -- snip --
> 
>      <div id="content">
>          <c:if test="${showMessages}">
>              <s:messages />
>          </c:if>
>          <s:errors />
>          <s:layout-component name="content">
>              Content will go here
>          </s:layout-component>
>       </div>
> 
> -- snip --
> 
> Easy enough.
> 
> Now I have a number of pages that will further break "content" down  
> into 2 standard divs, wrapped in a form. So I created another layout.
> 
> -- snip --
> 
> <%@ include file="/WEB-INF/jsp/include/taglibs.jsp" %>
> <s:layout-definition>
>      <s:layout-render name="/WEB-INF/jsp/layout/baselayout.jsp"  
> title="${title}" includeDwr="${includeDwr}">
>          <s:layout-component name="dwrClasseses">${dwrClasses}</ 
> s:layout-component>
>          <s:layout-component name="content">
>              <form beanclass="${formBeanClass}">
>                  <div id="searchCritera">
>                      <s:layout-component name="searchCriteria">
>                          Search Criteria in layout
>                      </s:layout-component>
>                  </div>
>                  <div id="searchResults">
>                      <s:layout-component name="searchResults" >
>                          Search Results in layout
>                      </s:layout-component>
>                  </div>
>              </form>
>          </s:layout-component>
>      </s:layout-render>
> </s:layout-definition>
> 
> -- snip --
> 
> I simply render the original layout, and replace the content div with  
> a new one.  My jsp that uses this form is:
> 
> -- snip --
> 
> <%@ page contentType="text/html;charset=UTF-8" language="java" %>
> <%@ include file="/WEB-INF/jsp/taglibs.jsp" %>
> 
> <s:layout-render name="/WEB-INF/jsp/layout/paginatedtablelayout.jsp"  
> title="${actionBean.title} ">
>      <s:layout-component name="content">
>          <s:layout-component name="searchCriteria">
>              Search Criteria  in jsp
>          </s:layout-component>
>      </s:layout-component>
>      <s:layout-component name="searchResults">
>          Search Results in jsp
>      </s:layout-component>
> </s:layout-render>
> 
> -- snip --
> 
> When this jsp gets rendered in the browser.. I get
> 
> -- snip --
>      <div id="content">
>              <form beanclass="">
>                  <div id="searchCritera">
> 
>                  </div>
>                  <div id="searchResults">
> 
>                  </div>
>              </form>
>       </div>
> 
> -- snip --
> 
> Neither the default content from the layout, nor the content from my  
> jsp is included in the searchCriteria or searchResults div.
> 
> I'm sure I'm missing a simple concept.
> 
> Any help would be greatly appreciated.
> 
> Thanks
> Tony N.

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to