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 7897181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T08:05:48+00:00 2026-06-03T08:05:48+00:00

Here is my html code. <table > <tr> <th rowspan=3> <h:selectOneRadio layout=pageDirection onClick=alert(‘selam’) id=selectOneRadio>

  • 0

Here is my html code.

        <table >
            <tr>
                <th rowspan="3">
                        <h:selectOneRadio layout="pageDirection"
                        onClick="alert('selam')" id="selectOneRadio">
                        <f:selectItem itemValue="Categori" itemLabel="Radio 1" />
                        <f:selectItem itemValue="Service" itemLabel="Radio 2" />
                        <f:selectItem itemValue="Follower" itemLabel="Radio 3" />
                    </h:selectOneRadio>
                </th>
                <td>
                <h:inputText value="inputText 1" />
                </td>
            </tr>
            <tr>
                <td>
                <h:inputText value="inputText 2" />
                </td>
            </tr>
            <tr>
                <td>
                <h:inputText value="inputText 3" />
                </td>
            </tr>               

        </table>

I want to Select One of the radioButtons. When I click one of them I want the inputText be disabled.

For example:

  • İf I click Radio 1 , then input Text 1 will be disabled.
  • İf I click Radio 2 , then input Text 2 will be disabled.
  • İf I click Radio 3 , then input Text 3 will be disabled.

How can I do this?

  • 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-03T08:05:50+00:00Added an answer on June 3, 2026 at 8:05 am

    Bind the radio button value to a managed bean property and use <f:ajax> to send an ajax request and update parts of the view when the radio button changes and use disabled attribute to disable the <h:inputText> depending on the selected radio button item value.

    E.g.

    <h:panelGroup id="inputs">
        <table>
            <tr>
                <th rowspan="3">
                    <h:selectOneRadio value="#{bean.radio}" layout="pageDirection">
                        <f:selectItem itemValue="Categori" itemLabel="Radio 1" />
                        <f:selectItem itemValue="Service" itemLabel="Radio 2" />
                        <f:selectItem itemValue="Follower" itemLabel="Radio 3" />
                        <f:ajax render="inputs" />
                    </h:selectOneRadio>
                </th>
                <td>
                    <h:inputText value="#{bean.input1}" disabled="#{bean.radio == 'Categori'}" />
                </td>
            </tr>
            <tr>
                <td>
                    <h:inputText value="#{bean.input2}" disabled="#{bean.radio == 'Service'}" />
                </td>
            </tr>
            <tr>
                <td>
                    <h:inputText value="#{bean.input3}" disabled="#{bean.radio == 'Follower'}" />
                </td>
            </tr>               
        </table>
    </h:panelGroup>
    

    with

    @ManagedBean
    @ViewScoped
    public class Bean {
    
        private String radio;
        private String input1;
        private String input2;
        private String input3;
    
        // ...
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's my HTML code. <table cellspacing=0 class=assets_table> <tbody> <tr class=table_header><td>ID</td><td>Title</td><td>Regarding</td><td>Status</td><td>Date</td></tr> <tr><td>9</td><td>Testing</td><td>hijacked account</td><td></td><td> 4 Jan,
Here is my HTML Code. <table> <tr> <td> <select class=dropdown> <option value=>Select answer</option> <option
Here is my HTML code <span class=xxt style=>Hide Me</span> <div><br/></div> <div></div> <span style=> <table>
Here is my html code: <div id=notes> <table class=noborder> <tr><th class=noborder><span>notes</span></th></tr> <tr><td> <p id=notes_p>
I want merge the all td where classname='blahblah' Here is my Html Code: <table><tbody><tr>
not sure why I find this so difficult. Here is the html code: <tr>
Here is a part of my html code (video urls marked with a django-template
Here is an old add in to quickly comment out HTML code. Maybe I
I have this html code that i want to edit with jQuery. Here is
This is my html Code: <input type=checkbox name=test id=test /> Here i want to

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.