Friday, March 14, 2014

JSF 2.2 HTML5

With JSF 2.2 you can now use html5 syntax and all you need for Jsf to process the element is jsf:id="", html passthroughs are allowed now,  See example below!


<?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:f="http://xmlns.jcp.org/jsf/core"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://xmlns.jcp.org/jsf/passthrough"
      xmlns:jsf="http://xmlns.jcp.org/jsf">
    <head jsf:id="head">
        <title>Facelet Title</title>
        <h:outputStylesheet name="css/app.css"/>
    </head>
<body>
<input class="span3" required="required" value="#{index.name}" jsf:id="name" name="name" placeholder="Full Name" type="text"/> 
</body>

</html>

No comments:

Post a Comment