My first actionlistener....

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...
 
A

Andrew Thompson

gbattine said:
Hi guys,please help me with my doubt.

Perhaps you can help me unsderstand why you have
suddenly begun multi-posting. I had not noticed you
do it before, but suddenly there identical are posts
from you, to both c.l.j.p. and c.l.j.help.

Please stick to just one group in future, or figure
how to cross-post.

[ This X-posted to c.l.j.p/c.l.j.h. with follow-ups to c.l.j.p. only. ]

Andrew T.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top