-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I don't know why that different:
c.zul:
<zk> <combobox id="focusPosition" height="21px" width="185px" mold="rounded" value="A2"> <comboitem id="lbpos" label="A1" /> </combobox> </zk>
c.jsp:
<jsp:include page="./c.zul"/>
but c.jsp add :<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
it's ok ?
hi, zhongji
I run you sample code without errors. What's your error message?
<?xml version="1.0" encoding="UTF-8" ?> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!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> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Insert title here</title> </head> <body> A parent page which include a zul <jsp:include page="./inner.zul"/> </body> </html>
Thank you for your reply
Maybe I don't have description is clear
in zul file contain a combobox
if jsp file not include:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
the combobox look like not normal , that set height property
if jsp file include:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
the combobox normal
but , if zul is:
<zk> <zssapp width="100%" height="100%" src="/xls/zl002.xls"></zssapp> </zk>
and jsp file include:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
then it only show the spreadsheet menubar, other part can not display. maybe not set height
用中文说一下吧,也许你你能看明白
如果zul文件里是一个combobox,则在jsp中如果不加"<!DOCTYPE..",则combobox显示有问题,似乎是没有设置height属性
但如果加了"<!DOCTYPE.."则显示正常。
但如果zul是
<zk> <zssapp width="100%" height="100%" src="/xls/zl002.xls"></zssapp> </zk>
谢谢帮助
hi, zhongji
We should always add <!DOCTYPE> in html page. Without it, browsers might render pages as not what you expected.
ref:
http://www.alistapart.com/articles/doctype/
http://www.w3.org/QA/Tips/Doctype
<zk> <zssapp width="100%" height="100%" src="/xls/zl002.xls"></zssapp> </zk>
because zssapp's height is 100%, its height depends on its container size which might be specified in outer jsp. But jsp doesn't specify it, so it'll depend on browser's rendering.
I recommend you modify the height to a fixed number, ex: height="500px",and that will solve the problem.
Asked: 2011-09-05 01:39:14 +0800
Seen: 331 times
Last updated: Sep 06 '11