My first actionlistener....

Discussion in 'Java' started by gbattine, Aug 25, 2006.

  1. gbattine

    gbattine Guest

    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...
     
    gbattine, Aug 25, 2006
    #1
    1. Advertising

  2. 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.
     
    Andrew Thompson, Aug 25, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Clive Moore

    ActionListener

    Clive Moore, Dec 2, 2003, in forum: Java
    Replies:
    2
    Views:
    688
    Clive Moore
    Dec 3, 2003
  2. Chris Lawson
    Replies:
    2
    Views:
    825
    Andrew Hobbs
    Feb 5, 2004
  3. Michael
    Replies:
    6
    Views:
    3,172
    Michael
    Jul 11, 2004
  4. Jenny
    Replies:
    1
    Views:
    6,022
    Christian Kaufhold
    Aug 9, 2004
  5. 6e
    Replies:
    1
    Views:
    9,745
Loading...

Share This Page