我是liferay的新手,任何人都可以建议一些方法来为Liferay网站上的现有数据库讨论生成service.xml .我希望人们可能已经开发了一些方法或者liferay为此开发了一些插件.
我正在处理ajax请求/响应以更新表,
但是当Ajax对控制器进行调用时,我会得到整页响应.但我想要的只是精确的表数据,我需要用我的c:forEach表进行映射.谢谢.
Jsp查看:
<script type="text/javascript">
jQuery(document).ready(function(){
function doAjaxPost() {
// get the form values
var contextPath ='<jsp:expression>contextPath</jsp:expression>';
$.ajax({
type: "GET",
url: contextPath+"/noticesAjaxRequest",
dataType: "json",
contentType: 'application/json',
success: function(data){
// we have the response
$('#info').empty().html(data);
},
});
}
setInterval(doAjaxPost,10*1000);
});
</script>
<div id="info">
<c:forEach items="${noticeForm.noticeList}" var="notice">
<c:out value="${notice.coreValue} "/>
<c:out value="${notice.description} "/>
<br/>
</c:forEach>
</div>
Run Code Online (Sandbox Code Playgroud)
控制器:
@Controller
public class DashboardController {
private NoticeBO noticeBO;
/*@RequestMapping("/dashboardTest")
public String printWelcome(ModelMap model) {
List<Employee> employeeList=dashboardDAO.getAllEmployee();
for(Employee employee:employeeList)
model.addAttribute("msg", model.get("msg")+"<br/> Spring 3 MVC Hello World"+employee.getCustomerId()); …Run Code Online (Sandbox Code Playgroud)