相关疑难解决方法(0)

表单组件需要在其祖先中具有UIForm.建议:在<h:form>中包含必要的组件

这是我的表格:

<form action="j_security_check">
    <h:panelGrid columns="2" bgcolor="#eff5fa" cellspacing="5" frame="box" styleClass="center">
        <h:outputLabel value="User ID:"/>
        <h:inputText id="j_username" tabindex="1" />
        <h:outputLabel value="Password:"/>
        <h:inputSecret id="j_password"/>
        <h:outputLabel value=""/>
        <h:commandButton id="login" value="Login"/>
    </h:panelGrid>
</form>
Run Code Online (Sandbox Code Playgroud)

它适用于Glassfish 3.0.1,但是从Glassfish 3.1 b2开始,它FacesMessage在JSF页面中显示了这个警告:

表单组件需要在其祖先中具有UIForm.建议:将必要的组件包含在内<h:form>

如果我更改<form action="j_security_check"><h:form>,它不会修复它,我必须放在<h:form>里面<h:panelGrid>.

forms jsf jsf-2

38
推荐指数
2
解决办法
6万
查看次数

标签 统计

forms ×1

jsf ×1

jsf-2 ×1