Skip to main content

JSF2.0 h:form in ui:repeat or ui:fragment

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
No replies
hopeman
Offline
Joined: 2007-12-08

Hello
I'm not sure if the post is in proper way... so I'm sorry if it's not.
I want to do this:

<br />
      <ui:repeat var="element" value="#{reqBean.items}" ><br />
            <span>________________</span>#{element.text}<br />
            <h:form ><br />
                <h:inputHidden value="#{element.elementID}" binding="#{reqBean.inputHiddenComponent}"></h:inputHidden><br />
                <h:commandLink value="Remove" action="#{reqBean.remove}"></h:commandLink><br />
            </h:form><br />
            <br/><br />
        </ui:repeat><br />

So in the result I'll have a list:
<br />
              text1 Remove(link)<br />
              text2 Remove(link)<br />
 

Unfortunettly in JSF2.0 you can't put form inside <ui:repeat> or <ui:fragment>. If you do this then the method in commandLink or commandButton won't be executed.
How can I solve this?

Thank you in advance