-
FEATURED COMPONENTS
First time here? Check out the FAQ!
i tried to use Executions.creatCompenent to include a jsp compenent that containt some taglib but dont work.
1st page:
<zscript>
Executions.createComponents("test.jsp", null, null)
</zscript>
2nd page test.jsp
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Absences</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://www.zkoss.org/jsf/zul" prefix="z"%>
<body>
<f:view>
<z:page>
<h:outputText value="test"/>
</z:page>
</f:view>
</body>
</html>
Please refer to
http://www.zkoss.org/javadoc/3.6.0/zk/org/zkoss/zk/ui/Executions.html
http://www.zkoss.org/javadoc/3.6.0/zk/org/zkoss/zk/ui/metainfo/PageDefinition.html
A page definition. It represents a ZUL page.
You may post feature request.
i know this, but not working in jsf page
code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Absences</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://www.zkoss.org/jsf/zul" prefix="z"%>
<body>
<f:view>
<z:page>
<z:window id="win">
</z:window>
<z:zscript>
Include i = new Include();
i.setSrc("test.jsf");
i.setParent(win);
</z:zscript>
</z:page>
</f:view>
</body>
</html>
i can use it work good
<z:zscript>
Executions.createComponentsDirectly("<include src=\"test.zul\"/>", "zul", null, null);
</z:zscript>
but
<z:zscript>
Executions.createComponentsDirectly("<include src=\"test.jsf\"/>", "zul", null, null);
</z:zscript>
does not work java.lang.NullPointerException
Sorry, but it's about tangling lifecycle of zk and jsf.
You may post it a feature request.
Executions.createComponentsDirectly("<include src=\"test.zul\"/>", "zul", null, null); should work,
Executions.createComponentsDirectly("<include src=\"test.jsp\"/>", "zul", null, null); may work,
Executions.createComponentsDirectly("<include src=\"test.jsf\"/>", "zul", null, null); may not work,
Asked: 2009-03-30 18:41:07 +0800
Seen: 886 times
Last updated: Apr 03 '09