cancel
Showing results for 
Search instead for 
Did you mean: 

In a TableView, for user defined cell type RadioGroup, retrieving the value

Former Member
0 Kudos

Hello Friends:

I am working on a JSPDynPage which displays a grid of

information, using TableView tag of HTMLB for Java.

One of the columns has user defined type, RadioGroup

with 3 radio buttons in it. For this cell rendering I

implemented custom cell renderer class.

In this custom cell renderer class, I have row,column,

values and TableView object. From these how I can

read/retrieve the value selected from the group of

radio buttons ?

I am looking for the reference of the 'component' object

rendered in one of the cell of the tableviewmodel.

Thank you very much for you help,

Prasad Nutalapati

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Prasad,

The code should look following.

//get the first and last visible row
int firstrow = table.getVisibleFirstRow();
int lastrow  = table.getVisibleLastRow();
for (int i = firstrow; i <=lastrow; i++) {
 IPageContext context = this.getPageContext();

//myTableView is the id of your tableview
AbstractDataType r1 = context.getDataForComponentId("myTableView", "radio1", i);
String val_rad1 = r1.toString();
AbstractDataType r2 = context.getDataForComponentId("myTableView", "radio2", i)
String val_rad2 = r2.toString();;
AbstractDataType r3 = context.getDataForComponentId("myTableView", "radio3", i);
String val_rad3 = r3.toString();
}

Former Member
0 Kudos

Hi Prakash:

Thank you very much for your answer.

It solved my problem. I didn't thought about pagecontext

in a cell renderer class, 'cause I keep thinking that it

is useful either for rendering or only after page has

been submitted.

I could not have thought about this scenario.

Thanks again,

Prasad Nutalapati

Answers (0)