4/27/2011

The button/link/text component needs to have a Form in its ancestry. Please add h:form

If you get an error message like the one above and you are using Mojarra 2.1.1 then it might be that a mojarra brought you into trouble.


Try to create an icefaces page and use a menuItem like this:

<ice:form>

<ice:menuBar value="Bar" orientation="Vertical">
<ice:menuItem value="Iten">
<ice:menuItem value="TestItem" actionListener="#{bean.click}" />
</ice:menuItem>
</ice:form>


If you get an exception with the message "The button/link/text component needs to have a Form in its ancestry. Please add h:form", try to replace MOjarra 2.1.1 with the older 2.0.4 version. Then it should work.



If you like this post it would be very nice, if you could click on some of the google ads you see on the right side. It helps me run this block and motivates me ;)

If you have any questions, feel free to leave a comment.