Erro no maldito JSF2

2 respostas
C

Criei uma arquivo .xhtml com o seguinte conteúdo:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


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

 <h:head>
 <title>K19 Treinamentos</title>
 </h:head>

 <h:body>
 <h:form>
 <h:commandButton value ="Converter" action ="#{conversorMonetarioBean.converte}"/>
 <h:inputText value ="#{conversorMonetarioBean.valor}"/>

 <h:outputLabel value ="de" for ="de"/>

 <h:selectOneMenu value ="#{conversorMonetarioBean.de}" id="de">
 <f:selectItems 
 	value ="#{conversorMonetarioBean.taxas.keySet()}"
   	var ="moeda"
  	itemValue ="#{moeda}"
  	itemLabel ="#{moeda}" />
 </h:selectOneMenu>

 <h:outputLabel value ="para" for ="para"/>

 <h:selectOneMenu value ="#{conversorMonetarioBean.para}" id="para">
 <f:selectItems
 	 value ="#{conversorMonetarioBean.taxas.keySet()}"
 	 var ="moeda"
 	 itemValue ="#{moeda}"
 	 itemLabel ="#{moeda}"  /> 
 </h:selectOneMenu>
 </h:form>
 
 

<h:outputFormat value ="{0} em {1} equivale a {2} em {3}" rendered ="#{conversorMonetarioBean.resultado != null}">
 <f:param value ="#{conversorMonetarioBean.valor}"/>
 <f:param value ="#{conversorMonetarioBean.de}"/>
 <f:param value ="#{conversorMonetarioBean.resultado}"/>
 <f:param value ="#{conversorMonetarioBean.para}"/>
 </h:outputFormat>
</h:body>
</html>

E nas tags e da erro dizendo que são tags desconhecidas ( Unknow tags ).

Alguém sabe o por que ?

2 Respostas

M

Não estaria faltando definir o a tag f junto com sua tag h?

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

Té mais.

douglas_arantes

M@C:
Não estaria faltando definir o a tag f junto com sua tag h?

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

Té mais.

E a culpa quem leva é o JSF 2.0.

Criado 11 de maio de 2013
Ultima resposta 11 de mai. de 2013
Respostas 2
Participantes 3