
Untitled
By: a guest on
Jul 15th, 2012 | syntax:
None | size: 0.62 KB | hits: 14 | expires: Never
Render HTML conditionally in Spring MVC
<logic:present name="someForm" property="someProperty">
//Code block
</logic:present>
<h:panelGrid rendered="#{not empty someList}">
//Some code block
</h:panelGrid>
<c:if test="${not empty someList}">
</c:if>
<c:if test="${!empty someForm.someProperty}">
</c:if>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<c:choose>
<c:when test="${condition}">
something
</c:when>
<c:otherwise>
something else
</c:otherwise>
</c:choose>
<c:if test="${condition}">
something
</c:if>