Hi guys,
i've a very important question for you,i'm stopped my work from 10 days to solve it,but nothing....
i hope your can help me.
I'm developing a jsf application and i've created a datatable with empty fields, so each row of my datatable is an input row...i've associated a button to each row and cliccking them i retrieve values inserted by user(for each row) and i put them into a database.
What i want now is avoiding to use a button for each row,i want one only button at the end of page that send to database the data inserted in each row.
I've started
that is,
with
i retrieve values of datatable into a list called values.
With
i try to read a single row into an object
and with
i try to print the organism value for row i.
Biosample is type of managed bean used to wrapp the single row.
My question is:
Each value i retrieve is NULL!!!!!
Why?
Please help me,it's my first post....
i've a very important question for you,i'm stopped my work from 10 days to solve it,but nothing....
i hope your can help me.
I'm developing a jsf application and i've created a datatable with empty fields, so each row of my datatable is an input row...i've associated a button to each row and cliccking them i retrieve values inserted by user(for each row) and i put them into a database.
What i want now is avoiding to use a button for each row,i want one only button at the end of page that send to database the data inserted in each row.
I've started
Code:
public void SendData(ActionEvent e){
System.out.println("inizio vedi riga");
List values=(List) (getBiosampleDataTable()).getValue();
System.out.println("La dimensione è "+values.size());
for (int j=0;j<values.size();j++){
Object obj=values.get(j);
System.out.println(((Biosample) obj).getOrganism());
//System.out.println((String) biosampleItem.getLabel());
}
}
that is,
with
Code:
List values=(List) (getBiosampleDataTable()).getValue();
With
Code:
Object obj=values.get(j);
and with
Code:
System.out.println(((Biosample) obj).getOrganism());
Biosample is type of managed bean used to wrapp the single row.
My question is:
Each value i retrieve is NULL!!!!!
Why?
Please help me,it's my first post....
Comment