tags:

views:

173

answers:

2

Hello, I am having a form and many input elements in that. I want certain fields to be validated, so i keep validateLenth etc on those. And i want some fields to not be validated. For example, i have contact information and address information both on the same page. I want to treat contact information as one group. So if some fields are invalid they should not be submitted and address information to be independent of contact information. Thus, if address information is corrected it should be submitted. I have one form only on the page but two buttons, one for address and one for contact.

Simply put :- What is the equivalent of validationGroup of Asp.Net in JSF?

+2  A: 

Use two different forms.

This sounds logical since you have two separate sets of data that are submitted via two different buttons.

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

Or switch to <rich:tabPanel>

Bozho
Hi Bozho,No i can't use two different forms. Because i am using primefaces component and it needs to be inside form.Basically, i have a form and in that i have tab control (primefaces tab control). The tabs in tab control are independent of each other. And unfortunately, i don't think i can nest the forms. Do we have any other option?
Ankit Rathod
Does it need to be in a form? `<rich:tabPanel>` for example doesn't need to be.
Bozho
yes but this needs to be. I tried it. Is it possible with validateBean?
Ankit Rathod
see my update ;)
Bozho
A: 

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

Grzegorz Oledzki