7 Replies Latest reply: Mar 6, 2013 6:55 AM by 993787 RSS

    How to Disable the radio button on page

    993787
      Hi All,
      We have a requirement to disable or hide a radio button on the standard Noritifacation Reassign page in R12.
      The page is /oracle/apps/fnd/wf/worklist/webui/NotifReassignPG.
      When I went to 'Personalize Page', I can see a 'messageComponentLayout', when I set the 'Rendered' property to 'false'.
      It is hiding out the complete Layout, but I just want to hide only one radio button from that layout.
      Can someone please help?

      Thanks,
      Dilip
        • 1. Re: How to Disable the radio button on page
          Sandeep Oracle
          Hi Dilip

          Yeah thats true. When you set render false for messageComponentLayout all the components below will be hidden.

          you will have to hide radiogroup to hide radiobuttons

          Thanks
          • 2. Re: How to Disable the radio button on page
            993787
            Thanks User44444.
            Ok, but there is no radio button item available on that page under 'Personalization'.
            Any advise on how to do that please?

            Thanks,
            Dilip
            • 3. Re: How to Disable the radio button on page
              keerthioaf
              Hi Dilip ,

              When you click on personalization link on oaf page , you can click on complete view to see all possible personalization
              that can be done .

              Expand the complete view and see if you can find the radio button that you wish to hide .


              If you are not able to find it, then you can try using controller extension ( CO extension )

              get the radio button bean in processRequest() of your controller class and hide it .

              Sharing the code for controller extension :

              {
              OAMessageRadioButtonBean testButton = (OAMessageRadioButtonBean)webBean.findChildRecursive("RadioBttn1");//RadioBttn1 is the ID of RadioButton
              testButton .setDisabled(true);

              }

              Regards ,
              Keerthi
              • 4. Re: How to Disable the radio button on page
                993787
                Thanks Keerthi.
                The radio button is not visible even after expanding the complete view.
                I guess, the only option now is to extend the controller as suggested by you.
                I was just hoping to do it using personalization only, but now I need to do the extension also.
                Thanks for your help.

                Regards.
                Dilip.
                • 5. Re: How to Disable the radio button on page
                  Sandeep Oracle
                  Hi Dilip,

                  As keerthi suggested if you are not able to see the Radio button through personalization , then only way to go about is Controller Extension.

                  Since you are not seeing it in personalization, believe the RadioButton might be added dynamically in controller. Still you can hide it via CO extension

                  RadioGroup creation reference

                  [http://oracleanil.blogspot.ca/2009/04/radio-group-event.html]

                  Thanks
                  Sandeep

                  Edited by: User44444 on Feb 28, 2013 4:17 PM
                  • 6. Re: How to Disable the radio button on page
                    993787
                    Thanks Sandeep and Keerthi,
                    I got that point but I am facing one more problem, as you said, its creating radio groups dynamically in CO.
                    Now I am trying to extend the CO and disable the radio butto, But I am getting Null Pointer exception, I guess, I am not able to get the proper handle to that radio button.
                    Can you please help?
                    Here is the Controller code where it created buttons dynamically.
                    ==========================================
                    OAViewObject localOAViewObject = (OAViewObject)localOAApplicationModule.findViewObject("ReassignTypeVO");
                    localOAViewObject.executeQuery();
                    OARow localOARow = null;
                    int j = localOAViewObject.getRowCount();
                    switch (i)
                    {
                    case 1:
                    localObject5 = null;

                    for (int k = 0; k < j; k++)
                    {
                    localOARow = (OARow)localOAViewObject.next();
                    localObject5 = (OAMessageRadioButtonBean)createWebBean(paramOAPageContext, "MESSAGE_RADIO_BUTTON");

                    ((OAMessageRadioButtonBean)localObject5).setText(paramOAPageContext, (String)localOARow.getAttribute("Meaning"));
                    ((OAMessageRadioButtonBean)localObject5).setValue(((Number)localOARow.getAttribute("LookupCode")).toString());
                    ((OAMessageRadioButtonBean)localObject5).setID("" + k);
                    ((OAMessageRadioButtonBean)localObject5).setName("NtfReassignType");
                    ((OAMessageRadioButtonBean)localObject5).setShortDesc((String)localOARow.getAttribute("Meaning"));
                    if (k == 0)
                    ((OAMessageRadioButtonBean)localObject5).setSelected(true);
                    ((OAMessageComponentLayoutBean)localObject1).addIndexedChild((UINode)localObject5);
                    }

                    }
                    ==========================================


                    Here is the code I have written, but its going into exception.
                    ===========================================
                    try
                    {
                    OAMessageRadioButtonBean testButton = (OAMessageRadioButtonBean)webBean.findChildRecursive("0");
                    testButton.setDisabled(true);
                    pageContext.writeDiagnostics(this,"expMsg: got the testButton",1);

                    //i tried with OAMessageRadioButtonBean testButton = (OAMessageRadioButtonBean)webBean.findChildRecursive("NtfReassignType");
                    // and
                    //OAMessageRadioButtonBean testButton = (OAMessageRadioButtonBean)webBean.findChildRecursive("MESSAGE_RADIO_BUTTON");
                    //but still its not working and going to exception block

                    }
                    catch (Exception exception)
                    {
                    throw new OAException("Error in NtfReassignFnCO button: "+exception, OAException.ERROR);
                    }
                    ===========================================

                    Please help.

                    Thanks,
                    Dilip
                    • 7. Re: How to Disable the radio button on page
                      993787
                      Hello People,
                      Any advice please?

                      Thanks,
                      Dilip