我想从main.jsp
调用一个包含页眉和页脚的GWT模块的JSP。这些GWT模块应该加载到main.jsp
的主体上。基于从header.jsp点击的链接,应该在main.jsp
的主体内加载相应的GWT模块:
<html>
<head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js">
</script>
<script>
$(document).ready(function() {
$("#clickMe").click(function() {
// This gwtModule.jsp contains only GWT module.
$("#name").load("/gwtModule.jsp");
});
});
</script>
</head>
<body>
${headerAndMenuCache}
<h1>Web Application Starter Project</h1>
<a href="#" id="clickMe">clickMe</a>
<div id="name">
</div>
<jsp:include page="/footer.jsp" />
</body>
</html>
答案 0 :(得分:0)
jQuery.load()
。SimplePanel appWidget = new SimplePanel();
activityManager.setDisplay(appWidget);
// I suppose that you want to use your <div id="name">
RootPanel.get("name").add(appWidget);
希望它对你有所帮助。