cancel
Showing results for 
Search instead for 
Did you mean: 

How do i simulate RadioButton click

Former Member
0 Kudos

Hi all,

I have a group of radio buttons on screen (JSPDynPage) and i wish to raise an event each time one of them is selected.

The radiobuttongroup has no onclick method nor the radiobuttons themselves.

Aviad

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Aviad,

radioButtonGroup does have a onClick method, where you can specify the eventing method.

Which version are you on??

Regards, Akhilesh

Former Member
0 Kudos

The portal version i am working on is ep5.5.1

when i set the method onClick for radiobuttongroup i get the following error:

"com.sapportals.portal.prt.component.PortalComponentException: Attribute 'onClick' not found in tag library 'HTMLB' for the tag radioButtonGroup".

Former Member
0 Kudos

Hi Aviad,

EP5 is too too old..Sorry i have no idea about EP5 radio button. I was talking about radioButtonGroup in EP6.

Sorry could not be of much help.

Regards, Akhilesh

Former Member
0 Kudos

Don't know whether this will be useful or not, just look into this,

Former Member
0 Kudos

Hi Aviad,

Try this if you dont have attribute in taglib.


<%@ page import="com.sapportals.htmlb.RadioButtonGroup"

<hbj:radioButtonGroup
         id="Group"
         columnCount="1"
          selection="1" >

          <hbj:radioButton
               id="First"
               text="First Button"      
               key = "one" />
           
               <hbj:radioButton
               id="Second"
               text="Second Button"      
               key = "two" />
 <%
  Group.setOnClick("radioClicked");
%>

    </hbj:radioButtonGroup>

Write the method in you Main Java Class


public void radioClicked(Event event) throws PageException {

   RadioButtonGroup rbg = (RadioButtonGroup)
                   getComponentByName("Group");
String sel = rbg.getSelection();

}

Hope this helps.

Thanks,

Praveen

PS. Dont forget to award points if useful/solved

Former Member
0 Kudos

It works now.

Thanks!

Former Member
0 Kudos

Hi Aviad,

Good to know that the solution works for you? From now on When ever you post an issue mark it as question so that you can award points.

Thanks,

Praveen

Former Member
0 Kudos

Hi Praveen,

I did mark it as question, but i have some sort of problem that being checked right now by the sdn team.

Thank you for the solution,

Aviad

Former Member
0 Kudos

Hi Aviad,

I think Mark has converted your earlier post to question that is how you were able to allot points for the earlier post. I dont know whether SDN has taken care for this post?

Thanks,

Praveen