0

我的行动课程中有一份员工详细信息列表。我在 JSF 的 dataTable 中显示它们。并允许用户编辑属性。

我想将所有这些属性和对象映射到操作类中的列表。我尝试使用托管属性...但我想如何从 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>
4

0 回答 0