Witam!
Robię aplikację przy użyciu m.in Spring MVC, Apache Tiles i jQuerry Table.
konfiguracja Tiles
public final class TilesDefinitionsConfig implements DefinitionsFactory{
private static final Map<String,Definition> tilesDefinitions = new HashMap<>();
private static final Attribute BASE_TEMPLATE = new Attribute("/WEB-INF/Views/tiles/layouts/layout.jsp");
@Override
public Definition getDefinition(String name, Request tilesContext) {
return tilesDefinitions.get(name);
}
private static void addDefaultLayoutDef(String name, String title, String body) {
Map<String, Attribute> attributes = new HashMap<>();
attributes.put("title", new Attribute(title));
attributes.put("header", new Attribute("/WEB-INF/Views/tiles/template/header.jsp"));
attributes.put("menu", new Attribute("/WEB-INF/Views/tiles/template/menu.jsp"));
attributes.put("body", new Attribute(body));
attributes.put("footer", new Attribute("/WEB-INF/Views/tiles/template/footer.jsp"));
tilesDefinitions.put(name, new Definition(name, BASE_TEMPLATE, attributes));
}
public static void addDefinitions(){
addDefaultLayoutDef("home","Home", "/WEB-INF/Views/Page/home.jsp");
}
public static void addDefinitionsSystem() {
addDefaultLayoutDef("system","Systemy", "/WEB-INF/Views/Page/system.jsp");
}
public static void addDefinitionsDeal() {
addDefaultLayoutDef("deal","Umowy", "/WEB-INF/Views/Page/deal.jsp");
}
public static void addDefinitionsContact() {
addDefaultLayoutDef("contact","Kontakt", "/WEB-INF/Views/Page/contact.jsp");
}
}
przykład - system.jsp gdzie jest tabela
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="<c:url value='static/themes/lightcolor/blue/jtable.css' />" rel="stylesheet" type="text/css" />
<link href="<c:url value='static/jquery-ui.min.css" rel="stylesheet' />" type="text/css" />
<script type="text/javascript" src="static/jquery-3.1.1.min.js"></script>
<script type="text/javascript" src="static/jquery-ui.min.js"></script>
<script type="text/javascript" src="static/jquery.jtable.min.js" ></script>
<script type="text/javascript" src="static/jquery.jtable.js"></script>
<script type="text/javascript" src="static/system.js"></script>
</head>
<body>
<div id="systemResultsDiv"></div>
</body>
</html>
Niestety wyświetlana jest pusta strona. ( Za wyjątkiem layoutu - tu jest wszystko jak należy)
Jakieś sugestie aby rozwiązać ten problem??
czysteskarpety