Skip to content
Snippets Groups Projects
Commit 28ae1223 authored by Carlos Eduardo da Silva's avatar Carlos Eduardo da Silva
Browse files

Saving the rest

parent 7d92bd5b
No related branches found
No related tags found
No related merge requests found
......@@ -12,5 +12,6 @@
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
<classpathentry kind="output" path="build/classes"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<PROCESS model-entity="JSFProcess">
<PROCESS-ITEM NAME="rules:#formulario.xhtml" PATH="/formulario.xhtml"
SHAPE="259,164,0,0" model-entity="JSFProcessGroup">
<PROCESS-ITEM ID="rules:#formulario.xhtml:0" NAME="item"
PATH="/formulario.xhtml" model-entity="JSFProcessItem">
<PROCESS-ITEM-OUTPUT ID="Soma::#resultado.xhtml" NAME="output"
PATH="/resultado.xhtml" TARGET="rules:#resultado.xhtml" TITLE="Soma" model-entity="JSFProcessItemOutput"/>
</PROCESS-ITEM>
</PROCESS-ITEM>
<PROCESS-ITEM NAME="rules:#resultado.xhtml" PATH="/resultado.xhtml"
SHAPE="272,360,50,25" model-entity="JSFProcessGroup" persistent="true"/>
</PROCESS>
<?xml version="1.0" encoding="UTF-8"?>
<faces-config version="2.2" 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_2.xsd">
</faces-config>
\ No newline at end of file
<managed-bean>
<managed-bean-name>calculatorManagedBean</managed-bean-name>
<managed-bean-class>br.ufrn.imd.imd0409.calculator.view.CalculatorManagedBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<navigation-rule>
<from-view-id>/formulario.xhtml</from-view-id>
<navigation-case>
<from-outcome>Soma</from-outcome>
<to-view-id>/resultado.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
<application/>
</faces-config>
<!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://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html">
<h:head>Testing Calculator Bean from JSF</h:head>
<body>
<h:form>
<h:panelGrid border="1" columns="2">
<h:outputText value="Primeiro numero"></h:outputText>
<h:inputText value="#{calculatorManagedBean.numero1}" />
<h:outputText value="Segundo numero"></h:outputText>
<h:inputText value="#{calculatorManagedBean.numero2}"/>
</h:panelGrid>
<h:commandButton value="Soma" action="#{calculatorManagedBean.calcula}"/>
</h:form>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>My First EJB</title>
</head>
<body>
<a href="faces/formulario.xhtml">Exemplo com JSF</a><br>
<a href="formulario.html">Exemplo com Servlet</a>
</body>
</html>
\ No newline at end of file
<!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://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html">
<h:head>O resultado</h:head>
<body>
<h:panelGrid border="1" columns="2">
<h:outputLabel value="Numero 1"/>
<h:outputText value="#{calculatorManagedBean.numero1}"/>
<h:outputLabel value="Numero 2"/>
<h:outputText value="#{calculatorManagedBean.numero2}"/>
<h:outputLabel value="Resultado"></h:outputLabel>
<h:outputText value="#{calculatorManagedBean.resultado}"/>
</h:panelGrid>
</body>
</html>
# MyFirstEJB-Calculator
Implementation of the Calculator Bean example from the Book
Enterprise JavaBeans 3.1, 6th Edition
By Andrew Lee Rubinger, Bill Burke
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment