Results 1 to 2 of 2
Thread: <h:inputText> problem
- 10-09-2011, 09:41 AM #1
Member
- Join Date
- May 2011
- Posts
- 64
- Rep Power
- 0
<h:inputText> problem
Hello,
I am new to programming with Java EE. I am having problem bulding a simple registration form. The labels for the text boxes are showing when I run the project from my netbeans IDE, but the textboxes themselves are not showing. I followed a tutorial on how to build a simple form with JSF and it works in the tutorial example and I copied the structure of the code and customised it for my own use. Can anyone see where my problem is?
XML Code:<?xml version='1.0' encoding='UTF-8' ?> <!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" xmlns:f="http://java.sun.com/jsf/core"> <h:head> <title>Title</title> </h:head> <h:body> <h1><center>This is the registration page</center></h1> <center><a href="home.xhtml">Home</a></center> <h:form> <h3> Title: <h:inputText id="title" value="#{customer.title}"> </h:inputText> <br/> First Name: <h:inputText id="firstName" value="#{customer.firstName}"> </h:inputText> <br/> Last Name: <h:inputText id="lastName" value="#{customer.lastName}"> </h:inputText> <br/> Email: <h:inputText id="email" value="#{customer.email}"> </h:inputText> <br/> Username: <h:inputText id="username" value="#{customer.username}"> </h:inputText> <br/> Password: <h:inputSecret id="password" value="#{customer.password}"> <f:validateLength minimum="8" maximum="32"/> </h:inputSecret> <br/> <h:selectBooleanCheckbox id="terms" value="#{customer.terms}"> </h:selectBooleanCheckbox> I accept the terms and conditions <br/> <h:commandButton id="submit" value="Submit" action="processRegistration.xhtml"/> </h3> </h:form> </h:body> </html>
- 01-09-2012, 04:11 AM #2
Member
- Join Date
- Jan 2012
- Posts
- 2
- Rep Power
- 0


LinkBack URL
About LinkBacks

Bookmarks