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

  • Home
  • SEARCH
  • 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 8368287
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T13:21:06+00:00 2026-06-09T13:21:06+00:00

I was usinig JSF 2.0, richfaces, and a4j in my development. I have a

  • 0

I was usinig JSF 2.0, richfaces, and a4j in my development. I have a radio button group that consist of 3 radio button, and there is a inputtextbox next to each of the radio button, just like the layout shown below:

radio button A | input textbox A
radio button B | input textbox B
radio button C | input textbox C

Whenever there is a focus on textbox, can this be done using ajax to update on radio button selection? E.g. when focus on input textbox B, then radio button B will be selected. May I know how this can be done?

  • 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-06-09T13:21:07+00:00Added an answer on June 9, 2026 at 1:21 pm

    There are many ways to this, first using plain javascript and using ajax on jsf or richfaces components.
    You can try using a4j:ajax nested inside your h:inputText and fire it whenever there is focus on your textbox.

    <h:selectOneRadio value="#{bean.value}" id="radio" />
    <h:inputText id="input" value="#{bean.textValue}" >
        <a4j:ajax event="onfocus" render="radio" action="{bean.setRadioSelected}"/>
    </h:inputText>
    

    On the action method set the value of selected radio to true.
    Hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using JSF 1.2 with Richfaces and Facelets. I have an application with many
Using Richfaces 3.3.0GA, jsf 1.2_14 and facelets. I have a richfaces ModalPanel with an
I'd like to be able to make an Ajax call using JSF/Seam/RichFaces and have
We're developing a Java web app that utilizes JSF (Richfaces through Seam) for its
This should be a very simple question. I have a richfaces tree that is
I'm using JSF 2.1 with RichFaces 4 and I have a form with a
Explanation: I have a JSF command link that sets a member in the backing
I'm using JSF and RichFaces 4. I have a huge form which I have
I have an enterprise application written in JAVA with JSF (using RichFaces 3.3). Currently
Using jsf 1.2, hibernate, richfaces 3.3.0GA and facelets. I have this code in my

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.