什么时候使用f:viewAction/preRenderView与PostConstruct?
f:viewActionpreRenderView@PostConstruct@RequestScopedf:viewActionpreRenderView@PostConstruct
F:视图或预渲染视图
<f:metadata>
<f:viewAction action="#{myBean.initialize}" /></f:metadata><f:metadata>
<f:event type="preRenderView" listener="#{myBean.initialize}"/></f:metadata>@PostConstruct
public class MyBean{
@PostConstruct
public void initialize()
{
}}慕森卡
相关分类