cancel
Showing results for 
Search instead for 
Did you mean: 

radio button

Former Member
0 Kudos

hi,

i am not able to understand this can u please explain me.

String buskeyname1 = IPrivateView_defects.IContextElement.BUSINESS;

i used it here for radio button

String buskey1 = wdContext.currentContextElement().getBusiness();

String buskeyname1 = IPrivateView_defects.IContextElement.BUSINESS;

IWDAttributeInfo buskeyinfo1 = wdThis.wdGetContext().getNodeInfo().getAttribute(buskeyname1);

ISimpleType bussimple1 = buskeyinfo1.getSimpleType();

ISimpleValueSet busvalueset1 = bussimple1.getSVServices().getValues();

if(null!=buskey1)

{

buskey_text1 = busvalueset1.getText(buskey1);

wdComponentAPI.getMessageManager().reportSuccess(buskey_text1);

}

thanks

balu

Accepted Solutions (0)

Answers (2)

Answers (2)

snehal_kendre
Active Contributor
0 Kudos

HI Balu,

This code is used to change behaviour of your context as simpletype.

Here bussiness is your context.

1. get the value from context into buskey1

String buskey1 = wdContext.currentContextElement().getBusiness();

2. get your context name in buskeyname1

String buskeyname1 = IPrivateView_defects.IContextElement.BUSINESS;

3.get the attribute information by supplying attribute name i.e. buskeyname1

IWDAttributeInfo buskeyinfo1 = wdThis.wdGetContext().getNodeInfo().getAttribute(buskeyname1);

4. just create a new simple type using your context.(as buskeyinfo1 is attribute info of your context)

ISimpleType bussimple1 = buskeyinfo1.getSimpleType();

5. Put the values in simple value set.

ISimpleValueSet busvalueset1 = bussimple1.getSVServices().getValues();

6. now you have a single context which acts as simple type for two values.

if(null!=buskey1)

{

buskey_text1 = busvalueset1.getText(buskey1);

wdComponentAPI.getMessageManager().reportSuccess(buskey_text1);

}

Former Member
0 Kudos

I don't understand this code either. Please tell what you want to achieve.

Armin