Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > My first actionlistener....

Reply
Thread Tools

My first actionlistener....

 
 
gbattine
Guest
Posts: n/a
 
      08-25-2006
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,"Esperimen to 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...

 
Reply With Quote
 
 
 
 
Andrew Thompson
Guest
Posts: n/a
 
      08-25-2006
gbattine wrote:
> 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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
70-290 first or 70-291 first? MCSE 2 07-11-2006 03:30 AM
I'm lazy: how do I make the first databound record not display/chop off the first element from SqlDataSource ASP .Net 7 06-28-2006 10:24 AM
20D's first field trip. First Snake of Spring Celtic Boar Digital Photography 3 04-10-2005 09:40 PM
help with my first project on first job, how to read a strange file, thanks a lot!!!!!!! matt Java 9 10-27-2004 03:32 AM
FS: First Clamshell Laptop - First Laptop in Space - GRiD 1101 Compass Computer Dave Computer Information 0 09-22-2004 10:59 PM



Advertisments