|
I haven't worked with client side validation but the
problem that you mentioned can be solved using sandbox subForm or trinidad
subform or by using the OptionalValidator listed in the MyFaces Wiki. I have
used sandbox subForm to solve this problem with server side
validation.
-- Kannan.
Hi All,
MyForm:
Mandatory
fields on the form: 1. Last
Name 2. First Name 3. Gender 4. email
There is a section on the
page where the user needs to provide address information. Mandatory fields in
that section are: 1. address type 2. address line 1 3. state 4.
zip 5. city
Address section has the following buttons - "Add Address",
"Reset" "Delete"
Page level buttons are: "Proceed", "Cancel"
When
the user has entered all the information then the user will click on the proceed
button. However, the user can first enter the address information and click "Add
address" and then enter a list of other addresses similary. The problem is that
when the user clicks "Add address" form is submitted and all the fields which
are assigned a validator are validated. So even if the "proceed" button is not
clicked fields like "last name", "first name" etc will be validated and will
therefore throw error messages on the screen.
I want to partially
validate a page based on which button is clicked. How can you do that with the
client side validators that you have created.
Currently I am using struts client validator with
Myfaces but this framework does not solve the above mentioned
problem.
Googling a bit I found the
following:
- http://shale.apache.org/shale-validator/index.html
- http://jsf-comp.sourceforge.net/components/clientvalidators/index.html
I am wondering will any one them solve the problem that
I am facing above.
~madhav
**************** CAUTION -
Disclaimer ***************** This e-mail contains PRIVILEGED AND
CONFIDENTIAL INFORMATION intended solely for the use of the addressee(s).
If you are not the intended recipient, please notify the sender by e-mail
and delete the original message. Further, you are not to copy, disclose,
or distribute this e-mail or its contents to any other person and any such
actions are unlawful. This e-mail may contain viruses. Infosys has taken
every reasonable precaution to minimize this risk, but is not liable for
any damage you may sustain as a result of any virus in this e-mail. You
should carry out your own virus checks before opening the e-mail or
attachment. Infosys reserves the right to monitor and review the content
of all messages sent to or from this e-mail address. Messages sent to or
from this e-mail address may be stored on the Infosys e-mail
system. ***INFOSYS******** End of Disclaimer
********INFOSYS***
|
|