!!Sorgenti del corso
[{TableOfContents }]

!!Parte 1
!index.html (v1)
%%prettify 
{{{
<?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">
    <h:head>
        <title>Pagina Iniziale</title>
    </h:head>
    <h:body>
        <h:form>
            <h:commandButton action="views/list" value="Entra"/>
        </h:form>
    </h:body>
</html>
}}}
/%

!list.xhtml (v1)
%%prettify 
{{{
<!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:ui="http://java.sun.com/jsf/facelets">

    <h:head>
        <title>Pagina Iniziale</title>
    </h:head>
    <h:body>
        <h1><h:outputText value="Hello World"/></h1>
    </h:body>

</html>
}}}
/%

!!Parte 2
[{Image src='./header_logo.gif'}]


!masterLayout.xhtml (v1)
%%prettify 
{{{
<!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:ui="http://java.sun.com/jsf/facelets">

    <h:head>
        <title>Pagina Iniziale</title>
    </h:head>
    <h:body>
        <div id="header">
            <h:graphicImage library="images" name="header_logo.gif"/>
            JSF Sample Application
        </div>
        <h:form>
            <ui:insert name="content"/>
        </h:form>
    </h:body>

    <h:outputStylesheet library="css" name="style.css"/>
</html>

}}}
/%

!index.xhtml (v2)
%%prettify 
{{{
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                template="/template/masterLayout.xhtml">

    <ui:define name="content">
        <h:commandButton action="views/list" value="Entra"/>
    </ui:define>

</ui:composition>
}}}
/%



!list.xhtml (v2)
%%prettify 
{{{
<ui:composition
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                template="/template/masterLayout.xhtml">

    <ui:define name="content">
        <h1>
            <h:outputText value="Hallo World!!!"/>
        </h1>
    </ui:define>

</ui:composition>
}}}
/%


!style.css (v2)
%%prettify 
{{{
/* 
    Document   : style
    Created on : Aug 23, 2010, 3:47:16 PM
    Author     : mauro
    Description:
        Purpose of the stylesheet follows.
*/

/* 
   TODO customize this sample style
   Syntax recommendation http://www.w3.org/TR/REC-CSS2/
*/

body {
    font-family: Verdana,Arial,Helvetica,sans-serif;
    font-size: 11px;
    margin: 0px;
    padding: 0px;
}

#header {
    width: 100%;
    
    margin-bottom: 10px;
    border-bottom: 2px solid #999;
    color:#000066;
    font-size: 14px;
    background-color: #bbcccc
}
}}}
/%