Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

jsf

richfaces

I'm using JSF and RichFaces 4. I have a huge form which I have to split into several panels. But when I do, I get the warning.

For example this makes it display the warning:

<h:form>
    <rich:tabPanel>
        <rich:tab>
            //Form elements go here
        </rich:tab>
    </rich:tabPanel>
</h:form>

How do I avoid it?

like image 281
Carlos Vergara Avatar asked Jan 16 '23 21:01

Carlos Vergara


1 Answers

First of all, this warning will only appear when javax.faces.PROJECT_STAGE is set to Development. So if everything works fine in spite of the warning, then you can safely ignore it. It won't appear in Production stage.

As to the false warning itself, in older Mojarra versions there was a bug which caused that. This bug has been reported as issue 2147 and is been fixed since Mojarra 2.1.3 which was released about one year ago (it's currently already at 2.1.11). So just upgrading Mojarra to at least 2.1.3 should get you rid of this false warning.

like image 195
BalusC Avatar answered Apr 28 '23 17:04

BalusC