You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Glen <ks...@yahoo.com> on 2007/11/12 10:13:03 UTC

Issue with getting the values of the rows in dynamically generated Table

I have a problem with getting values of the inputText components from a
dynamically generated table.  Table will have inputText components in each
cell.  The value entered by user should come to backing bean.

The following is the code that shows how I am trying to get the values:


            Iterator selectedRowKeys =
tempCoreTable.getSelectedRowKeys().iterator();
            while(selectedRowKeys.hasNext()) {
                ServiceBean tableRow =
(ServiceBean)tempCoreTable.getRowData(Integer.parseInt(selectedRowKeys.next().toString()));
                System.out.println("Weight :: " + tableRow.getWeight());
                System.out.println("Minimum Value :: " +
tableRow.getMinValue());
                System.out.println("Id :: " + tableRow.getDataID());
                System.out.println("Name :: " + tableRow.getName());
            }

ServiceBean is a simple Java Bean that contains set of properties weight,
minValue, dataId, name and their get-set methods.  Also the rows in the
dynamically generated table are also of type ServiceBean.
Please help me to get out this problem.
-- 
View this message in context: http://www.nabble.com/Issue-with-getting-the-values-of-the-rows-in-dynamically-generated-Table-tf4789816.html#a13702156
Sent from the My Faces - Dev mailing list archive at Nabble.com.