Sathya Elangovan
Sathya Elangovan

Reputation: 163

JSF2 preRenderView not triggered

When I try to execute the below scenario the preRenderView event is not getting triggered Could anyone please suggest me how to achieve this?

Trying to navigate from Page A into Page B. (preRenderView event is getting triggered with no issues) Page B doesn't have any command button and in the preprocess itself using ConfigurableNavigationHandler trying to navigate into Page C.The problem here I'm facing
is Page C is getting invoked but the preRenderEvent is not triggered.

Here follows the code snippet of Page 2.

<h:form>
    <f:metadata>
        <f:event type="preRenderView" listener="#{pageBeanB.preProcess}" />
    </f:metadata>
</h:form>

Upvotes: 0

Views: 1296

Answers (1)

partlov
partlov

Reputation: 14277

Try to remove <f:metadata></f:metadata>, this is not place for that tag. Read documentation for that tag.

This must be a child of the . This tag must reside within the top level XHTML file for the given viewId, or in a template client, but not in a template.

f:event can be used outside of f:metadata, so try to use just f:event here.

Upvotes: 1

Related Questions