*页面的开头
href=/css/style_organ.css />
href=/css/public.css />
href=/css/ext.css />
*假数据的构造
javax.faces.model.arraydatamodel ad = new javax.faces.model.arraydatamodel(str);
pagecontext.setattribute(ad, ad, pagecontext.session_scope);
%>
1、inputtextarea
常用属性:cols
rows
常用的写法:
2、inputtext
常用属性:readonly
size 框的大小
maxlength 最多字符数
常用的写法:
3、outputtext
常用属性:escape 如果设置为true,会转义和&字符。默认值为false
使用举例:
style=height:30;width:100%;text-align:center; />
4、outputformat
此标签用于tag体中指定的参来格式化组合的消息,
例如:
5、graphicimage
常用例子:
6、commandbutton
常用属性:
type
使用举例:
action= styleclass=button />
7、commandlink
使用举例:
〈h:outputtext value=”#{msgs.linktex}” />
8、outputlink
使用举例:
9、selectbooleancheckbox
复选框(单个的)
10、selectmanycheckbox
一组复选框
11、selectoneradio
单选按钮
12、selectonelistbox
13、selectmanylistbox
14、iframe
15、inputcalendar
currentdaycellclass=currentdaycell renderaspopup=true popuptodaystring=today popupweekstring=week popupdateformat=yyyymmdd value=/>
16、datatable2
17、表头为复杂的datatable
valign=middle bgcolor=#f3f3f3>
columnclasses=center align=center>
18、hrdc的datatable
19、panelgrid
columnbgcolors=#f3f3f3,#ffffff,#f3f3f3,#ffffff
columnwidths=20%,30%,20%,30%
rowheights=22,22,22,22,22
columnbgcolors=#f3f3f3,#ffffff,#f3f3f3,#ffffff
columnaligns=left,center,right
columnvaligns=top,top,
colspan=”;2,2;2;3,1;”
>
20、selectonemenu
21、标签页面:multlink
align=left />
22、页面弹出(按钮)
23、分页的代码
lastrowindexvar=lastrowindex style=display:inline actionlistener=#{customermagnifierbackingbean.scrolleraction}>
24、上传下载
文档上传必须统一使用myfaces控件,不得使用其他上传方法。
界面:
backingbean:
inputstream inputstream = new bufferedinputstream(myfile.getinputstream());
下载必须采用basebackingbean的downloadfile方法:
/**
* 文件下载
* @param object fileinputstream或bytearrayoutputstream
* @param filename 文件名
* @param contenttype 下载类型
*/
public void downloadfile(object object,string filename,string contenttype)
界面主要是一个动作对应后台一个方法
backingbean调用如下方法:
例如:
public string downloadexcel()
{
string contenttype = application/vnd.ms-excel;
// 获得excel文件流(可能是输出流,也可能是输入流)
object = ibizapplicationucc.downloadexcel(bizid)
// 生成默认文件名
defaultfilename = 文档类型代码.业务申报书 + briefbiztaskvo.bizeventnumber
//弹出窗口给界面下载
downloadfile(object object,string defaultfilename ,string contenttype)
return null;
}