on 03-23-2009 1:08 PM
Code for DropDownByIndex----
IWDAttributeInfo attrInfo = wdContext.nodeColor().getNodeInfo().getAttribute(IPrivateFirst_CompView.IColorElement.VALUESET);
ISimpleTypeModifiable msType = attrInfo.getModifiableSimpleType();
IModifiableSimpleValueSet valueSet = msType.getSVServices().getModifiableSimpleValueSet();
valueSet .put("","choose");
valueSet .put("1","black");
valueSet .put("2","red");
valueSet .put("3","blue");
Getting Runtime error in the line----
ISimpleTypeModifiable msType = attrInfo.getModifiableSimpleType();
I am unable to set different colors as DropDownList dybamically.
Please help me out.
Hi
You can simply perform these operation by using DropDownByKey and by design time given the enumeration value .
Best Regards
Satish Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hI ANINDITA,
you create Color node in controller context and mappepped into view context through open navigator modeler..
cardinality of color node id--1:1.
then valueset attribute binding into dropdownkey UI element as you did befi0re
this piece of code must be written component controler
you create one method and put below code on thet method...as dropKey
this method call from view
InVIEW
public wdDoinit(){
wdGet<your component contlloer name>.dropKey();
}
IN controller
public void dropKEY(){
IWDAttributeInfo attrInfo = wdContext.nodeColor().getNodeInfo().getAttribute(IPrivateFirst_CompView.IColorElement.VALUESET);
ISimpleTypeModifiable msType = attrInfo.getModifiableSimpleType();
IModifiableSimpleValueSet valueSet = msType.getSVServices().getModifiableSimpleValueSet();
valueSet .put("","choose");
valueSet .put("1","black");
valueSet .put("2","red");
now it works fine now
thanks
jati
valueSet .put("3","blue");
}
thanks
sudhira
Edited by: sudhir kumar on Mar 24, 2009 5:26 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I would propose to not repost the same question but reading the answers to the original question first.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>
> Code for DropDownByIndex----
>
> IWDAttributeInfo attrInfo = wdContext.nodeColor().getNodeInfo().getAttribute(IPrivateFirst_CompView.IColorElement.VALUESET);
> ISimpleTypeModifiable msType = attrInfo.getModifiableSimpleType();
> IModifiableSimpleValueSet valueSet = msType.getSVServices().getModifiableSimpleValueSet();
> valueSet .put("","choose");
> valueSet .put("1","black");
> valueSet .put("2","red");
> valueSet .put("3","blue");
>
> Getting Runtime error in the line----
>
> ISimpleTypeModifiable msType = attrInfo.getModifiableSimpleType();
>
> I am unable to set different colors as DropDownList dybamically.
>
> Please help me out.
Hi,
I guess you are confused between Key and Index
Please have a look at this document
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.