Kawu
Kawu

Reputation: 14003

JSF, PrimeFaces, or RichFaces etc. components requiring h:form

How do you know which JSF, PrimeFaces, RichFaces etc. components actually require an h:form around them?

Does <h:link> generally require a form?

Does <p:dataTable> generally require a form?

Does <p:dataGrid> generally require a form?

...

How do you know without having to trial and error through "The button/link/text component needs to have a Form in its ancestry. Please add <h:form>." faces messages?

Upvotes: 1

Views: 265

Answers (1)

Makhiel
Makhiel

Reputation: 3884

Any component that you want to send data to the server needs a form around it. I.e. every inputBox, textArea, checkbox etc. If you only want to retrieve data from the server but not send anything back you don't need a form.

So <dataTable> doesn't generally require a form, but if you want to make it editable then you'd need a form.

Upvotes: 3

Related Questions