ICEfaces MenuBar 水平方向不起作用
我正在使用iceFaces 2.0.2 这就是我所做的:
<?xml version="1.0" encoding="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"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:pretty="http://ocpsoft.com/prettyfaces"
xmlns:ice="http://www.icesoft.com/icefaces/component">
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1"></meta>
<link href="./xmlhttp/css/xp/xp.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<ui:composition>
<h1>
<h:outputText value="my application" />
</h1>
<pretty:link mappingId="link">
some link
</pretty:link>
<ice:menuBar id="menuBar" orientation="Horizontal">
<ice:menuItem value="menuItem"></ice:menuItem>
<ice:menuItem value="menuItem2"></ice:menuItem>
</ice:menuBar>
</ui:composition>
</body>
</html>
上面是用facelets制作的头文件,菜单项垂直显示,请告知为什么水平方向不起作用?
i am using iceFaces 2.0.2
here's what i did:
<?xml version="1.0" encoding="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"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:pretty="http://ocpsoft.com/prettyfaces"
xmlns:ice="http://www.icesoft.com/icefaces/component">
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1"></meta>
<link href="./xmlhttp/css/xp/xp.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<ui:composition>
<h1>
<h:outputText value="my application" />
</h1>
<pretty:link mappingId="link">
some link
</pretty:link>
<ice:menuBar id="menuBar" orientation="Horizontal">
<ice:menuItem value="menuItem"></ice:menuItem>
<ice:menuItem value="menuItem2"></ice:menuItem>
</ice:menuBar>
</ui:composition>
</body>
</html>
above is a header file made with facelets, and the menu items appears vertically, please advise why the horizontal orientation doesn't work ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
水平方向是默认的,因此您不必显式指定。
如果必须定义的话,也可以尝试以小写形式定义它。
请确保您拥有其所使用的正确 CSS。
Horizontal orientation is default, so you dont have to specify that explicitly.
Also try defining that in lower case, if you must define that.
Please make sure you have the correct CSS that is being used by it.
我的错误是给菜单栏一个影响定位的 css 类。
it was my mistake by giving the menubar a css class that was affecting the positioning.
您必须在谷歌浏览器上测试您的页面,方向才可以工作。我在 FireFox 和 IE 上遇到同样的问题,但在 google chrome 上没有。可能是冰面虫。
You have to test your page on google chrome, the orientation will Work. I'm having the same issue with FireFox and IE, but not with google chrome. May be it's an icefaces bug.