我的动作类中有员工详细信息列表。我在JSF中的dataTable中显示它们。并允许用户编辑属性。
我想将所有这些属性和对象映射到action类中的列表。 我尝试使用托管属性...但我想要如何从JSP页面传递属性。 如何在JSF中实现?
//faces-config
<managed-bean>
<managed-bean-name>employeeProps</managed-bean-name>
<managed-bean-class>com.test.EmployeePropertiesBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
<managed-property>
<property-name>emplyeeList</property-name>
<property-class>java.util.ArrayList</property-class>
<value>#{emplyeeList}</value>
</managed-property>
</managed-bean>
// Navigation rule configured and works well
//Action clss
public class EmployeePropertiesBean
{
private List<Exmployee> emplyeeList = new ArrayList<Exmployee>(); //with getter setters
.
.
.
}
//JSP page
<h:dataTable value="#{employeeProps.emplyeeList}" var="employeePropEntry" >
<h:inputText value="#{advancedPropEntry.value}" id="propText" rendered="#{employeePropEntry.type=='text'}">
.
.
.
.
// Trying to populated the Employee list properties using below the but not working... Similar stuff works with Struts
<h:inputHidden id="emplyeeList[0].name" value="#{employeePropEntry.name}"></h:inputHidden>
</h:dataTable>