portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lance Zhang <lzhan...@yahoo.com>
Subject Jetspeed 2.2, layout.jsp with nested layout.jsp
Date Fri, 04 Sep 2009 01:44:22 GMT
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


Mime
View raw message