When should one use the preRenderView event to initialize data for a page versus using the viewAction? Are they equal in use and do they have the same effect?
preRenderView Event
<f:metadata>
<f:event type="preRenderView" listener="#{myBean.initialize}"/>
</f:metadata>
or
viewAction
<f:metadata>
<f:viewAction action="#{myBean.initialize}"/>
</f:metadata>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…