can we return multiple values from dbtreeview click?

Questions and answers on developing, deploying and using plugins and JavaBeans

can we return multiple values from dbtreeview click?

Postby eKelman » Tue Aug 14, 2012 1:09 am

Hi

Does anyone know if it is possible to return multiple column values when setting the onClickMethod?

The table I am using for the tree view is a multi-key based table and I need both values to act on the selection.

eg.
1 value works
binding.setMethodToCallOnClick(onNodeClick , 'id_1');

2 values not working
binding.setMethodToCallOnClick(onNodeClick , 'id_1', 'id_2');

Thanks
Ernest
Kelman Technologies
eKelman
 
Posts: 52
Joined: Tue May 12, 2009 9:09 pm

Re: can we return multiple values from dbtreeview click?

Postby peterbliskavka » Tue May 21, 2013 3:46 pm

I believe you can do it through an unstored table calc. The way I did it is by concatenating 2 strings with a comma in between and doing a split when you need it. if you bind it like this:

binding.setMethodToCallOnClick(onNodeClick , 'yourCalc');

and then in the calculation return:

return id_1 + ',' + id_2;

and finally in the method:

var dataArray = dataString.split(',');
peterbliskavka
 
Posts: 30
Joined: Tue May 21, 2013 3:42 pm


Return to Plugins and Beans

Who is online

Users browsing this forum: No registered users and 7 guests