• 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

how to skip validation phase only

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

My functionality is user creation. The fields are user name and role.
I have an input text box to enter role name and a command button to search roles using the role name. My form has another input text box to enter user name and it is a required field while creating user. But whenever I am trying to search role I am forced to enter username as it is a required field.

My code is

I want to skip the required validation. Whenever I am using immediate=”true” for the search button. The user role search criterion that is role name is not able to apply.

Please help me

Thank in Advance
Athira
 
Saloon Keeper
Posts: 28070
198
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Validation is part of the basic contract of JSF. It doesn't ever want you to be capable of setting the backing bean to a corrupt state (mixed updates).

However, I do this stuff all the time using the "rendered" attribute and a pair of controls. I only render the inputText control when input is required. Otherwise I display it by rendering an outputText control (assuming I want it displayed).
 
This tiny ad is wafer thin:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic