Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / November 2007

Tip: Looking for answers? Try searching our database.

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

Thread view: 
guess85 - 04 Nov 2007 13:55 GMT
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.
Lew - 04 Nov 2007 14:12 GMT
> 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:).
[quoted text clipped - 6 lines]
> 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.

Signature

Lew



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.