现在做的项目有一个要求,一个动态取出数据的表<t:dataTable value="#{perMainBean.employee}" var="personnel"
border="1" styleClass="customers"
headerClass="table-header" binding="#{perMainBean.table}" width="750px"
rowId="#{personnel.employeeCode}
>这是表的信息.. 只有一个字段employeeCode 其他的字段忽略..要求鼠标点中数据的某一行时,要求选中行的颜色发生改变 。点击按钮谈出新窗口,在新窗口可以取到该行的值employeeCode。要求只能选中其中一行 ,不可以多行选择。刚接触jsf ,这个问题对我太难了,望各位大大们多帮忙(忘了一点:不能用单选框之类的来选择... 客户要求)
border="1" styleClass="customers"
headerClass="table-header" binding="#{perMainBean.table}" width="750px"
rowId="#{personnel.employeeCode}
>这是表的信息.. 只有一个字段employeeCode 其他的字段忽略..要求鼠标点中数据的某一行时,要求选中行的颜色发生改变 。点击按钮谈出新窗口,在新窗口可以取到该行的值employeeCode。要求只能选中其中一行 ,不可以多行选择。刚接触jsf ,这个问题对我太难了,望各位大大们多帮忙(忘了一点:不能用单选框之类的来选择... 客户要求)
<t:dataTable value="#{perMainBean.employee}" var="personnel"
border="1" styleClass="customers"
headerClass="table-header" binding="#{perMainBean.table}" width="750px"
rowOnMouseOver="this.style.backgroundColor='#A5CBFF'"
rowOnMouseOut="this.style.backgroundColor='#FFFFE0'"
rowOnClick="this.style.backgroundColor='#FFE0E0'"
rowOnDblClick="this.style.backgroundColor='#E0E0E0'"rowId="#{personnel.employeeCode}
>
第二个问题请详细说明你要做什么,完成什么功能
(必须用action传数据,因为有需要从数据库取值传到新页面上)
<h:commandLink value="提交" action="#{some.method}" target="_blank">
<f:param name="id" value="somevalue"/>
</h:commandLink>