on 08-22-2007 2:16 AM
Hi,
I have this layout:
A Table consist of -
Column 1 : Name (inputfield)
Column 2 : Country (dropdownbyindex)
2 Button :
Add - To add new row
Delete - To delete selected row
I have create a node (Resources) with 2 value attribute inside the node at the Context, name with type String & country with type reference to Dictonary simple type string (with a list of country).
When Add button is click, the table will have new row added with a preloaded list of country.
Is it possible to do that? How am i suppose to do?
Rgds,
Rayden
Hi Rayden,
Thanx for trying out my suggestion.
As the dropdown is empty, will you please try replacing the dropdownbyIndex UI Element with DropdownbyKey UI Element?
This should solve your issue.
Regards,
Rekha Malavathu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rayden,
Dropdown by key is a UI element which is having key-value pair. You can put this key- value using the SVS service or from the dictionary simple type.
One context variable(not a node) is sufficient to store all the values for this.
If u r using dictionary values, assign the dictionary type to this context variable.
For SVS, load the values to this context variable using the code.
Then bind this context variable to DrodownbyKey's Value.
For a dropdown by key, after loading the values( either from dictionary or by SVS ) , if you get the value, you will be getting the key for the corresponding value.
In the same way, if u set a key present in dropdown, it will automatically display the corresponding value.
Dropdown by Index gets the value from node.There is no key-value pair. We can load the values to it in the same way we load values to a table.(ie. By from a context node)
Regards,
Rekha Malavathu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
use the code to add a new row in the context node.
IPrivate<viewname>.I<contextnode>Element elem = wdContext.create<contextnode>Element();
wdContext.node<contextnode>.addElement( elem );
To populate values in the drop down you can write the code in wdDoInit() as
IWDAttributeInfo attributeInfo = wdContext.
node<NodeName>().
getNodeInfo().
getAttribute("<attr_name>");
IModifiableSimpleValueSet valueSet = attributeInfo.
getModifiableSimpleType().
getSVServices().
getModifiableSimpleValueSet();
valueSet.put("IN", "India");
valueSet.put("US", "America");
.
.
.
Regards
Abhimanyu L
Message was edited by:
Abhimanyu Lagishetti
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rayden,
Create an action for the Add Button.
Assumption:
My View Name:TestAWSCV
My Node Name:Emp
My Node Attr Name:Country
My Node Attr Name:Name
Write the following code in that method:
IPrivateTestAWSCV.IEmpNode node = wdContext.nodeEmp();
IPrivateTestAWSCV.IEmpElement ele = node.createEmpElement();
node.addElement(ele);
Hope this helps.
Regards,
Rekha Malavathu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
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.