on 03-16-2008 10:09 AM
HI,
I have created a value node XXX(static) and a simpletype(to display in the dropdown values say 1 to 10) .3 more dynamic value attributes(V1,V2,V3) are created for this value node XXX.I have created 3 Dropdown UI Elements dynamically and bind these Dropdown UI elements with these value attributes as well as with the sympletype.
The three dropdown UI elements as well as values are coming perfect.
I want to set the default values for these dropdown i,e
1st dropdown should display 2 (by default)
2nd dropdown should display 5(by default)
3rd dropdown should display 10 (by default).
Default valued are different for all the Dropdowns.
*.I tried with this options
wdContext.nodeXXX().setLeadSelection(0).
wdContext.nodeXXX().setLeadSelection(-1).
These options are not working.
My value node XXX is static,but my value attributes for this node XXX are dynamic.The 3 Dropdown UI Elements are also *Dynamic
Please suggest me.Thanks in advance.
Regards
-Sandip
HI Armin,
I did the same thing.
The dropdown values are still showing Blank.
Ideally it should show with some values in the dropdown.
Do I need to change the cardinality of the static node XXX and the select property of this node?
The current cardinality of the node is -->0..n
select property -->0..1
please suggest.Thanks in advance
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Armin/Manoj/Pinki
Thanks for giving accurate answer.
Marks has already given to u.
Thanks to u all.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
You can use the following code in the WddoModifyView:
//creating dropdownkey
IWDDropDownByKey key = (IWDDropDownByKey)view.createElement(IWDDropDownByKey.class,"Dropkey");
key.bindSelectedKey("DropKey.Key");
key.setWidth("60");
key.setVisible(WDVisibility.VISIBLE);
// Here you are setting the default to the second element.
key.setSelectedKey("2");
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To select a value in the drop-down list, you just have to set the context attribute value (assuming the "selectedKey" property is bound to that attribute).
wdContext.nodeXXX().currentXXXElement().setAttributeValue("attributeName", value)
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.