G
gbattine
Hi guys,please help me with my doubt.
I'm using jsf and i've created a datatable.The user insert a value in
the first page and in the second page he sees a datatable with a number
of rows equals to its number.
Each row is a form and i've created a class wrapper for the form.
My problem is sending all these forms in a table,adding to each form an
id stored in my application.
Here is my procedure:
At the end of row i've a commandlinks which calls an actionlistener
that stores the inserted row in a list.
If i do this for each row i will have a list which every row to
insert....
At the end of page i've a submit botton that have to perform the insert
queries,adding a specific id,common for each rows..
Help me,it's my first actionListener and datatable....
Here is my actionListener
//this is the list i've created
private List saveTable=new ArrayList();
public void editBiosample(ActionEvent event) {
FacesContext facesContext=FacesContext.getCurrentInstance();
setBiosampleItem((Biosample) getBiosampleDataTable().getRowData());
saveTable.add(getBiosampleItem());
facesContext.addMessage(null,new
FacesMessage(FacesMessage.SEVERITY_WARN,"Esperimento aggiunto con
successo.","Esperimento aggiunto."));
}
When i click on command link datatable is redisplayed without values
and without showing my message...can you help me?
Is correct this actionListener?
Once i've obtained the saveTable list,how can i insert it in a
query,adding the id?
Please help me...
I'm using jsf and i've created a datatable.The user insert a value in
the first page and in the second page he sees a datatable with a number
of rows equals to its number.
Each row is a form and i've created a class wrapper for the form.
My problem is sending all these forms in a table,adding to each form an
id stored in my application.
Here is my procedure:
At the end of row i've a commandlinks which calls an actionlistener
that stores the inserted row in a list.
If i do this for each row i will have a list which every row to
insert....
At the end of page i've a submit botton that have to perform the insert
queries,adding a specific id,common for each rows..
Help me,it's my first actionListener and datatable....
Here is my actionListener
//this is the list i've created
private List saveTable=new ArrayList();
public void editBiosample(ActionEvent event) {
FacesContext facesContext=FacesContext.getCurrentInstance();
setBiosampleItem((Biosample) getBiosampleDataTable().getRowData());
saveTable.add(getBiosampleItem());
facesContext.addMessage(null,new
FacesMessage(FacesMessage.SEVERITY_WARN,"Esperimento aggiunto con
successo.","Esperimento aggiunto."));
}
When i click on command link datatable is redisplayed without values
and without showing my message...can you help me?
Is correct this actionListener?
Once i've obtained the saveTable list,how can i insert it in a
query,adding the id?
Please help me...