navigation.jsp 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
  3. <%@ taglib prefix="s" uri="http://www.springframework.org/tags"%>
  4. <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
  5. <div data-role="content">
  6. <ul data-role="listview" id="naviListview">
  7. <c:forEach var="menu" items="${naviMenu }">
  8. <c:choose>
  9. <c:when test="${menu.menuType eq 'NAVI'}">
  10. <li class="naviLink">
  11. <a href="${pageContext.request.contextPath}${menu.accessUriAddr }?menuId=${menu.menuId}" >
  12. <h2>${menu.menuName }</h2>
  13. </a>
  14. </li>
  15. </c:when>
  16. <c:otherwise>
  17. <li class="naviLink">
  18. <c:set var="uri" value='${menu.accessUriAddr }'/>
  19. <c:choose>
  20. <c:when test="${fn:contains(uri , 'javascript') }">
  21. <a href="${menu.accessUriAddr }" >
  22. <h2>${menu.menuName }</h2>
  23. </a>
  24. </c:when>
  25. <c:otherwise>
  26. <a href="${pageContext.request.contextPath}${menu.accessUriAddr }?menuId=${menu.menuId }">
  27. <h2>${menu.menuName }</h2>
  28. </a>
  29. </c:otherwise>
  30. </c:choose>
  31. </li>
  32. </c:otherwise>
  33. </c:choose>
  34. </c:forEach>
  35. </ul>
  36. </div>
  37. <script type="text/javascript">
  38. //다국어
  39. var i18n = function(){
  40. var message = {
  41. "common006" : "<s:message code='mobile.message.common006'/>"
  42. };
  43. this.getMessage = function( code ){
  44. return message[code];
  45. };
  46. };
  47. $(document).one('pagebeforeshow', function(e, ui) {
  48. var page = $.mobile.activePage;
  49. $(".naviLink").on("click",function(e){
  50. $(".naviLink").removeClass("active");
  51. $(this).addClass("active");
  52. });
  53. });
  54. </script>