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"/>
....
你能举个例子吗?
致以问候