• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Back end validation problem .

 
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

 
S Majumder
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 349
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 80
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 349
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 80
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you should bind your component in backing bean.

 
reply
    Bookmark Topic Watch Topic
  • New Topic