Skip to Content
author's profile photo Former Member
Former Member

Retrieving data from TableView in the processAfterInput Method

I am trying to retrieve the content of the cells in my TableView in the processAfterInput Method.

I do get the TableView with the following code:

TableView table=((TableView)this.getComponentByName("table"));

Afterwards I try accessing the cells with the following code:

for(int row=1;row<table.getRowCount();row++){

for(int col=1;col<table.getColumnCount();col++){

log(table.getValueAt(row,col));

}

}

But when I call table.getValueAt(row,col) the Method get ValueAt in the DefaultTableModel class throws a NullPointerException. Now I don't know, how to go on.

Thanx for your help.

Add comment
10|10000 characters needed characters exceeded

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Apr 08, 2004 at 02:27 PM

    Hi actually I did not get the values I need, but i recognized that the TableViewModel is not the one I submitted. In the Response I get a ReconstructedTableModel. In this Model, derived from the DefaultTableViewModel, there are no values stored. So I know where the NullPointer comes from. But I need a way to resolve the Values inserted.

    I also get an Instance of an InputField with "this.getComponentByName("column1")", but this is returning null for the getValueMethod.

    Thanks for any suggestion

    Boris van Benthem

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 08, 2004 at 02:27 PM

    Hi actually I did not get the values I need, but i recognized that the TableViewModel is not the one I submitted. In the Response I get a ReconstructedTableModel. In this Model, derived from the DefaultTableViewModel, there are no values stored. So I know where the NullPointer comes from. But I need a way to resolve the Values inserted.

    I also get an Instance of an InputField with "this.getComponentByName("column1")", but this is returning null for the getValueMethod.

    Thanks for any suggestion

    Boris van Benthem

    Add comment
    10|10000 characters needed characters exceeded