title: JSF custom tag wrapper dynamic parameters
body: <p>I am trying to create a custom tag that will act as a wrapper to standard components and will define values for some common attributes</p>
  
  <p>For example the custom tag will look like this</p>
  
  <pre><code>&lt;ui:component xmlns="http://www.w3.org/1999/xhtml"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:a4j="http://richfaces.org/a4j"
  xmlns:f="http://java.sun.com/jsf/core"
  xmlns:ui="http://java.sun.com/jsf/facelets"
  xmlns:c="http://java.sun.com/jstl/core"&gt;
  
     &lt;rich:datascroller fastControls="false" fastStep="false" maxPages="20" id="#{value}"/&gt;
  
  &lt;/ui:component&gt;
  </code></pre>
  
  <p>Then i will be able to use this tag every time i need a datascroller component like</p>
  
  <pre><code>&lt;my:dataTable id="componentId"/&gt;
  </code></pre>
  
  <p>My question is whether i can provide my custom tag with attributes that will be "transfered" to the jsf component without specifying each one explicitly. For example consider the following use of my custom component</p>
  
  <pre><code>&lt;my:dataTable id="componentId" pagesVar="books" stepControls="true"/&gt;
  </code></pre>
  
  <p>and this one</p>
  
  <pre><code>&lt;my:dataTable id="componentId" pagesVar="items" renderIfSinglePage="false"/&gt;
  </code></pre>
  
  <p>Attributes pagesVar, stepControls, renderIfSinglePage should be passed to the rich:datascroller component. I know i can do something like this</p>
  
  <pre><code>&lt;rich:datascroller pagesVar=#{pagesVar ? pagesVar : ''} stepControls=#{stepControls ? true: false}/&gt;
  </code></pre>
  
  <p>but i am wondering if there is a way to pass all attributes without specifying each one of them </p>