Maybe add an attribute in t:dataTable for it to look for the dataScroller? It is more logical that way.
<t:dataTable id="..." dataScroller="myDataScroller" ... /> Yee -----Original Message----- From: Simon Kitching [mailto:[EMAIL PROTECTED] Sent: Monday, 28 November 2005 9:41 AM To: MyFaces Discussion Subject: Connecting dataTable and dataScroller Hi, The t:dataScroller component has a "for" attribute that must be set to the id of the t:dataTable it is associated with. As the dataScroller tag is quite verbose, I would like to put it in a separate file and reference it from multiple pages like: <t:dataTable id="..." ..../> <t:aliasBean alias="#{target}" value="#{demoPagingBean}"> <jsp:include page="/jsp/pages/demo/dataScroller.jsp"/> </t:aliasBean> This works find, except that the "for" attribute in the dataScroller *must* match the id of the table, and my table ids change depending upon what the page is. In fact, on some pages I have multiple tables, and want a dataScroller attached to each one. Does anyone have a nice solution for this? If not, then what do people think of: * altering t:dataScroller so that when "for" is null, it tries to look for the nearest preceding sibling of type HtmlDataTable and connect to that. * allowing the "for" attribute to be an EL-expression referencing an HtmlDataTable component: <t:dataTable id="..." binding="#{myBean.dataTable}" ../> <t:dataScroller for="#{myBean.dataTable}" .../> * other suggestions?? Thanks, Simon

