Jsf 将bean方法传递给复合对象

Jsf 将bean方法传递给复合对象,jsf,jsf-2,composite-component,Jsf,Jsf 2,Composite Component,我想知道,在JSF2.0中,是否有某种方法可以将某个webbean获取的列表传递给某个组件?webbean getList应向组件返回客户端列表。例如: 组成部分: <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>

我想知道,在JSF2.0中,是否有某种方法可以将某个webbean获取的列表传递给某个组件?webbean getList应向组件返回客户端列表。例如:

组成部分:

<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>

渲染输出中将不存在此选项
....
用户页面应传递返回列表对象的webBean的位置

....
<components:list-client list="webBean.getList"/>
....
。。。。
....
你能给我举个例子吗


致以最诚挚的问候

只有两件事需要改变

访问值应“像往常一样”:

有关更多用法示例,请查看

<components:list-client list="#{webBean.list}" />
<h:dataTable id="clients" value="#{cc.attrs.list}" var="client">