【发布时间】:2012-01-16 04:27:24
【问题描述】:
我有一个带有 JSF 组件的 JSP 文件index.jsp:
<body>
<h:form prependId="false">
<h:panelGrid id="panelLogin" columnClasses="colLabel,colValor" columns="2">
<f:facet name="header">
<h:outputText value="Panel de Log-In" />
</f:facet>
<h:outputLabel value="Usuario" for="txtNombre" />
<h:inputText id="txtNombre" value="#{manejadorLogin.usuario}" />
<h:outputLabel value="Password" for="txtPassword" />
<h:inputText id="txtPassword" value="#{manejadorLogin.password}" />
<f:facet name="footer">
<h:panelGrid columns="2">
<h:commandButton value="Login" action="#{manejadorLogin.loginUsuario}" />
<h:commandButton value="Limpiar" type="reset" />
</h:panelGrid>
</f:facet>
</h:panelGrid>
</h:form>
</body>
当我按下“登录”按钮时,我收到此错误:
发生错误:java.lang.IllegalStateException:组件 javax.faces.component.UIViewRoot@7cf94d3b 不是预期类型。预期:javax.faces.component.UIOutput。也许您缺少标签?
这是怎么引起的,我该如何解决?
【问题讨论】: