on 04-25-2006 7:29 AM
Hi Friends,
I am working on the webdynpro programming and now i got a problem in checkboxgroup.
I need to know whether a checkbox element in the checkboxgroup is checked or not.
Based on that i need to dispaly the text of that checkbox element.
I got the solution to display the text of the checkbox element.But i was unable to place the condition whether that particular checkbox element is checked or not.
Could you people look in to this problem and hope bright answer from you.
Hi Sandeep,
There is a <b>onToggle</b> event which you can catch. So you can set what function you want to create on the selection of the checkBox.
It returns a boolean value. Initial value is set to False. So if the checkbox is checked it returns true. you can check for this boolean value in a <i>if()</i>, function and perform whatever function you want to do here in this loop.
I hope this helps you.
Regards
Pravesh
PS: Kindly consider rewarding points if helpful and solved.
<i>Message was edited by: Pravesh Verma</i>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The selection of a CheckBoxGroup is the selection of the bound context node.
Take a look at the IWDNode API to determine the current selection of a context node.
https://media.sdn.sap.com/javadocs/NW04/SPS15/wd/com/sap/tc/webdynpro/progmodel/api/IWDNode.html
Especially look at the methods getLeadSelection() and isMultiSelected(index)
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sandeep,
You can use this code to get all the checked element in CheckBoxGroup :
for(int i=0;i<wdContext.node<node name>().size();i++)
{
if(wdContext.node<node name>().().isSelected(i))
{
wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess(""+wdContext.node<node name>().().get<node name>().().ElementAt(i).get<attribute name>());
}
}
put this code in action or wdModifyView()
Regards,
Rajeev
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.