Faces messages not shown when preRenderView event jumps to another view in nested backing bean

93 Views Asked by At

I have two scenarios. First one, from an external URL, I access a view (V1) with a preRenderView event in it. The executed method in the backing bean navigates to another view (V2). In V2 I have some elements that are associated to a backing bean (BB1). Also, V2 includes another view with another backing bean (BB2).

Wherever an error occurs in BB2, the errors don´t display, but if an error happens in BB1, the errors display without any problem.

Second one, if I access V1 and this event doesn´t navigate to other view, V1 renders. In V1 is a form with a button that navigates to V2. This way, doesn´t matter where the errors occur, either BB1's errors and BB2's errors are displayed.

¿Any thoughts about the BB2's errors aren´t displayed in the first scenario?

Thank you in advance

1

There are 1 best solutions below

0
On

I reached a solution for my problem. I think the preRenderView event that I had in my V2 was messing somehow with the preRenderView in V1 when I do the navigation by the first scenario. I changed it to a preRenderComponent in the V2 and enclosed by the f:metadata tag and the messages started to appear.