1
我想知道是否存在某種方法將某個webbean獲得的列表傳遞給JSF 2.0中的組件? webbean getList應該返回一個客戶端列表到組件。例如:將bean方法傳遞給複合
組件:
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:composite="http://java.sun.com/jsf/composite">
<head>
<title>This will not be present in rendered output</title>
</head>
<body>
<composite:interface>
<composite:attribute name="list" required="true"/>
</composite:interface>
<composite:implementation>
<h:dataTable id="clients" value="#{list}" var="client">
<h:column>
<f:facet name="header">
<h:outputText value="Client"></h:outputText>
</f:facet>
<h:outputText value="#{client.username}"></h:outputText>
</h:column>
....
</h:dataTable>
</composite:implementation>
</body>
</html>
的userpage應通過它返回一個列表對象的webBean的位置。
....
<components:list-client list="webBean.getList"/>
....
你能舉個例子嗎?
致以問候