Skip to content

Instantly share code, notes, and snippets.

@koenighotze
Created September 29, 2015 21:43
Show Gist options
  • Select an option

  • Save koenighotze/a56a10e50eaf4fede0fe to your computer and use it in GitHub Desktop.

Select an option

Save koenighotze/a56a10e50eaf4fede0fe to your computer and use it in GitHub Desktop.
JSF View with table
<!DOCTYPE html>
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:jsf="http://xmlns.jcp.org/jsf" xmlns:ui="http://java.sun.com/jsf/facelets">
<body>
<form jsf:id="form">
What is your name: <input type="text" jsf:value="#{hello.name}"/>
<input type="submit" value="Greet me" jsf:actionListener="#{helloController.storeName(hello)}" jsf:action="hello.xhtml"/>
</form>
<br/>
<div>
Hellos thus far:<br/>
<ul>
<ui:repeat value="#{helloController.helloSoFar()}" var="h">
<li>#{h.name}</li>
</ui:repeat>
</ul>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment