-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Looking for a basic example like below (but that works) for mixing jsp and zul/GenericForwardComposer/zscript with 1) el and 2) databinding
Thanks!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ taglib uri="http://www.zkoss.org/jsp/zul" prefix="z" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver" ?>
<html>
<body>
<z:page>
<z:div sclass="col1" id="groupView" apply="${dashboardController}">
<c:forEach var="group" items="${groupView$dashboardController.groups}">
<table>
<tr>
<td>${group.name}</td>
</tr>
</table>
</c:forEach>
</z:div>
</z:page>
</body>
</html>
1. please use <z:variable-resolver use="" /> instead of <?variable-resolver class=""?>
2. about the apply="${composer}", use a simple full qualified java class name will be better.
3. JSP EL cannot access ZK's Context, please prepare the context objects in JSP's world.
4. if you have a DelegatingVariableResolver declared, then your composer can still do variable binding with your Spring context.
Dear eptx:
You can create a POJO for storing your data, then put this object in request scope, or session scope. About this problem, you can refer JSP documentation on offical site of Java.
Regards
Asked: 2010-10-27 12:16:06 +0800
Seen: 411 times
Last updated: Nov 03 '10