on 07-16-2007 2:25 PM
I am having a problem when I fill more than one drop down list (using DropDownByIndex). What happens is I have 2 that I want to fill. It seems to be leaving a big space in each one where the values for the other one would be filled in. So for example, the first one has a big space at the end, and the second one has a big space at the beginning.
Here is the logic I am using to fill:
String firstList[]={"One","Two","Three"};
String secondList[]={"Four","Five","Six"};
for(int i=0;i<firstList.length;i++){
IPrivateBlah.IDataElement ele=wdContext.createDataElement();
ele.setFirstList(firstList<i>);
wdContext.nodeData().addElement(ele);
}
for(int i=0;i<secondList.length;i++){
IPrivateBlah.IDataElement ele=wdContext.createDataElement();
ele.setSecondList(secondList<i>);
wdContext.nodeData().addElement(ele);
}
Any ideas why this is happening?
What dou you mean with "big space"? Do you mean that there appears an empty list entry (which allows to clear the selection)?
I don't understand your code either: You have two dropdown lists but you are filling all entries into one context node. How is this supposed to work?
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok, here a short tutorial. There are two kinds of dropdown lists: *ByIndex and ByKey.
To fill a DDByKey, create a DDIC type using the type editor and add enumeration values (and descriptions)
Example:
Create DDIC type "ShirtSize" with enum values ("S", "Small"), ("M", "Medium"), ("L", "Large")
Create context attribute "selectedSize" of type "ShirtSize"
Data binding: DropDownByKey.selectedKey -> selectedSize
Now, the dropdown list will display "Small", "Medium", "Large" and if you select for example "Large", the context attribute "selectedSize" contains value "L".
DDByIndex works differently. I think your problem is solved more easily with DDByKey.
Armin
Hi Sarah..
Try to check the cardinality values...May be this , U can get these type of events..
URs GS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.