cancel
Showing results for 
Search instead for 
Did you mean: 

how to bind a dropdownkey to a table

Former Member
0 Kudos

hi

i want to bind the dropdown key ui in a table

my context structure goes like this

value node of table with attr1 and attr2

under table value node another value node with value attribute of dropdown key

thanks and regards

shravan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi,

you are not able to view any drop down because you are not creating any elements on the table node.

please try thiss following piece of code in your doInit() then then try to execute.

IPrivateTabView.ITablNode tn = wdContext.nodeTabl();

IPrivateTabView.ITablElement te = tn.createTablElement();

te.setFirst("one ");

te.setSecond("one one");

tn.addElement(te);

IPrivateTabView.ITablElement te1 = tn.createTablElement();

te1.setFirst("two ");

te1.setSecond("two two");

tn.addElement(te1);

regards,

rahul.

Answers (10)

Answers (10)

Former Member
0 Kudos

rahul_thunoli@satyam.com

Former Member
0 Kudos

Hi Sravan,

Please ensure that you have done the following steps:

1) In Local dictionary, create a simple type. Go to the enumeration tab, enter the key and the value for as many entries as you like.

2) In the context node that you have created for the table, create an attribute and set it's type to the newly created simple type. (Local dictionary -> your type's package name -> your type)

3) In the UI element table (hope you are using the apply template or create binding for table),set the datasource as the table node. Go to the column displaying the simple type, delete the text view of the column. Right click on the column, create a new cell editor. Select Dropdown by key. In the properties of the key, set the 'selected key' of the dropdown to the simpletype attribute (table_node->simpletype_attribute).

This should give you the desired result.

Hope this helps,

Best Regards,

Nibu.

Former Member
0 Kudos

please mail your project to my mail id. let me try and get back to you.

regards

rahul.

Former Member
0 Kudos

could u give me ru mailid

regards

shravan

Former Member
0 Kudos

hi sravan,

just check if you have created a simpletype under local dictionary and have done appropriate enumeration. And after deploying is it like you can't see the dropdown at all or the dropdown you see is empty.

regards

rahul

Former Member
0 Kudos

<B>The DataType of the attribute "Key" should be of type simpletype</b>.Please make sure that you have entered values in enumeration of the simple type.

Regards, Anilkumar

Message was edited by: Anilkumar Vippagunta

Former Member
0 Kudos

hi anil i created simpletype and did as u said but no result

regards

shravan

Former Member
0 Kudos

hi saravan,

Hope you have created a simple type and did the appropriate enumeration.After this you have to set the property of your dropdown attribute to this simpletype.

And to be frank for the drop down we don't actually require an additional node. You can have the dropdown attribute under the tablenode itself.

regards,

rahul.

Former Member
0 Kudos

Hi,

To avoid complexity you can do the following.

1. Create a simleType in the dictionaries.

Add values in the enumaration.

2. Create contex as follows

TableNode

->Attr1

->Attr2

->DropdownAttr (of simpleType)

3. Now in the init you can add the elements to the tableNode in the normal way !!

Regards, Anilkumar

Former Member
0 Kudos

hi,

whats the error that you are getting.can you give the code that you used.

regards,

rahul.

Former Member
0 Kudos

rahul im not getting any error but it isnot displaying a dropdown list

regards

shravan

Former Member
0 Kudos

I would advise you to keep things simple and follow the method I suggested. Avoid the node within the table node

Regards

Noufal

Former Member
0 Kudos

i did the same way as u said

my context goes like this

Tabl- Value node of the table, under this 3 value attribs

id

name

key (for dropdown ui element)

coming to table i used create binding for the 3 attribs

then 3 textview table cell editors appeared.n then i

deleted one textview table cell editor and inserted dropdownkey tablecell editor and binded it to that key value attribute

atfer deploying and running the application i could not see any dropdown in the table in the 3rd colomn

regards

shravan

Former Member
0 Kudos

after creating the simpletype, change the property of your dropdown attribute to this simpletype.

Former Member
0 Kudos

hi anil i did all that u said

but no result

regards

shravan

Former Member
0 Kudos

hi,

bind the table seperately with the table node attributes attr1 and attr2.

now in the table create a dropdownbykey column through table celleditor and bin it seperatelt to the attribute under the

dropdown node. make the singleton property of drop node as false.

regards

rahul.

Former Member
0 Kudos

hia rahul i did as you have said but did not work out

i dont know where iwent wrong

Former Member
0 Kudos

You don't require a seperate node for the drop down.

Under the node for the table create three attribute attr1, attr2, drpdwn.

Map the attributes to the table.

Remove the mapping for the third attribute and insert a columncell editor of type dropdownbyKey...

Hope that would solve your problem

Regards

Noufal

Former Member
0 Kudos

Hi Sravan,

Just now i have answered the same.Please check this.

Regards, Anilkumar