xmlns jsf error, settings?

Asked

Viewed 68 times

0

I am getting the following error when trying to compile a xhtml page, I am using the xmlns`s below:

Elements with namespace http://java.sun.com/jsf/html may not have Attributes in namespace http://xmlns.jcp.org/jsf. Namespace http://xmlns.jcp.org/jsf is intended for otherwise non-JSF-Aware Markup, such as It is not Valid to have < h:commandButton jsf:id="button" />

<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:jsf="http://xmlns.jcp.org/jsf"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html">

And I get warnings about :

<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>

What could I be doing wrong?

1 answer

1


The problem is on that line:

<h:selectOneMenu class="form-control" id="selectOlhos" jsf:value="#{corpoController.corpo.corOlhos}">

The right thing is:

 <h:selectOneMenu class="form-control" id="selectOlhos" value="#{corpoController.corpo.corOlhos}">

I mean, this "jsf:value" is not a selectOneMenu element

Browser other questions tagged

You are not signed in. Login or sign up in order to post.