Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7623855
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T04:48:41+00:00 2026-05-31T04:48:41+00:00

As I was experimenting with JSF 2.0 , i came across a scenario like

  • 0

As I was experimenting with JSF 2.0 , i came across a scenario like this .

I have two text fields – based on input of first field an ajax call is fired using

<f:ajax ... />

After the response is back I am re rendering the second text field ..but i want to disable the second text field based on some server side validation of first field value.

I don’t want to set the disabled using style based on a third property which is being set in the bean after validation.

Is there any alternative ways..

thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T04:48:43+00:00Added an answer on May 31, 2026 at 4:48 am

    Bind the first input component to the view by binding attribute and use UIInput#isValid() in the disabled attribute of the second input field. It will return false if validation has failed on the given input component.

    <h:inputText binding="#{input1}" value="#{bean.input1}">
        <f:validator validatorId="yourValidator" />
        <f:ajax event="blur" render="input2" />
    </h:inputText>
    <h:inputText id="input2" value="#{bean.input2}" disabled="#{!input1.valid}" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Experimenting with Cocos2D collection detection and have some questions. First, some background: This is
I experimenting with Flex Styling, and I came across an alignment issue. I have
I am experimenting with Dart. I have created an on click event like so:
I am currently experimenting with various input controls and have stumbled upon SneakyInput, which
Just experimenting with different inheritance techniques in JS, and came across something mildly discomfiting
I've been experimenting with the standard python math module and have come across some
While experimenting a bit with C++ templates I managed to produce this simple code,
While experimenting with iPhone app development, we have several AppIDs which should be deleted
I am experimenting with Ruby and Rails on OS X, using the XCode text
been experimenting with unordered list UL and i have seem varios examples of using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.