You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by Lance Zhang <lz...@yahoo.com> on 2009/09/04 03:44:22 UTC

Jetspeed 2.2, layout.jsp with nested layout.jsp

Hi, I found one issue when i use nested layout in jsp format.

1. The /templates/layout/html/columns/layout.jsp 

 if (headerJSP!=null ) {
          if (!(headerJSP.startsWith("/")))
          {
              headerJSP = "/" + headerJSP;
          }
          pageContext.setAttribute("layoutHeaderJSP", headerJSP, PAGE_SCOPE);
         }      
      
      // get the layout decoration footer file
      String footerJSP = layoutDecoration.getFooter();
      if (footerJSP!=null) {
              if (!(footerJSP.startsWith("/")))
          {
            footerJSP = "/" + footerJSP;
          }
          pageContext.setAttribute("layoutFooterJSP", footerJSP, PAGE_SCOPE);
       }   

we need to do a null check before do the startwith on the header and footer.jsp.

2. We need to do a if test on the conditional include of footer.jsp

 <c:if test="${layoutFooterJSP ne null }">
      <c:import url="${layoutFooterJSP}"></c:import>
   </c:if>    

3.

In case of nested layout,  the c:out tag shall be removed to be the following

  <c:otherwise>
                            ${frag.renderedContent}
    </c:otherwise>


      

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org