Skip to content

Commit

Permalink
Managed Beans JSF Ejericio
Browse files Browse the repository at this point in the history
  • Loading branch information
brian-emarquez committed Aug 9, 2021
1 parent fff8504 commit d94ab20
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -209,3 +209,4 @@
/Ejemplo2MVC/target/
/HolaMundoJSF/target/
/ControlClientes/target/
/ManagedBeansJSF/target/
2 changes: 1 addition & 1 deletion ManagedBeansJSF/nb-configuration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Any value defined here will override the pom.xml file value but is only applicab
-->
<org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_j2eeVersion>1.8-web</org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_j2eeVersion>
<org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_deploy_2e_server>gfv5ee8</org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_deploy_2e_server>
<netbeans.hint.jdkPlatform>JDK 1.8</netbeans.hint.jdkPlatform>
<netbeans.hint.jdkPlatform>JDK_1.8</netbeans.hint.jdkPlatform>
<org-netbeans-modules-maven-jaxws.rest_2e_config_2e_type>ide</org-netbeans-modules-maven-jaxws.rest_2e_config_2e_type>
</properties>
</project-shared-configuration>
21 changes: 21 additions & 0 deletions ManagedBeansJSF/src/main/java/beans/model/Candidato.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package beans.model;

import javax.enterprise.context.RequestScoped;
import javax.inject.Named;

@Named
@RequestScoped
public class Candidato {
private String nombre = "Introduce tu nombre";

public String getNombre() {
return nombre;
}

public void setNombre(String nombre) {
this.nombre = nombre;
}



}
12 changes: 10 additions & 2 deletions ManagedBeansJSF/src/main/webapp/index.xhtml
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html">
<head>
<head>
<title>Hola Mundo JSF</title>
</head>
<body>
<h:outputLabel value="Hola Mundo desde JSF" />
<h:form>
<table>
<tr>
<td><h:outputLabel for="nombre" value="Nombre:"></h:outputLabel></td>
<td><h:inputText id="nombre" value="#{candidato.nombre}"></h:inputText></td>
<td><h:message for="nombre"></h:message></td>
</tr>
</table>
</h:form>
</body>
</html>

0 comments on commit d94ab20

Please sign in to comment.