6 Replies Latest reply on Sep 19, 2007 7:27 AM by Alex Ka

    Passing datasource parameter to <h:datatable>

    Piotr Piwko Newbie

      I have a big datatable compoment and I would like to use it with diffrent data sources. I don't want to repeat datatable code many times because of change only one value="#{datasource}" parameter.
      I tried templates, but it doesn't work.

      myTemplate.xhtml

      <ui:composition
       <h:dataTable var="item">
       <f:param value="value">
       \#{ <ui:insert name="source"/> }
       </f:param>
       <h:column>
      ..........
      


      usage
      <s:decorate template="/layout/myTemplate.xhtml">
      <ui:define name="source">datasource</ui:define>
      </s:decorate>
      


      I need to get something like:
       <h:dataTable var="item" value="#{datasource}">
       <h:column>
      .......