cancel
Showing results for 
Search instead for 
Did you mean: 

how to use radiobutton group by index

Former Member
0 Kudos

how to use radiobutton group by index

Accepted Solutions (1)

Accepted Solutions (1)

former_member197348
Active Contributor
0 Kudos

Hello Deepika,

Welcome to SDN!

If you want to use radiobutton group by index and use R/3 data. Populate a node from RFC with two (key-value) attributes(you can also use single attribute) and bind this attribute to texts property of the radiobutton group by index. For this you need to use the node inside Output node.

If you want to use local data, create a value node with cardinality 0....n; with two (key-value) attributes(you can also use single attribute) and bind this attribute to texts property of the radiobutton group by index. You need to add elements to this node programmatically.

Regards,

Siva

Answers (3)

Answers (3)

Former Member
0 Kudos

Firsly you add the Ui element into your View as

RadioButtonGroupbyIndex ..create ValueNode and ValueAttribute in view

Context.

as cardinality--0:N

SupposeValueNodeWEEK

ValueAttribute--Day

just put some code into

public void wdDoInit()

{

//@

String[] day = new String []{"Mon","Tue","Wed","Thu","fri","Sat","Sun"};

List dayList=new ArrayList();

for(int i=0;i<day .length;i++)

{

//In mY case view name is CompView

IPrivateCompView.IWEEKElement ele=WdContext.CreateWEEKElement();

ele.setDay(day <i>);

dayList.add(ele);

}

WdContext.nodeWEEK().bind(dayList);

}

Now value are set into your node...

Then go to your Radiobuttonbygrp Rightclickchhose Propery-

then set ValueNode as WEEK.day set into the TEXT propery of

radiogrpbyinedx

now Built and run it ..it shows your

Edited by: sudhir kumar on Mar 17, 2009 11:00 AM

Former Member
0 Kudos

Hi dear,

Firsly you add the Ui element as RadioButtonGroupbyIndex into your View ..create ValueNode and ValueAttribute in view Context or component conext and mapped from component to view...as you do before...

as cardinality--0:N

SupposeValueNodeWEEK

ValueAttribute--Day

just put some code into

public void wdDoInit()

{

//@

String[] day = new String [] {"Mon","Tue","Wed","Thu","fri","Sat","Sun"};

List dayList=new ArrayList();

for(int i=0;i<day .length;i++)

{

//In mY case view name is CompView

IPrivateCompView.IWEEKElement ele=WdContext.createWEEKElement();

ele.setDay(day <i>);

dayList.add(ele);

}

WdContext.nodeWEEK().bind(dayList);

}

Now value are set into your node...

Then go to your Radiobuttonbygrp Rightclickchhose Propery-

then set ValueNode as WEEK.day set into the TEXT propery of radiogrpbyinedx

now Built and run it ..it shows your views

Thx,

Sjati..

Former Member
0 Kudos
Former Member
0 Kudos

Hi,

It's very simple follow below steps.

1. Create a dictionary simple type (example Male,Female) .

2. Create context element and set the property of type to the dictionary simple type.

3. Place 'RadioButtonGroupByIndex' on view layout.

4. set property of setSelectedkey to context element of type dictionary.

5. run and check application.

let me know if there is problem.

Thanks and regards

Haribabu.