File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes Back end validation problem . Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Back end validation problem ." Watch "Back end validation problem ." New topic
Author

Back end validation problem .

S Majumder
Ranch Hand

Joined: Jun 03, 2009
Posts: 244
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: 244
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: 244
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: 244
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.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Back end validation problem .
 
Similar Threads
Validation Problem ... again!
Ajax call, backing bean and validation
Validation skip
Ignore server side validation
File browser button