0

jsp GenericForwardComposer, el, databinding

asked 2010-10-27 12:16:06 +0800

eptx gravatar image eptx
130 3

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>

delete flag offensive retag edit

3 Replies

Sort by ยป oldest newest

answered 2010-11-01 22:14:13 +0800

iantsai gravatar image iantsai
2755 1

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.

link publish delete flag offensive edit

answered 2010-11-02 15:30:41 +0800

eptx gravatar image eptx
130 3

How to do #3...a simple example accessing a composer please.

link publish delete flag offensive edit

answered 2010-11-03 06:33:49 +0800

murasakiwu gravatar image murasakiwu
81

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

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2010-10-27 12:16:06 +0800

Seen: 411 times

Last updated: Nov 03 '10

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More