Forum Stats

  • 3,814,371 Users
  • 2,258,867 Discussions
  • 7,892,689 Comments

Discussions

¿Why JSF 2.2 not render my PrimeFaces "selectOneMenu" component?

gechenique
gechenique Member Posts: 14 Blue Ribbon
edited Sep 2, 2015 8:35AM in JavaServer Faces

I'm starting with PrimeFaces following an example of Youtube, and when I run my application reference error appears.

My environment is as follows: Server: Tomcat 8 JavaServerFaces: 2.2.9 PrimeFaces: 5.2 IDE: Eclipse Mars (4.5).

When i run the application, the following error appears:

Estado HTTP 500 - Error Parsing /index.xhtml: Error Traced[line: 20] The element type “h:form” must be terminated by the matching end-tag “</h:form>”

My index.xhtml is:

<span class="tag"><html</span><span class="pln"> </span><span class="atn">xmlns</span><span class="pun">=</span><span class="atv"><span>"</span><a class="jive-link-external-small" href="http://www.w3.org/1999/xhtml" rel="nofollow">http://www.w3.org/1999/xhtml</a><span>"</span></span><span class="pln"><br/></span><span class="atn">xmlns:ui</span><span class="pun">=</span><span class="atv"><span>"</span><a class="jive-link-external-small" href="http://java.sun.com/jsf/facelets" rel="nofollow">http://java.sun.com/jsf/facelets</a><span>"</span></span><span class="pln"><br/></span><span class="atn">xmlns:h</span><span class="pun">=</span><span class="atv"><span>"</span><a class="jive-link-external-small" href="http://java.sun.com/jsf/html" rel="nofollow">http://java.sun.com/jsf/html</a><span>"</span></span><span class="pln"><br/></span><span class="atn">xmlns:f</span><span class="pun">=</span><span class="atv"><span>"</span><a class="jive-link-external-small" href="http://java.sun.com/jsf/core" rel="nofollow">http://java.sun.com/jsf/core</a><span>"</span></span><span class="pln"><br/></span><span class="atn">xmlns:p</span><span class="pun">=</span><span class="atv"><span>"</span><a class="jive-link-external-small" href="http://primefaces.org/ui" rel="nofollow">http://primefaces.org/ui</a><span>"</span></span><span class="tag">></span><span class="pln"><br/></span><span class="tag"><h:head></span><span class="pln"><br/></span><span class="tag"><meta</span><span class="pln"> </span><span class="atn">http-equiv</span><span class="pun">=</span><span class="atv">"Content-Type"</span><span class="pln"> </span><span class="atn">content</span><span class="pun">=</span><span class="atv">"text/html; charset=ISO-8859-1"</span><span class="pln"> </span><span class="tag">/></span><span class="pln"><br/></span><span class="tag"><h:title></span><span class="pln">Insert title here</span><span class="tag"></h:title></span><span class="pln"><br/></span><span class="tag"></h:head></span><span class="pln"><br/></span><span class="tag"><h:body></span><span class="pln"><br/><br/></span><span class="tag"><h:form></span><span class="pln"><br/>   </span><span class="tag"><p:outputLabel</span><span class="pln"> </span><span class="atn">value</span><span class="pun">=</span><span class="atv">"Nombre"</span><span class="pln"> </span><span class="tag">/></span><span class="pln"><br/>   </span><span class="tag"><p:inputText</span><span class="pln"> </span><span class="atn">value</span><span class="pun">=</span><span class="atv">"#{personaBean.persona.nombre}"</span><span class="pln"> </span><span class="tag">/></span><span class="pln"><br/><br/>   </span><span class="tag"><p:outputLabel</span><span class="pln"> </span><span class="atn">for</span><span class="pun">=</span><span class="atv">"Sexo"</span><span class="pln"> </span><span class="atn">value</span><span class="pun">=</span><span class="atv">"Basic:"</span><span class="pln"> </span><span class="tag">/></span><span class="pln"><br/>   </span><span class="tag"><p:selectOneMenu</span><span class="pln"> </span><span class="atn">id</span><span class="pun">=</span><span class="atv">"sexo"</span><span class="pln"> </span><span class="atn">value</span><span class="pun">=</span><span class="atv">"#{personaBean.persona.sexo}"</span><span class="pln"> </span><span class="tag">/></span><span class="pln"><br/>   </span><span class="tag"><f:selectItem</span><span class="pln"> </span><span class="atn">itemLabel</span><span class="pun">=</span><span class="atv">"MASCULINO"</span><span class="pln"> </span><span class="atn">itemValue</span><span class="pun">=</span><span class="atv">"M"</span><span class="pln"> </span><span class="tag">/></span><span class="pln"><br/>   </span><span class="tag"><f:selectItem</span><span class="pln"> </span><span class="atn">itemLabel</span><span class="pun">=</span><span class="atv">"FEMENINO"</span><span class="pln"> </span><span class="atn">itemValue</span><span class="pun">=</span><span class="atv">"F"</span><span class="pln"> </span><span class="tag">/></span><span class="pln"><br/>   </span><span class="tag"></p:selectOneMenu></span><span class="pln"><br/></span><span class="tag"></h:form></span><span class="pln"><br/><br/></span><span class="tag"></h:body></span><span class="pln"><br/></span><span class="tag"></html></span>


Thanks in advance for your help.


Gustavo Echenique

Best Answer

Answers

This discussion has been closed.