JSF starter question about form validation

I have a form and many input elements. I want certain fields to be checked, so I keep validateLenth etc. And I want some fields not to be checked. For example, I have contact information and address information on one page. I want to consider contact information as one group. Therefore, if some fields are invalid, they should not be sent, and the address information does not depend on the contact information. Thus, if the address information is corrected, it must be sent. I have one form only on the page, but two buttons, one for the address and one for the contact.

Simply put: - What is equivalent to checking the Asp.Net group in JSF?

+3
source share
2 answers

Use two different forms.

This sounds logical since you have two separate data sets that are transmitted using two different buttons.

If you can’t, take a look <t:subform>

Or switch to <rich:tabPanel>

+2
source

In our application we use <a4j:region>, which is an AjaxRegion component from the RichFaces component library . I have no experience with Asp.Net, but it looks like what you are looking for.

0
source

Source: https://habr.com/ru/post/1743132/


All Articles