cancel
Showing results for 
Search instead for 
Did you mean: 

CheckBoxGroup - Help Required

Former Member
0 Kudos

Hi All

I am new to SAP EP. I am trying to use CheckboxGroup in my View (in WebDynPro) application.

I have created a simple type and with the Enumeration with foll. value and desc

test1........abc

test2........def

test3.........xyz

Now I have created a context node and context attribute. The type of the Context attribute has been bound to the Simple type.

The checkboxgroup appears properly in the layout but when I run this application then it is not shown in the browser.

Please help

Regards

Nikhil Bansal

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

Select the cardinality for the context node as 1..n.

Regards

Suresh

Answers (2)

Answers (2)

Former Member
0 Kudos

The CheckBoxGroup does not work with value sets. Please read the <a href="https://media.sdn.sap.com/javadocs/NW04/SPS15/wd/com/sap/tc/webdynpro/clientserver/uielib/standard/api/IWDCheckBoxGroup.html">Javadoc</a>.

Armin

Former Member
0 Kudos

Hi Nikhil,

As I believe, you cant assign dictionary simpletype values to CheckBoxGroup from Dictionary because CheckBoxGroup works just like DropdownByIndex. So you have to Create a node and a value attribute for this.

Do the following to populate value in ur CheckBoxGroup.

1. Create a node(say CheckBox) of Cardinality 0..N and Create a value attribute of type String(Say Name. It is for displaying the description)

2. Assign 'Name' to texts property of CheckBoxGroup.

3.Include the following in wdDoInit()

IPrivate<ViewName>.ICheckBoxNode cNode=wdContext.nodeCheckBox();

IPrivate<ViewName>.ICheckBoxElement cEl;

for(int i=0;i<3;i++)

{

cEl=cNode.createCheckBoxElement();

cNode.addElement(cEl);

cEl.setName("TEXT"+i);

}

Hope this will be helpful

Fahad Hamsa