Commits

Micha Kops committed d289761

JSF integration example added.

Comments (2)

Files changed (2)

src/main/webapp/WEB-INF/web.xml

+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
+	<servlet>
+		<servlet-name>Faces Servlet</servlet-name>
+		<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+	</servlet>
+	<servlet-mapping>
+		<servlet-name>Faces Servlet</servlet-name>
+		<url-pattern>*.xhtml</url-pattern>
+	</servlet-mapping>
+</web-app>

src/main/webapp/index.xhtml

+<!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"
+	xmlns:ui="http://java.sun.com/jsf/facelets">
+<h:head>
+	<title>hasCode.com - Togglz Feature Flag Tutorial</title>
+</h:head>
+<h:body>
+	<h1>Features enabled</h1>
+	<h:panelGroup rendered="#{features['DISPLAY_SIMPLE_USER_PROFILE']}">
+		Display simple user profile
+		<hr/>
+	</h:panelGroup>
+		<h:panelGroup rendered="#{features['DISPLAY_EXTENDED_USER_PROFILE']}">
+		Display extended user profile
+	</h:panelGroup>
+</h:body>
+</html>