cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing DropDownByKey value in Table

Former Member
0 Kudos

Hi everyone,

I have a table and inside it dropdownbykey.

I want to go with a loop on the table contents.

with the following command:

wdContext.nodeResearcherTable().getElementAt(i)...

I get the selected row of the table.

But, how do I get what the user chose?How do I get the selected key of the dropdownbykey in the table ?

Thanks you guys.

Ruthie.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I am sorry.

Make the singleton as false for the innernode.

Regards, Anilkumar

Answers (9)

Answers (9)

Former Member
0 Kudos

Thanks Anilkumar & Bharathwaj,

I did make the singleton as false for the innernode

and it worked!!!

Thanks so much.

Ruthie.

Former Member
0 Kudos

> Hi everyone,

>

> I have a table and inside it dropdownbykey.

> I want to go with a loop on the table contents.

> with the following command:

> wdContext.nodeResearcherTable().getElementAt(i)...

> I get the selected row of the table.

> But, how do I get what the user chose?How do I get

> the selected key of the dropdownbykey in the table ?

>

> Thanks you guys.

> Ruthie.

Hi Anilkumar,

The innderNode is defined as singleton in the context properties.

Any Suggestions ???

Thanks.

Ruthie.

Former Member
0 Kudos

Hi,

Make the innderNode as singleton in the context properties.

Regards, Anilkumar

Former Member
0 Kudos

> Hi everyone,

>

> I have a table and inside it dropdownbykey.

> I want to go with a loop on the table contents.

> with the following command:

> wdContext.nodeResearcherTable().getElementAt(i)...

> I get the selected row of the table.

> But, how do I get what the user chose?How do I get

> the selected key of the dropdownbykey in the table ?

>

> Thanks you guys.

> Ruthie.

Hi Anilkumar,

I don't have the option of :

ele.nodeInnerNode()...

but only ele.node()

Any Suggestions ???

Thanks.

Ruthie.

Former Member
0 Kudos

Hi,

Consider the example:

TopNode

--Attr1

--Attr2

InnerNode (Singleton)

--InnerAttr

You can use the following to iterate and reading the values.

for(int i=0;i<wdContext.nodeTopNode() .size();i++)

{

IPrivateTestAppView .ITopNodeElement ele=(IPrivateTestAppView .ITopNodeElement)wdContext.nodeTopNode() .getElementAt(i);;

ele.nodeInnerNode() .currentInnerNodeElement().getInnerAttr() ;

}

Regards, Anilkumar

Former Member
0 Kudos

> Hi everyone,

>

> I have a table and inside it dropdownbykey.

> I want to go with a loop on the table contents.

> with the following command:

> wdContext.nodeResearcherTable().getElementAt(i)...

> I get the selected row of the table.

> But, how do I get what the user chose?How do I get

> the selected key of the dropdownbykey in the table ?

>

> Thanks you guys.

> Ruthie.

Hi Guys,

I still have problems.

Anilkumar - I can't use currentTableNodeElement() because

I need to go over the intire table with a loop so I need

some condition which uses the iterator of the loop -

like - getElementAt(i)...

Bharathwaj - I wasn't clear enough. key isn't a name of

a field but I wanted to get the key of the dropdownbykey.

after:

wdContext.nodeResearcherTable().getElementAt(i)

I can use either getAttributeValue()

or getAttributeAsText().

Any suggestions ???

Thanks.

Ruthie.

Former Member
0 Kudos

Hi,

Make the singleton as false.

This makes the sub node available as a seperate instance for each instance of the parent node.

Now you can use

wdContext.nodeA().getAElementAt(i).nodeB().currentBElement().get<attribute which has been binded to the drop down>()

Former Member
0 Kudos

Hi ,

Try this.

Make the innernode (i.e) ropDownKeyNode as singleton.

wdContext.currentTableNodeElement() .nodeDropDownKeyNode() .currentDropNodeKeyElement().getNodeValue();

Regards, Anilkumar

Former Member
0 Kudos

Hi Anilkumar,

The dropdownkey is assigned to a value node:

- Table node

- Dropdownkey node

- value attribute (desired value)

In this case, what is the ("<<Attributename>>)???

I tried a few options and got exceptions.

Thanks.

Ruthie.

Former Member
0 Kudos

Hi,

If the dropdownkey is assigned to a attribute which is directly inside the node to which table is bound then you can do that by

wdContext.nodeResearcherTable().getElementAt(i).getAttributeValue("<<Attributename>>)

Regards, Anilkumar

Former Member
0 Kudos

Or simply...

wdContext.nodeResearcherTable().getElementAt(i).getselectedKey(); ...selectedKey was from ur previous post

Attribute name is the one which you have binded with the selectedKey property of the dropdown key ...

Message was edited by: Bharathwaj R