Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 15th, 2012  |  syntax: None  |  size: 0.62 KB  |  hits: 14  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Render HTML conditionally in Spring MVC
  2. <logic:present name="someForm" property="someProperty">
  3.     //Code block
  4. </logic:present>
  5.        
  6. <h:panelGrid rendered="#{not empty someList}">
  7.     //Some code block
  8. </h:panelGrid>
  9.        
  10. <c:if test="${not empty someList}">
  11.  
  12. </c:if>
  13.        
  14. <c:if test="${!empty someForm.someProperty}">
  15.  
  16. </c:if>
  17.        
  18. <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
  19.  
  20. <c:choose>
  21.         <c:when test="${condition}">
  22.             something
  23.         </c:when>
  24.         <c:otherwise>
  25.             something else
  26.         </c:otherwise>
  27.     </c:choose>
  28.        
  29. <c:if test="${condition}">
  30.         something
  31.     </c:if>