on 12-15-2008 9:01 AM
Hi,
What is the difference between ISimpleTypeModifiable and ISimpleType? When to use which one ?
I am getting the exception "java.lang.UnsupportedOperationException" on using ISimpleType.
Thanks & Regards,
Neeraj
Hi Neeraj,
When you map the attributes between two controllers and try to access them then IModifiableSimpleType will not work, but ISimpleType will work.
Suppose Radio you have taken as the Simple Type created in Dictionary--> SimpleType
String radio1 = "";
String radio2 = "";
// Attribute Info for Radio
IWDAttributeInfo attributeInfo = wdContext.getNodeInfo().getAttribute(wdContext.currentContextElement().RADIO);
// Get Reference to ISimpleType for the passed attributeInfo object
ISimpleTypeModifiable taskType1 = attributeInfo.getModifiableSimpleType();
ISimpleValueSet smset1 = taskType1.getSVServices().getModifiableSimpleValueSet();
radio1 = smset1.getText(wdContext.currentContextElement().getRadio());
// ISimpleType taskType2 = attributeInfo.getSimpleType();
// ISimpleValueSet smset2 = taskType2.getSVServices().getValues();
// radio2 = smset2.getText(wdContext.currentContextElement().getRadio());
wdComponentAPI.getMessageManager().reportSuccess("radio1--->"+radio1);
// wdComponentAPI.getMessageManager().reportSuccess("radio2--->"+radio2);
radio1 will give you the value in case of not mapping
radio2 will give you the value in case of mapping
Thanks
Deep
Edited by: Deep Kundra on Dec 15, 2008 10:33 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
when u use IModifiable simple valueset you shoud not map the attribute of that particular input field where u need to get the value help to any other attribute in other views or controller.This is because when we use IModifiable and do mapping it wont work.Thats not the case with ISimple type so better check if you have done any mapping of that particular field in context.
Check out this pdf it has all the details
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The public interface ISimpleTypeModifiable extends ISimpleType. i.e, it is derived from the interface ISimpleType.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
71 | |
26 | |
10 | |
9 | |
7 | |
6 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.