我需要帮助,了解JSF与Java Class文件连接的方式。 在我目前使用的项目中,它使用类对象将JSF与Java类连接起来。 但我不知道对象初始化的位置。 在Struts中,我们通过Struts.xml连接JSP和动作。但在这里我没有看到任何映射,它只是调用使用JSF如何与视图连接。
#{classNameObject.methodName}
这里classNameObject
是一个对象不是一个类名的类名。
我的问题是这#{classNameObject.methodName}
如何正确连接到CLASSNAME?
这里是代码样本
<p:dataTable id="dataTable" value="#{employeeList.empVarList}"
var="employee" emptyMessage="No Employees found" rows="15"
paginator="true"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
rowsPerPageTemplate="10,15,20" rowIndexVar="rowIndex"
dynamic="false" cache="false" lazy="false"
style="display:block;overflow-y:none;overflow-x:auto;">
这里数据表连接到类EmployeeList的
它使用JSF,primefaces,spring,hibernate的
没有初始化为employeeList
除本
private List<Employee> employeeList = new ArrayList<Employee>();
我只是一周体验除了休眠之外,在上面的所有内容中都已经读过。请帮助我解决所有问题。提前致谢。
它使用注释和反射。 – BalusC
这包含在JSF教程中(现在在提供的答案中)。 –