h:panelGrid、h:panelGroup标签学习
来源:互联网 发布:迅雷看看优化版 编辑:程序博客网 时间:2024/05/31 15:18
这个标签可以用来作简单的组件排版,它会使用HTML表格标签来绘制表格,并将组件置于其中,主要指定columns属性,例如设定为 2:
<h:panelGrid columns="2">
<h:outputText value="Username"/>
<h:inputText id="name" value="#{userBean.name}"/>
<h:outputText value="Password"/>
<h:inputText id="password" value="#{userBean.password}"/>
<h:commandButton value="submit" action="login"/>
<h:commandButton value="reset" type="reset"/>
</h:panelGrid>
则自动将组件分作 2 个 column来排列,排列出来的样子如下:
<h:panelGrid>的本体间只能包括JSF组件,如果想要放入非JSF组件,例如简单的样版(template)文字,则要使用 <f:verbatim>包括住,例如:
<h:panelGrid columns="2">
<f:verbatim>Username</f:verbatim>
<h:inputText id="name" value="#{userBean.name}"/>
<f:verbatim>Password</f:verbatim>
<h:inputText id="password" value="#{userBean.password}"/>
<h:commandButton value="submit" action="login"/>
<h:commandButton value="reset" type="reset"/>
</h:panelGrid>
<h:panelGroup>
这个组件用来将数个JSF组件包装起来,使其看来像是一个组件,例如:
<h:panelGrid columns="2">
<h:outputText value="Username"/>
<h:inputText id="name" value="#{userBean.name}"/>
<h:outputText value="Password"/>
<h:inputText id="password" value="#{userBean.password}"/>
<h:panelGroup>
<h:commandButton value="submit" action="login"/>
<h:commandButton value="reset" type="reset"/>
</h:panelGroup>
</h:panelGrid>
在<h:panelGroup>中包括了两个<h:commandButton>,这使得< h:panelGrid>在处理时,将那两个<h:commandButton>看作是一个组件来看待,其完成的版面配置如下所示:
<h:panelGrid columns="2">
<h:outputText value="Username"/>
<h:inputText id="name" value="#{userBean.name}"/>
<h:outputText value="Password"/>
<h:inputText id="password" value="#{userBean.password}"/>
<h:commandButton value="submit" action="login"/>
<h:commandButton value="reset" type="reset"/>
</h:panelGrid>
则自动将组件分作 2 个 column来排列,排列出来的样子如下:
<h:panelGrid>的本体间只能包括JSF组件,如果想要放入非JSF组件,例如简单的样版(template)文字,则要使用 <f:verbatim>包括住,例如:
<h:panelGrid columns="2">
<f:verbatim>Username</f:verbatim>
<h:inputText id="name" value="#{userBean.name}"/>
<f:verbatim>Password</f:verbatim>
<h:inputText id="password" value="#{userBean.password}"/>
<h:commandButton value="submit" action="login"/>
<h:commandButton value="reset" type="reset"/>
</h:panelGrid>
<h:panelGroup>
这个组件用来将数个JSF组件包装起来,使其看来像是一个组件,例如:
<h:panelGrid columns="2">
<h:outputText value="Username"/>
<h:inputText id="name" value="#{userBean.name}"/>
<h:outputText value="Password"/>
<h:inputText id="password" value="#{userBean.password}"/>
<h:panelGroup>
<h:commandButton value="submit" action="login"/>
<h:commandButton value="reset" type="reset"/>
</h:panelGroup>
</h:panelGrid>
在<h:panelGroup>中包括了两个<h:commandButton>,这使得< h:panelGrid>在处理时,将那两个<h:commandButton>看作是一个组件来看待,其完成的版面配置如下所示:
0 0
- h:panelGrid、h:panelGroup标签学习
- h:panelGrid、h:panelGroup标签学习
- h:panelGrid、h:panelGroup标签学习
- h:panelGrid、h:panelGroup标签学习
- JSF 标签h:panelGrid
- h:panelGrid 属性详解
- <h:panelgroup>相当于span元素
- H标签
- 如何用好h标签
- h标签的用法
- h系列标签
- [html] h标签
- h标签与p标签
- Linux-退格键回显(^H^H^H^H)stty/tcgetattr学习
- h
- h
- h
- ,h
- 网络编程中的几个常用函数
- Struts2学习之Action接收参数方法二(用DomainModel接收参数(模型驱动))
- iOS触摸事件学习
- android中的颜色代码
- Grunt 单独对css压缩并生成min.css文件
- h:panelGrid、h:panelGroup标签学习
- [水题]HDOJ1020
- 模板类的继承
- Caused by: java.lang.IllegalArgumentException: addChild: Child name 'localhost' is not unique
- easy ui jquery 添加时样式出现问题
- jquery+ajax简单例子及jquery事件
- 数据结构——有序线性表的的插入与删除
- iOS sqlite 数据库加密
- A problem of sorting----(BestCoder Round #54 (div.2))