cancel
Showing results for 
Search instead for 
Did you mean: 

how to get the id of cell elements in htmlb tableview

Former Member
0 Kudos

Hi guys,

We have defined a tableview in the jsp. And we have inserted elements like inputfield, checkbox in the cells of the table. How I can get the value when the user gives in something in the inputfield.. This can be done by getting the id of the inputfield defined in a column in my tableview. From id I can retrieve the value by getValue() method. Right now I am able to retrieve the id of the tableview by using Tableview tv = (TableView) getComponentByName("the name of the id defined for tableview in jsp"); in the jspdynpage. But I am not able to retrieve the id of the inputfield inserted in the tableview... Kindly help..

Regards,

Priyanka.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Try this code


IPortalPageContext portalPageContext =  this.getPageContext();
AbstractDataType abstractDataType = pageContext.getDataForComponentId("tabeleId", "elementId", row);

http://help.sap.com/javadocs/NW04S/SPS09/hb/com/sapportals/htmlb/rendering/PageContext.html#getDataF...

/message/2079638#2079638 [original link is broken]

Hope it helps you

Jakub Krecicki

Former Member
0 Kudos

Hi,

Try this code


IPortalPageContext portalPageContext =  this.getPageContext();
AbstractDataType abstractDataType = pageContext.getDataForComponentId("tabeleId", "elementId", row);

http://help.sap.com/javadocs/NW04S/SPS09/hb/com/sapportals/htmlb/rendering/PageContext.html#getDataF...

/message/2079638#2079638 [original link is broken]

Hope it helps you

Jakub Krecicki

former_member197348
Active Contributor
0 Kudos

Hi Priyanka,

You should not try with ID of the InputField. You should try like this.

Get the table.Get the column.In loop get the values.

regards,

Siva

Former Member
0 Kudos

Hi siva,

Can you tell me on how to do this... Because I dont have time analysing what you have said... Kindly reply back soon...

Regards,

Priyanka