Error xmlns jsf, settings?

0

I'm getting the following error when trying to compile an xhtml page, I'm using the xmlns's below:

Elements with namespace link may not have attributes in namespace link . Namespace link 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 receive 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 can I be doing wrong?

    
asked by anonymous 10.03.2018 / 20:39

1 answer

1

The problem is this line:

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

The right thing to do is:

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

That is, this " jsf: value " is not an element of selectOneMenu

    
11.03.2018 / 03:34