cancel
Showing results for 
Search instead for 
Did you mean: 

RE:problem with dropdown by key in UITABLE

Former Member
0 Kudos

Hi all,

I have taken a node(Status_node) and an attribute(STATUS_TABLE) in that node and i have bind that nodeattribute to the dropdown key which is in a UITABLE but iam unable to set the values to that dropdownkey.

so anyone help me out in solving this issue.

the code that i hvae used is:

IPrivateUpdateDefectsPage.IStatus_nodeElement tablestatus = wdContext.nodeStatus_node().createStatus_nodeElement();

tablestatus.setSTATUS_TABLE(Status);

wdContext.nodeStatus_node().addElement(tablestatus);

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

HI Ayyapparaj KV ,

Thanks for your Reply,actually my problem is I am able to populate values in dropdown but i have to retrive the value from DATABASE and i have to set that value to dropdownd but i am not able to do so.

so plz help me out in solving this issue.

Former Member
0 Kudos

HI,

use jdbc to access your database

iterate through the resultset

populate the valueset

Replace the following code with the resultset iteration


for(int x=0; x<10;x++)
	  {
		  simpleValueSet.put(String.valueOf(x), String.valueOf(x));
	  }

check this thread for database access

Regards

Ayyapparaj

Former Member
0 Kudos

Hi,

Use the following code to populate the dropdownn


ISimpleTypeModifiable modifiable = wdContext.getNodeInfo().getAttribute("Your Attribute").getModifiableSimpleType();
	  ISimpleValueServices simpleValueServices = modifiable.getSVServices();
	  IModifiableSimpleValueSet simpleValueSet = simpleValueServices.getModifiableSimpleValueSet();
	  
	  for(int x=0; x<10;x++)
	  {
		  simpleValueSet.put(String.valueOf(x), String.valueOf(x));
	  }

Regards

Ayyapparaj