cancel
Showing results for 
Search instead for 
Did you mean: 

regarding getting the values from table

Former Member
0 Kudos

Dear All,

Actually in my application ,I am retireving values from database in a table ui but i need the same value for calcualting another value that has to be displayed in table 's next column so how can i get that .

table has columns like:date,time,diff,percentage..................

So i want time value to calculate the difference that has to be displayed in table only.

Regards,

Anupama

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Create a calculated attribute under the same node that is bound to the table.

in the get method do the respective calculation.

bind this attribute to a column in the table.

Regards

Ayyapparaj

Answers (1)

Answers (1)

Former Member
0 Kudos

HI,

use the below statement to get the values of the particular element.

wdContext.nodeTable().getTableElementAt(wdContext.nodeTable().getLeadSelection()).get<Attribute Name you want to get>();

Regards,

ramesh

Former Member
0 Kudos

Hi all,

Thanks for your reply but actually i am not able to do anythng.

See following code and just try to get what i am doing:::::

ele2 = wdContext.nodeVn_detailsofserver().createVn_detailsofserverElement();

ele2.setVa_todate(retStr1(i));

i++;

ele2.setVa_fromtime(retStr1(i));

Now i want this above fromtime in one string variable fro using that string variable in calculations

Regards,

Anupama

Edited by: Anupama Bindal on Nov 5, 2008 7:32 AM

Edited by: Anupama Bindal on Nov 5, 2008 7:33 AM

Former Member
0 Kudos

Hi,

Following line will return the fromtime.

wdContext.currentVn_detailsofserverElement().getVa_fromtime();

Regards

Ayyapparaj

Former Member
0 Kudos

hey i tried it earlier only but it was not showing anything in table if i put this thing:( and also it s showing null pointer exception in the same statement::::

String FromTime=wdContext.currentVn_detailsofserverElement().getVa_fromtime();

String EndTime=wdContext.currentVn_detailsofserverElement().getVa_totime();

what to do next?

Following line also showing null pointer exception....y this problem is occuring???

wdComponentAPI.getMessageManager().reportSuccess("value is :::"+wdContext.currentVn_detailsofserverElement().getVa_fromtime());

Regards,

Anupama

Edited by: Anupama Bindal on Nov 5, 2008 8:27 AM

Former Member
0 Kudos

Oh actually i was just writing before adding element to table now i just added this statement after:::

wdContext.nodeVn_detailsofserver().addElement(ele2);

so how can i do calculation before this statemnt and use the from time

Former Member
0 Kudos

Hi,

Can you post the entire code instead of some bits and peaces.

I think you can do the calculation before assinging to the context from the value that is returned from the database and setting this to a context attribute.

Regards

Ayyapparaj

Former Member
0 Kudos

hi its solved ...hi used formatter fr parsing time and then used current time value from database...

Thnks all f u fr your help...

Regards,

Anupama

Edited by: Anupama Bindal on Nov 5, 2008 12:22 PM