本文概述
- FieldSet属性
- 例子
PrimeFaces提供了< p:fieldset> 组件, 该组件用于在JSF应用程序中创建字段集。它具有下表列出的各种属性。
FieldSet属性
Attribute | Default value | Type | Description |
---|---|---|---|
legend | null | String | 用于设置标题文本。 |
style | null | String | 它用于设置字段集的内联CSS。 |
toggleable | false | Boolean | 它用于使内容与动画可切换。 |
toggleSpeed | 500 | Integer | 它用于设置切换持续时间(以毫秒为单位)。 |
collapsed | false | Boolean | 它用于定义内容的初始可见性状态。 |
JSF文件
// fieldset.xhtml
<
?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:h="http://xmlns.jcp.org/jsf/html"
xmlns:p="http://primefaces.org/ui">
<
h:head>
<
title>
FieldSet<
/title>
<
/h:head>
<
h:body>
<
h:form>
<
p:fieldset legend="Spring Framework" toggleable="true" toggleSpeed="500">
<
h:panelGrid columns="2" cellpadding="5">
<
p:graphicImage name="images/courses/spring.png" />
<
h:outputText value="http://www.srcmini.com/Spring is a lightweight framework. It can be thought of as a framework of frameworks
because it provides support to various frameworks such as Struts, Hibernate, Tapestry, EJB, JSF etc. The framework, in broader sense, can be defined as a structure where we find solution of the various technical problems.
The Spring framework comprises several modules such as IOC, AOP, DAO, Context, ORM, WEB MVC etc.">
<
/h:outputText>
<
/h:panelGrid>
<
/p:fieldset>
<
/h:form>
<
/h:body>
<
/html>
【PrimeFaces FieldSet组件用法】输出
文章图片
文章图片
推荐阅读
- PrimeFaces编辑器用法
- PrimeFaces配置详细操作步骤
- PrimeFaces功能
- PrimeFaces对话框示例
- PrimeFaces ConfirmDialog示例
- PrimeFaces calendar例子
- PrimeFaces CommandLink使用示例
- PrimeFaces按钮用法
- PrimeFaces CommandButton按钮用法