« Return to Thread: Passing parameters to a new tag based component

Passing parameters to a new tag based component

by XMaNIaC :: Rate this Message:

Reply to Author | View in Thread

Hi,

I've created and registered a new component using a tag file. I can call it easily and pass some parameters using:

<my:component x="1" y="2" />

But I would like to support something like (the names and values are unknown at design time):

<my:component x="1" y="2">
    <f:param name="other" value="#{whatever}" />
    ...
    <f:param name="more" value="you name it" />
</my:component>

I don't mind if I have to use ui:param or f:param but how can I later (in the template) use a ui:repeat to parse these values? The template looks like:

<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" version="2.0">
   some simple HTML code inside
</ui:composition>

Regards

 « Return to Thread: Passing parameters to a new tag based component