加载页面时如何获取硬编码值(viewAcrion)?

问题描述 投票:0回答:0

如何在页面加载时获取硬编码值? actionCode f:param 总是返回空值。

<f:viewAction action="#{myFaces.onLoad}">
    <f:param name="actionCode" value="123" />
</f:viewAction>

public void onLoad() {
    // Unable to get actionCode, always return empty
    logger.debug("FacesRequestParameterMap: {}", FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap());
}
jsf facelets
© www.soinside.com 2019 - 2024. All rights reserved.