张惠春歌曲:Facelets 标签参考 2
Facelets 标签参考 2 -grule
lxm翻译自《Facelets Essentials: Guide to JavaServer? Faces View Definition Framework 》
不当之处欢迎指正。
这标签是开发程序时很有用的工具。在 launched 的时候通过按组合健 Ctrl + Shift + < 热键 > ( 默认是 D) ,将显示一个弹出窗口,在里面显示组件树和局部变量,表格 1-6 列出它的属性。
表格 1-6:
通常,可以在页面的末尾找到 debug 标签 , 但它可以定义在任何位置,可以定义 如下 :
rendered="#{initParam['apress.DEBUG_MODE']}"/> hxzon:在firefox中被查找快捷键覆盖,不成功。 这样 , 按 Ctrl + Shift + G 就可以弹出调试窗口,在 initParam['apress.DEBUG_MODE'] 中指定是否显示。 表格 : 举例: Listing 1-17. param-details.xhtml "http://www.w3.org/TR/xhtml1/DTD/xhtml1- transitional.dtd"> xmlns:ui="http://java.sun.com/jsf/facelets">
#{birdName}
Order: #{birdOrder}
Family: #{birdFamily}
在下面文件中引用前面定义的模板文件
Listing 1-18. param-example.xhtml
"http://www.w3.org/TR/xhtml1/DTD/ ?
xhtml1-transitional.dtd">
xmlns:ui="http://java.sun.com/jsf/facelets">
产生如下输出:
Parrot
Order: Psittaciformes
Family: Psittacidae
Eagle
Order: Falconiformes
Family: Accipitridae
例如:
This will be removed.
This will survive
This will be removed too
And this will survive too!
产生如下输出:
This will survive
This will survive too!