在jspx页面常用的jsf tag
<jf:spacer height="45px" /> 设置换行和与其他标签间隔高度
<jf:messages text="Error Message:" inlineStyle="width: 1080px;"/> 用来显示java后台返回的错误消息提示
<!-- Navigation Bar -->
<jf:breadCrumbs>
<jf:commandNavigationItem text="#{res['header.booking']}" disabled="true" />
<jf:commandNavigationItem text="#{res['header.booking.search']}" disabled="true" inlineStyle="font-size:12pt;" />
</jf:breadCrumbs>
标签容器.
<jx:panelBox text="title" rendered="true" inlineStyle="width: 1100px;"> 是一个容器一般用来放文本框 ,文本域,表格.属性:text ,用来显示标题.
rendered 用来控制是否显示 属性值为true 是显示 ,false 则隐藏. inlineStyle="width:97%;" 用来写 css 样式调整布局 ,长度单位可已是像素也可以是百分比
<jx:panelBox text="title" inlineStyle="width: 950px;" >
<cx:panelFormLayout maxColumns="2" labelWidth="190" fieldWidth="260">
<jf:inputText readOnly="true" value="#{caller.userName}" label="#{appRes['booking.list.createdBy']}"/> 在里面加上rows="数字" 变成文本域
select item/button 在项目以以下三种方式出现
<jf:selectOneChoice readOnly="true" label="#{xxx}" value="{xxx}" >
<f:selectItems value="#{pageFlowScope.booking_description}" />
</jf:selectOneChoice>
<jf:selectBooleanCheckbox label="#{codeMainRes['roomcode.activeType']}" value="#{roomCodePageBean.roomCode.active}" showRequired="true"/> --复选框
<cx:selectOneChoice readOnly="true" value="#{xx}" dataId="initiatedByBean"> </cx:selectOneChoice>
单选框
<jf:selectOneRadio id="leaveDateToApm" valueChangeListener="#{leaveRequestHandler.leaveDateToApmChanged}"
readOnly="#{leaveRequestPageBean.leaveRequest.revision!=0}"
valuePassThru="true" value="#{leaveRequestPageBean.leaveRequest.leaveDateToApm}"
autoSubmit="true" immediate="true" layout="horizontal">
<f:selectItem itemLabel="AM" itemValue="am" />
<f:selectItem itemLabel="PM" itemValue="pm" />
</jf:selectOneRadio>
用作显示时间的tag
<jf:inputDate readOnly="#{applicationPageBean.application.status!=null}" label="#{xx}" value="#{xx}"
<jf:convertDateTime pattern="dd MMM yyyy"></jf:convertDateTime>
</jf:inputDate>
</cx:panelFormLayout>
</jx:panelBox>
2.button
1.导航button
<jx:navigationPaneEx id="buttons1" hint="buttons" rendered="true" inlineStyle="text-align: left; margin-left: 8px; width: 97%;">
<jf:commandNavigationItem id="save2" text="#{codeMainRes['btn.save']}" rendered="#{!picsDeclarationPageBean.readOnly}"
action="#{picsDeclarationHandler.save}" partialSubmit="true" onclick="return confirm('Confirm to Save?')">
<jf:setActionListener from="ADD" to="#{picsDeclarationHandler.action}" />
</jf:commandNavigationItem>
</jx:navigationPaneEx>
2, 放在panelBox 容器里面的button
<jf:panelHorizontalLayout>
<jf:commandButton text="#{res['search.search']}" id="search" actionListener="#{statusEnquireHandler.search}" />
<jf:commandButton text="#{res['search.reset']}" id="reset" actionListener="#{statusEnquireHandler.reset}" /></jf:panelHorizontalLayout>
<jf:commandNavigationItem id="Submit" text="#{res['btn.submit']}" rendered="true" action="#{newApplicationHandler.save}">
<jf:setActionListener from="VIEW" to="#{newApplicationHandler.action}" /> -- 从页面中把from的属性值传入到handler属性action