How can I put a message in a jsf page after an action in another page?

Discussion in 'Java' started by guess85, Nov 4, 2007.

  1. guess85

    guess85 Guest

    Hi everybody, I know that what I try to explain is a bit difficult to
    understand without know all the context but I try to do it the same:).
    I have a datatable that contains a list of student. In another page I
    insert a new student. When I click on "save" button I save the new
    student and I return to the page with the datatable. The problem is:
    when I add a student I must notify the user that the student is added
    correctly with a message in the 1st page like "The student is added
    correctly". This message must display only after I added the student
    not when I see for the first time the page with the datatable. How can
    i do this? Thanks to all.
     
    guess85, Nov 4, 2007
    #1
    1. Advertising

  2. guess85

    Lew Guest

    Re: How can I put a message in a jsf page after an action in anotherpage?

    guess85 wrote:
    > Hi everybody, I know that what I try to explain is a bit difficult to
    > understand without know all the context but I try to do it the same:).
    > I have a datatable that contains a list of student. In another page I
    > insert a new student. When I click on "save" button I save the new
    > student and I return to the page with the datatable. The problem is:
    > when I add a student I must notify the user that the student is added
    > correctly with a message in the 1st page like "The student is added
    > correctly". This message must display only after I added the student
    > not when I see for the first time the page with the datatable. How can
    > i do this? Thanks to all.


    Don't think of it as "returning" to the "first" page but as moving forward to
    the control page.

    A simple approach is to use a dynamic element such as a request attribute to
    hold the message or a state variable to drive retrieval of the message. Use
    EL, JSTL or JSF idioms to control whether the message is displayed.

    I am still learning JSF, so undoubtedly I'm ignoring some JSF component that
    manages messages such as these.

    --
    Lew
     
    Lew, Nov 4, 2007
    #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. Hari Om
    Replies:
    3
    Views:
    12,150
    Wendy S
    Oct 1, 2003
  2. dudu
    Replies:
    0
    Views:
    377
  3. Sebastian Fey

    JSF debugging / JSF newsgroup

    Sebastian Fey, Apr 7, 2006, in forum: Java
    Replies:
    1
    Views:
    7,632
    Danno
    Apr 7, 2006
  4. BlackIce
    Replies:
    1
    Views:
    17,174
  5. vyshu
    Replies:
    1
    Views:
    2,556
    Richard Senior
    Apr 27, 2007
Loading...

Share This Page