Ravi Srinivasan
2018-09-10 f04579d422790bfed81c843f093a58f15cd8eb2d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?xml version="1.0" encoding="UTF-8"?>
 
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    template="/WEB-INF/templates/default.xhtml">
    <ui:define name="title">
    Hello World web app
    </ui:define>
    <ui:define name="application_name">
        Hello EJB web app
    </ui:define>
    <ui:define name="content">
        <h1>Hello EJB web app</h1>
        <br class="clear"/>
        <h:form id="form">
            <p class="input">
                <h:outputLabel value="Enter your name:" for="name" />
                <h:inputText value="#{hello.name}" id="name" required="true" requiredMessage="Name is required"/>
            </p>
            <br class="clear"/>
            <br class="clear"/>
            <p class="input">
                <h:commandButton action="#{hello.sayHello()}"  value="Submit" styleClass="btn" />
            </p>
            <br class="clear"/>
            <br class="clear"/>
            <h:messages styleClass="messages"/>
        </h:form>
    </ui:define>
</ui:composition>