Radio Button GroupBy Key
I need help using the RadioButtonGroupBykey.
I am unable to use it in the application.
I have taken a radiobuttongroupbykey and used this code in initmethod,But i get error (500 Internal Server Error Failed to process request. Please contact your system administrator. ).
I have taken an attribute declared in context as selected key .
The following code wriiten in init Method
ISimpleTypeModifiable myType=wdThis.wdGetAPI().getContext().getModifiableTypeOf("Radio1");
IModifiableSimpleValueSet values=myType.getSVServices().getModifiableSimpleValueSet();
values.put("0","January");
values.put("1","February");
values.put("2","March");
values.put("3","April");
wdContext.currentContextElement().setRadio1("1");
Former Member replied
Hi,
Here monthName is the context attribute
wdInit() code
ISimpleTypeModifiable myType=wdThis.wdGetAPI().getContext().getModifiableTypeOf("monthName");
// Set allowed values for this data type
IModifiableSimpleValueSet values=myType.getSVServices().getModifiableSimpleValueSet();
values.put("0","January");
values.put("1","February");
values.put("2","March");
values.put("3","April");
values.put("4","May");
values.put("5","June");
values.put("6","July");
values.put("7","August");
wdContext.currentContextElement().setMonthName("1");
wdModifyView()
if (firstTime)
{
IWDRadioButtonGroupByKey radioButtonGroup =(IWDRadioButtonGroupByKey)
view.createElement(IWDRadioButtonGroupByKey.class, "MyRadioButtonGroupByKey");
radioButtonGroup.bindSelectedKey("monthName");
radioButtonGroup.setColCount(3);
IWDTransparentContainer container=(IWDTransparentContainer)
view.getElement("RootUIElementContainer");
container.addChild(radioButtonGroup);
}
regards,
Rajeev
Message was edited by: Rajeev Ranjan