Java Reference
In-Depth Information
Then, we need to add a form and a couple of simple input fields. Later, we will use
the Java API for WebSocket to populate these fields with default values.
After making the previously mentioned modifications, our markup now looks like this:
<?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:jsf="http://xmlns.jcp.org/jsf">
<head jsf:id="head">
<title>WebSocket and Java EE</title>
</head>
<body jsf:id="body">
<form method="POST" jsf:prependId="false">
<table>
<tr>
<td>First Name</td>
<td>
<input type="text" jsf:id="firstName"
jsf:value="#{person.firstName}"/>
</td>
</tr>
<tr>
<td>Last Name</td>
<td>
<input type="text" jsf:id="lastName"
jsf:value="#{person.lastName}"/>
</td>
</tr>
<tr>
<td></td>
<td>
<input type="submit" value="Submit"
jsf:action="confirmation"/>
</td>
</tr>
</table>
</form>
</body>
</html>
We just added some simple HTML to the markup and used JSF-specific attributes so
that the HTML tags are treated like their equivalent JSF-specific tags.
 
Search WWH ::




Custom Search