| Author |
Back end validation problem .
|
S Majumder
Ranch Hand
Joined: Jun 03, 2009
Posts: 243
|
|
Hi every body I am facing one back end validation problem in my JSF project .
I have one form there is one email text field , I am validating the email by back end validation.It is working fine in the application.I have two buttons also in the UI page.One is save and another is save later .
In the save button I want to validate the email field , but in the save later button I do not want to validate that email field.But when I am pressing the save later button the email field is also validating autometically .
I am not getting where I am doing mistake .
Here I am using the validemail as the validator.
Here is my code :
The JSF page :
I have defined the validator in the faces-config.xml.
The problem is , when I am clicking the save later button it is validating the email field also .I just want to ignore the validation for save later .
Please help me out from this problem.
regards,
S
|
 |
Moayad Abu Jaber
Ranch Hand
Joined: Jan 15, 2008
Posts: 80
|
|
Hi,
change immediate attribute for save later button to true. This mean the button will immediate jump from apply request value to render view without going to all JSF life cycle.
|
Best Regards,
Moayad Abu Jaber
SCJP 5.0, SCWCD 1.4, SCBCD 5.0
|
 |
S Majumder
Ranch Hand
Joined: Jun 03, 2009
Posts: 243
|
|
Hi thanks for your replly , but I have one dought if I am wrong please forgive me .When I change immediate attribute for save later button to true , the update model value phase will not run .So when I click the save and later button I will not get the email value .
regards,
S
|
 |
S Majumder
Ranch Hand
Joined: Jun 03, 2009
Posts: 243
|
|
Actually I need to save the email value (though the value is not correct) when user press the save and later button also.
|
 |
Moayad Abu Jaber
Ranch Hand
Joined: Jan 15, 2008
Posts: 80
|
|
your are right, In this case you can access the submitted value.
Here you need to make sure the data you submitted is valid through save later action.
|
 |
S Majumder
Ranch Hand
Joined: Jun 03, 2009
Posts: 243
|
|
Thnaks Moayad Abu Jaber for your valuable reply ,
could you please explain how could I take the uiComponent.getSubmittedValue() on my save latter button .
regards,
S
|
 |
Moayad Abu Jaber
Ranch Hand
Joined: Jan 15, 2008
Posts: 80
|
|
you should bind your component in backing bean.
|
 |
 |
|
|
subject: Back end validation problem .
|
|
|