Switched to use tags instead of include
This commit is contained in:
parent
5065c24f39
commit
f339582025
8 changed files with 59 additions and 38 deletions
|
|
@ -1,4 +1,6 @@
|
|||
<%@tag description="Footer template" pageEncoding="UTF-8" %>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@taglib prefix="t" tagdir="/WEB-INF/tags" %>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,3 +1,6 @@
|
|||
<%@tag description="Header template" pageEncoding="UTF-8" %>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@taglib prefix="t" tagdir="/WEB-INF/tags" %>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
|
@ -24,4 +27,4 @@
|
|||
</head>
|
||||
|
||||
<body>
|
||||
<jsp:include page="fragment_messages.jsp"/>
|
||||
<t:messages />
|
||||
|
|
@ -1,7 +1,6 @@
|
|||
<%@tag description="User message template" pageEncoding="UTF-8" %>
|
||||
<%@taglib uri = "http://java.sun.com/jsp/jstl/core" prefix = "c" %>
|
||||
<%@tag import="com.example.User" %>
|
||||
<%@attribute name="user" required="true" type="com.example.User"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@taglib prefix="t" tagdir="/WEB-INF/tags" %>
|
||||
|
||||
<!-- User Messages -->
|
||||
<script type="text/javascript">
|
||||
|
|
@ -12,23 +11,28 @@
|
|||
});
|
||||
</script>
|
||||
<div class="menu">
|
||||
<c:forEach var="messages" var="message">
|
||||
<c:if test="${message.getType() == MessageType.WARNING}">
|
||||
</c:if>
|
||||
|
||||
|
||||
if( message.getType() == MessageType.WARNING ){%>
|
||||
<div class="message" style="border: 2px solid #E6E600; padding: 0px; margin: 5px; background: #FFFF99 none repeat scroll 0%; font-size: 11px; color: black; border-radius: 7px;">
|
||||
<center><b><%=message.getMessage() %></b></center>
|
||||
</div>
|
||||
<%} else if( message.getType() == MessageType.ERROR ){ %>
|
||||
<div class="message" style="border: 2px solid #FF0000; padding: 0px; margin: 5px; background: #FFDDCC none repeat scroll 0%; font-size: 11px; color: black; border-radius: 7px;">
|
||||
<center><b><%=message.getMessage() %></b></center>
|
||||
</div>
|
||||
<%} else if( message.getType() == MessageType.INFO ){ %>
|
||||
<div class="message" style="border: 2px solid #039C00; padding: 0px; margin: 5px; background: #9BFB66 none repeat scroll 0%; font-size: 11px; color: black; border-radius: 7px;">
|
||||
<center><b><%=message.getMessage() %></b></center>
|
||||
</div>
|
||||
|
||||
<c:forEach items="${param.messages}" var="message">
|
||||
<c:choose>
|
||||
<c:when test="${message.isInfo()}">
|
||||
<div class="message" style="border: 2px solid #039C00; padding: 0px; margin: 5px; background: #9BFB66 none repeat scroll 0%; font-size: 11px; color: black; border-radius: 7px;">
|
||||
<center><b>${message.title}</b></center>
|
||||
</div>
|
||||
</c:when>
|
||||
<c:when test="${message.isSuccess()}">
|
||||
<div class="message" style="border: 2px solid #039C00; padding: 0px; margin: 5px; background: #9BFB66 none repeat scroll 0%; font-size: 11px; color: black; border-radius: 7px;">
|
||||
<center><b>${message.title}</b></center>
|
||||
</div>
|
||||
</c:when>
|
||||
<c:when test="${message.isWarning()}">
|
||||
<div class="message" style="border: 2px solid #E6E600; padding: 0px; margin: 5px; background: #FFFF99 none repeat scroll 0%; font-size: 11px; color: black; border-radius: 7px;">
|
||||
<center><b>${message.title}</b></center>
|
||||
</div>
|
||||
</c:when>
|
||||
<c:when test="${message.isError()}">
|
||||
<div class="message" style="border: 2px solid #FF0000; padding: 0px; margin: 5px; background: #FFDDCC none repeat scroll 0%; font-size: 11px; color: black; border-radius: 7px;">
|
||||
<center><b>${message.title}</b></center>
|
||||
</div>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</c:forEach>
|
||||
</div>
|
||||
|
|
@ -1,3 +1,7 @@
|
|||
<%@tag description="Navigation bar template" pageEncoding="UTF-8" %>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@taglib prefix="t" tagdir="/WEB-INF/tags" %>
|
||||
|
||||
<!-- Static navbar -->
|
||||
<nav class="navbar navbar-default">
|
||||
<div class="navbar-header">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue