title: Parameterized method call in <ui:include> with variable number of method parameters
body: <p>I have a template that's part of a form to edit some element. The action to be performed is different depending on the page in which it is included. So I pass the action method as a parameter:</p>
  
  <pre><code> &lt;ui:param name="option" value="#{someOptionBean}" /&gt;
   ...
   &lt;ui:include src="/WEB-INF/jsf/value-edit.xhtml"&gt;
      &lt;ui:param name="controllerParam" value="#{optionController}" /&gt;
      &lt;ui:param name="elementParam" value="#{option}" /&gt;
      &lt;ui:param name="actionParam" value="updateOption" /&gt;
   &lt;/ui:include&gt;
  </code></pre>
  
  <p>or:</p>
  
  <pre><code> &lt;ui:param name="property" value="#{somePropertyBean}" /&gt;
   ...
   &lt;ui:include src="/WEB-INF/jsf/value-edit.xhtml"&gt;
      &lt;ui:param name="controllerParam" value="#{propertyController}" /&gt;
      &lt;ui:param name="elementParam" value="#{property}" /&gt;
      &lt;ui:param name="actionParam" value="updateProperty" /&gt;
   &lt;/ui:include&gt;
  </code></pre>
  
  <p>and in <code>value-edit.xhtml</code> there is a command button:     </p>
  
  <pre><code>&lt;p:commandButton value="Update" action="#{controllerParam[actionParam](elementParam)}" /&gt;
  </code></pre>
  
  <p>So far everything works fine.</p>
  
  <p>My problem is that now the action methods don't have the same number of parameters. They are:</p>
  
  <pre><code>public void updateOption(Option option) { ... }
  public void updateProperty(Item item, Prop property) { ... }
  </code></pre>
  
  <p>so I now want to be able to also define the action parameters to have something like:</p>
  
  <pre><code>&lt;ui:param name="actionParam" value="updateOption(option)" /&gt;
  &lt;ui:param name="actionParam" value="updateProperty(item, property)" /&gt;
  </code></pre>
  
  <p>or something like:  </p>
  
  <pre><code>&lt;ui:param name="method" value="updateProperty" /&gt;
  &lt;ui:param name="parameters" value="item, property" /&gt;
  </code></pre>
  
  <p>I've read the docs (<a href="http://docs.oracle.com/javaee/6/tutorial/doc/bnahu.html#gjhbz" rel="noreferrer">Value and Method Expressions / Parameterized Method Calls</a>) and I'm not sure if this is possible.</p>
  
  <p>Is there any way to achieve this?   </p>