2 Replies Latest reply on Apr 1, 2010 8:58 AM by debashis_jboss_forum

    Dynamically enable or disable a component

      Hi,

       

      I need to know that how we can dynamically disable and enable a component (say dropdown) by selecting a paricular value of a radio button in JSF.

       

      Please help me as I'm new to this technology..

       

       

      Regards,

      Debashis

        • 1. Re: Dynamically enable or disable a component
          ilya_shaikovsky

          define disabled="#{viewBean.isTheComponentDisabled}" at component. And manage via ajax.

          • 2. Re: Dynamically enable or disable a component

            Thanks for your prompt reply. Partial code has been given below. What I need to do is by selecting any of the radio button I need to disable/enable a particular set of dropdowns. Could you please suggest how I can do with ajax?

             

             

             

            <h:selectOneRadio id="startServerRadio"
                                  value="#{fileSourceConfigBean.startServerMode}" >
                                       <f:selectItem itemValue="immediate" itemLabel="Start the transfer process immediately"/>
                                     <f:selectItem itemValue="schedule" itemLabel="Schedule transfer"/>                      
            </h:selectOneRadio>

             

             

             

            ~Debashis