【发布时间】:2018-08-19 05:55:18
【问题描述】:
我正在使用所有 jsf 2.2 新命名空间
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:jsf="http://xmlns.jcp.org/jsf"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsp/jstl/core">
但是我尝试将组件 selectOneMenu 与 selectItem 一起使用多少我收到此错误:
HTTP 状态 500 - 具有命名空间的元素 http://xmlns.jcp.org/jsf/html 可能在命名空间中没有属性 http://xmlns.jcp.org/jsf。命名空间http://xmlns.jcp.org/jsf 是 用于其他不支持 JSF 的标记,例如 有
.
这是我的 selectOneMenu:
<h:selectOneMenu class="form-control"
id="selectOlhos" jsf:value="#{corpoController.corpo.corOlhos}">
<f:selectItem itemLabel="Escolha" itemValue=""></f:selectItem>
<f:selectItem itemLabel="Verdes Claros" itemValue="Verdes Claros"></f:selectItem>
<f:selectItem itemLabel="Verdes Escuros" itemValue="Verdes Escuros"></f:selectItem>
<f:selectItem itemLabel="Castanhos Claros" itemValue="Castanhos Claros"></f:selectItem>
<f:selectItem itemLabel="Castanhos Escuros" itemValue="Castanhos Escuros"></f:selectItem>
</h:selectOneMenu>
如果我删除此组件,它会完美运行。 有什么帮助吗?
【问题讨论】:
-
好主意! ;-)
标签: jsf namespaces