Ver Mensaje Individual
  #1 (permalink)  
Antiguo 15/09/2010, 05:42
jcisneros
 
Fecha de Ingreso: noviembre-2009
Mensajes: 9
Antigüedad: 14 años, 5 meses
Puntos: 0
JSF: Problema con las etiquetas

Buenas días a tod@s:

Estoy realizando un ejemplo que he visto por internet con JSF 1.2. Las páginas las defino como .xhtml y así se lo hago
saber al web.xml:


<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>



Mi problema es que si pongo por ejemplo en la vista:

<h:outputLabel for="inputText" value="Enter text here: "/>

No me pinta nada, no da ningún error pero no escribe nada en la página...

¿Sabeis a qué puede ser debido?

La página completa sería (inicio.xhtml):

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!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:c="http://java.sun.com/jstl/core"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Propietarios</title>
</head>
<body>
<f:view>
<h1>
<h:outputText value="Bienvenido a Java Server Faces"></h:outputText>
</h1>
<h2>Probemos la navegaci&oacute;n en JSF!</h2>
<br />

<h:form>
<h:panelGrid columns="3">
<h:outputLabel for="inputText" value="Su nombre: "/>
<h:inputText id="nombre" value="#{inicioBean.nombre}" maxlength="35" required="true"></h:inputText>
<h:message for="nombre"></h:message>

<h:outputLabel for="inputText" value="Su edad "/>
<h:inputText id="edad" value="#{inicioBean.edad}" required="true">
<f:validateLongRange maximum="100"/>
</h:inputText>
<h:message for="edad"></h:message>
</h:panelGrid>

<h:commandButton action="ok" value="Siguiente"></h:commandButton>
</h:form>
</f:view>
</body>
</html>



y quedaría pintado:

Probemos la navegación en JSF!

Agradecería mucho vuestra ayuda, chao!