Hi guys, I just started using PrimeFaces it's been a while, and it's so cool, however I can't figure out how to solve a situation let's say :
I have 2 pages listCustomers.jsf and newCustomer.jsf, I'm using newCustomer.jsf to add new customer, and if it is added succefully i need to show a message dialog in a growl in the next page "listCustomers.jsf" telling that the customer has been succefuly added... , however I can't do that since messages are added to the current page "newCustomer.jsf", so is there any way to send the message to the next page?
best regards.
How to add message to another page?
Hi,
Do you do a redirect to listCustomers.jsf? Why can you not add messages to listCustomers.jsf? If it's quite normally forward navigation and you have messages tag in listCustomers.jsf, you should see the messages there.
Do you do a redirect to listCustomers.jsf? Why can you not add messages to listCustomers.jsf? If it's quite normally forward navigation and you have messages tag in listCustomers.jsf, you should see the messages there.
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
Yes, if you do a forward, messages can be displayed in new page, if you do redirect they are gone. If I'm not mistaken, JSF 2's new Flash feature has keepMessages option to survive messages in redirects.
- bumble.bee
- Posts: 723
- Joined: 29 Sep 2010, 21:39
- Location: United States
Once it stops working like a charm (as it did for me), then you'll probably want to take a look here:
http://ocpsoft.com/java/persist-and-pas ... redirects/
http://ocpsoft.com/java/persist-and-pas ... redirects/
-
- Information
-
Who is online
Users browsing this forum: No registered users and 48 guests