Initialer Commit
This commit is contained in:
@@ -0,0 +1 @@
|
||||
WebContent/WEB-INF/web.xml
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<file-systems application-name="" model-entity="FileSystems" WORKSPACE_HOME="./WebContent/WEB-INF">
|
||||
<file-system model-entity="FileSystemFolder" location="%workspace.home%" NAME="WEB-INF"/>
|
||||
<file-system model-entity="FileSystemFolder" INFO="Content-Type=Web"
|
||||
location="%workspace.home%/.." NAME="WEB-ROOT"/>
|
||||
<file-system model-entity="FileSystemFolder"
|
||||
location="%workspace.home%/../../JavaSource" NAME="src"/>
|
||||
<file-system model-entity="FileSystemFolder"
|
||||
location="%workspace.home%/lib" NAME="lib"/>
|
||||
<file-system model-entity="FileSystemFolder"
|
||||
location="%workspace.home%/classes" NAME="classes"/>
|
||||
<file-system model-entity="FileSystemFolder"
|
||||
location="%workspace.home%/../../ant" NAME="build"/>
|
||||
<WEB model-entity="JstWeb" MODEL_PATH="/web.xml">
|
||||
<MODULE model-entity="WebJSFModule" MODEL_PATH="/faces-config.xml"
|
||||
ROOT="WEB-ROOT" SRC="src" URI="/WEB-INF/faces-config.xml"/>
|
||||
</WEB>
|
||||
</file-systems>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<faces-config version="2.3" xmlns="http://xmlns.jcp.org/xml/ns/javaee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_3.xsd">
|
||||
|
||||
</faces-config>
|
||||
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0"?>
|
||||
#if ($servlet_version == "2.4")
|
||||
<web-app version="2.4"
|
||||
xmlns="http://java.sun.com/xml/ns/j2ee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
|
||||
#elseif ($servlet_version == "2.5")
|
||||
<web-app version="2.5"
|
||||
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_2_5.xsd">
|
||||
#elseif ($servlet_version == "3.0")
|
||||
<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">
|
||||
#elseif ($servlet_version == "3.1")
|
||||
<web-app version="3.1"
|
||||
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd">
|
||||
#elseif ($servlet_version == "4.0")
|
||||
<web-app version="4.0"
|
||||
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd">
|
||||
#else
|
||||
<!DOCTYPE web-app PUBLIC
|
||||
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
|
||||
"http://java.sun.com/dtd/web-app_2_3.dtd">
|
||||
<web-app>
|
||||
#end
|
||||
|
||||
<display-name>${project.name}</display-name>
|
||||
<!--
|
||||
<welcome-file-list>
|
||||
<welcome-file>index.html</welcome-file>
|
||||
</welcome-file-list>
|
||||
-->
|
||||
<servlet>
|
||||
<servlet-name>Faces Servlet</servlet-name>
|
||||
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
|
||||
<load-on-startup>1</load-on-startup>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>Faces Servlet</servlet-name>
|
||||
<url-pattern>*.jsf</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>Faces Servlet</servlet-name>
|
||||
<url-pattern>*.faces</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>Faces Servlet</servlet-name>
|
||||
<url-pattern>/faces/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
</web-app>
|
||||
@@ -0,0 +1 @@
|
||||
WebContent/WEB-INF/web.xml
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<file-systems application-name="" model-entity="FileSystems" WORKSPACE_HOME="./WebContent/WEB-INF">
|
||||
<file-system model-entity="FileSystemFolder" location="%workspace.home%" NAME="WEB-INF"/>
|
||||
<file-system model-entity="FileSystemFolder" INFO="Content-Type=Web"
|
||||
location="%workspace.home%/.." NAME="WEB-ROOT"/>
|
||||
<file-system model-entity="FileSystemFolder"
|
||||
location="%workspace.home%/../../JavaSource" NAME="src"/>
|
||||
<file-system model-entity="FileSystemFolder"
|
||||
location="%workspace.home%/lib" NAME="lib"/>
|
||||
<file-system model-entity="FileSystemFolder"
|
||||
location="%workspace.home%/classes" NAME="classes"/>
|
||||
<file-system model-entity="FileSystemFolder"
|
||||
location="%workspace.home%/../../ant" NAME="build"/>
|
||||
<WEB model-entity="JstWeb" MODEL_PATH="/web.xml">
|
||||
<MODULE model-entity="WebJSFModule" MODEL_PATH="/faces-config.xml"
|
||||
ROOT="WEB-ROOT" SRC="src" URI="/WEB-INF/faces-config.xml"/>
|
||||
</WEB>
|
||||
</file-systems>
|
||||
@@ -0,0 +1,41 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2020 Red Hat, Inc.
|
||||
* Distributed under license by Red Hat, Inc. All rights reserved.
|
||||
* This program is made available under the terms of the
|
||||
* Eclipse Public License v1.0 which accompanies this distribution,
|
||||
* and is available at http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat, Inc. - initial API and implementation
|
||||
******************************************************************************/
|
||||
package demo;
|
||||
|
||||
import javax.inject.Named;
|
||||
import java.io.Serializable;
|
||||
import javax.enterprise.context.SessionScoped;
|
||||
|
||||
/**
|
||||
* Created by JBoss Tools
|
||||
*/
|
||||
@Named
|
||||
@SessionScoped
|
||||
public class User implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String name;
|
||||
|
||||
public User() {
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String sayHello() {
|
||||
return "greeting";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
prompt=Your Name\:
|
||||
greeting=Hello
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<PROCESS model-entity="JSFProcess">
|
||||
<PROCESS-ITEM NAME="rules:#pages#greeting.xhtml"
|
||||
PATH="/pages/greeting.xhtml" SHAPE="240,33,0,0" model-entity="JSFProcessGroup"/>
|
||||
<PROCESS-ITEM NAME="rules:#pages#inputname.xhtml"
|
||||
PATH="/pages/inputname.xhtml" SHAPE="32,17,0,0" model-entity="JSFProcessGroup">
|
||||
<PROCESS-ITEM ID="rules:#pages#inputname.xhtml:0" NAME="item"
|
||||
PATH="/pages/inputname.xhtml" model-entity="JSFProcessItem">
|
||||
<PROCESS-ITEM-OUTPUT ID="greeting::#pages#greeting.xhtml"
|
||||
NAME="output" PATH="/pages/greeting.xhtml"
|
||||
TARGET="rules:#pages#greeting.xhtml" TITLE="greeting" model-entity="JSFProcessItemOutput"/>
|
||||
</PROCESS-ITEM>
|
||||
</PROCESS-ITEM>
|
||||
</PROCESS>
|
||||
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<faces-config version="2.3" xmlns="http://xmlns.jcp.org/xml/ns/javaee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_3.xsd">
|
||||
|
||||
<navigation-rule>
|
||||
<from-view-id>/pages/inputname.xhtml</from-view-id>
|
||||
<navigation-case>
|
||||
<from-outcome>greeting</from-outcome>
|
||||
<to-view-id>/pages/greeting.xhtml</to-view-id>
|
||||
</navigation-case>
|
||||
</navigation-rule>
|
||||
|
||||
<application>
|
||||
<resource-bundle>
|
||||
<base-name>resources</base-name>
|
||||
<var>msgs</var>
|
||||
</resource-bundle>
|
||||
</application>
|
||||
</faces-config>
|
||||
@@ -0,0 +1,60 @@
|
||||
<?xml version="1.0"?>
|
||||
#if ($servlet_version == "2.4")
|
||||
<web-app version="2.4"
|
||||
xmlns="http://java.sun.com/xml/ns/j2ee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
|
||||
#elseif ($servlet_version == "2.5")
|
||||
<web-app version="2.5"
|
||||
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_2_5.xsd">
|
||||
#elseif ($servlet_version == "3.0")
|
||||
<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">
|
||||
#elseif ($servlet_version == "3.1")
|
||||
<web-app version="3.1"
|
||||
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd">
|
||||
#elseif ($servlet_version == "3.1")
|
||||
<web-app version="3.1"
|
||||
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd">
|
||||
#elseif ($servlet_version == "4.0")
|
||||
<web-app version="4.0"
|
||||
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd">
|
||||
#else
|
||||
<!DOCTYPE web-app PUBLIC
|
||||
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
|
||||
"http://java.sun.com/dtd/web-app_2_3.dtd">
|
||||
<web-app>
|
||||
#end
|
||||
|
||||
<display-name>${project.name}</display-name>
|
||||
<welcome-file-list>
|
||||
<welcome-file>index.html</welcome-file>
|
||||
</welcome-file-list>
|
||||
<servlet>
|
||||
<servlet-name>Faces Servlet</servlet-name>
|
||||
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
|
||||
<load-on-startup>1</load-on-startup>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>Faces Servlet</servlet-name>
|
||||
<url-pattern>*.jsf</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>Faces Servlet</servlet-name>
|
||||
<url-pattern>*.faces</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>Faces Servlet</servlet-name>
|
||||
<url-pattern>/faces/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
</web-app>
|
||||
@@ -0,0 +1 @@
|
||||
<html><head><meta http-equiv="Refresh" content="0; URL=pages/inputname.jsf"/></head></html>
|
||||
@@ -0,0 +1,14 @@
|
||||
<!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:ui="http://xmlns.jcp.org/jsf/facelets"
|
||||
xmlns:h="http://xmlns.jcp.org/jsf/html"
|
||||
xmlns:f="http://xmlns.jcp.orgs/jsf/core">
|
||||
|
||||
<ui:composition template="/templates/common.xhtml">
|
||||
<ui:define name="pageTitle">Greeting to User</ui:define>
|
||||
<ui:define name="pageHeader">Greeting Page</ui:define>
|
||||
<ui:define name="body">
|
||||
#{msgs.greeting} #{user.name}!
|
||||
</ui:define>
|
||||
</ui:composition>
|
||||
</html>
|
||||
@@ -0,0 +1,19 @@
|
||||
<!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:ui="http://xmlns.jcp.org/jsf/facelets"
|
||||
xmlns:h="http://xmlns.jcp.org/jsf/html"
|
||||
xmlns:f="http://xmlns.jcp.org/jsf/core"
|
||||
xmlns:ez="http://xmlns.jcp.org/jsf/composite/demo">
|
||||
|
||||
<ui:composition template="/templates/common.xhtml">
|
||||
|
||||
<ui:define name="pageTitle">Input User Name</ui:define>
|
||||
|
||||
<ui:define name="pageHeader">JSF 2 Hello Application</ui:define>
|
||||
|
||||
<ui:define name="body">
|
||||
<h:message showSummary="true" showDetail="false" style="color: red; font-weight: bold;" for="inputname" />
|
||||
<ez:input id="inputname" label="#{msgs.prompt}" value="#{user.name}" action="#{user.sayHello}" submitlabel="Say Hello"/>
|
||||
</ui:define>
|
||||
</ui:composition>
|
||||
</html>
|
||||
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0"?>
|
||||
<!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://xmlns.jcp.org/jsf/html"
|
||||
xmlns:composite="http://xmlns.jcp.org/jsf/composite">
|
||||
|
||||
<composite:interface>
|
||||
<composite:attribute name="label"/>
|
||||
<composite:attribute name="value" required="true"/>
|
||||
<composite:attribute name="action" required="true" method-signature="java.lang.String f()"/>
|
||||
<composite:attribute name="submitlabel"/>
|
||||
</composite:interface>
|
||||
|
||||
<composite:implementation>
|
||||
<h:form>
|
||||
<h:outputText value="#{cc.attrs.label}" />
|
||||
<h:inputText value="#{cc.attrs.value}" />
|
||||
<h:commandButton action="#{cc.attrs.action}" value="#{cc.attrs.submitlabel}" />
|
||||
</h:form>
|
||||
</composite:implementation>
|
||||
</html>
|
||||
@@ -0,0 +1,64 @@
|
||||
<!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:ui="http://xmlns.jcp.org/jsf/facelets"
|
||||
xmlns:h="http://xmlns.jcp.org/jsf/html"
|
||||
xmlns:f="http://xmlns.jcp.org/jsf/core">
|
||||
|
||||
<head>
|
||||
<title><ui:insert name="pageTitle">Page Title</ui:insert></title>
|
||||
<style type="text/css">
|
||||
body {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 14px;
|
||||
}
|
||||
.header {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 18px;
|
||||
}
|
||||
.bottom {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 9px;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
color: #8E969D;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body bgcolor="#ffffff">
|
||||
<table style="border:1px solid #CAD6E0" align="center" cellpadding="0" cellspacing="0" border="0" width="400">
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td class="header" height="42" align="center" valign="middle" width="100%" bgcolor="#E4EBEB">
|
||||
<ui:insert name="pageHeader">Page Header</ui:insert>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="1" width="100%" bgcolor="#CAD6E0"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="100%" colspan="2">
|
||||
<table width="100%" style="height:150px" align="left" cellpadding="0" cellspacing="0" border="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td align="center" width="100%" valign="middle">
|
||||
|
||||
<ui:insert name="body">Page Body</ui:insert>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2" valign="bottom" height="1" width="100%" bgcolor="#CAD6E0"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user