我有两个 facelet 页面:customers.xhtml(带有客户列表)和 customer.xhtml,用于仅查看一位客户的详细信息。我在 customers.xhtml 中使用 ah:dataTable 组件:
<h:dataTable var="customer" value="#{customerBackingBean.customers}">...</h:dataTable>
现在我想为表中的每个客户创建一个超链接。超链接应导航到 customer.xhtml。每个客户都有一个属性primaryKey
,它应该告诉 customer.xhtml 应该显示哪个客户。
我该怎么做呢?如果我为每个 facelet 页面使用两个不同的 backing-bean,它是如何工作的?
提前致谢。