2

I am sure that this is really stupid question but I couldn't find any examples.

I would like to update a whole page from the backing bean. I already managed to update the content of a dialog by using

RequestContext.getCurrentInstance().update("dialog-form-id");

Is there anything like [...].update("@all") or do I really need to pass the method the whole form id list?

pedro
  • 417
  • 2
  • 7
  • 25
  • 1
    Possible duplicate of [How can I reload the same page from a managedBean in JSF?](https://stackoverflow.com/questions/16483214/how-can-i-reload-the-same-page-from-a-managedbean-in-jsf) – lastresort Oct 17 '17 at 12:23
  • I'm talking about an update, I don't want the page to be refreshed – pedro Oct 17 '17 at 12:25
  • Why you don't want to have the page refreshed? Normally you should avoid using @all and refresh the page instead. – lastresort Oct 17 '17 at 12:31
  • Because otherwise I'll lose stuff that has been done but not saved. I need an update to show the user the changes he just did before he saves them. Plus, I can't have the visual clue of a page refreshing that sometimes happens. – pedro Oct 17 '17 at 12:39
  • Then you need to wrap everything you want to update in a component which is updatable e.q. h:panelGroup. Then you're able update the panelGroup from your bean and everything inside the panelGroup is updated too. If there's a form which contains the whole page you could also update the form by its id, then you won't need a panelGroup. – lastresort Oct 18 '17 at 06:17

0 Answers0