Skip to content

Instantly share code, notes, and snippets.

@SakaDream
Created July 26, 2017 12:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SakaDream/ba22fb5dc35801704ee22838de0f98a8 to your computer and use it in GitHub Desktop.
Save SakaDream/ba22fb5dc35801704ee22838de0f98a8 to your computer and use it in GitHub Desktop.
<?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" xml:lang="en" lang="en"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:b="http://bootsfaces.net/ui"
xmlns:c="http://java.sun.com/jsp/jstl/core">
<h:head>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Edit Employee - JSF Application</title>
</h:head>
<h:body style="padding: 60px; min-height: 2000px;">
<b:navBar brand="JSF Example" brandHref="#" fixed="top" inverse="true">
<b:navbarLinks>
<b:form>
<b:commandButton look="default" action="#{login.logout()}" value="Logout"></b:commandButton>
</b:form>
</b:navbarLinks>
</b:navBar>
<b:container>
<b:form id="editForm">
<c:set value="#{emp.getEmployee()}" var="employee"/>
<legend>Edit Employee</legend>
<h:inputHidden id="id" name="id" value="#{employee.id}"/>
<b:inputText id="fullName" name="fullName" value="#{employee.fullName}" placeholder="Full Name" required="true">
<f:facet name="prepend">
<b:icon name="user" />
</f:facet>
</b:inputText>
<b:inputText id="address" name="address" value="#{employee.address}" placeholder="Address" required="true">
<f:facet name="prepend">
<b:icon name="home" />
</f:facet>
</b:inputText>
<b:inputText id="email" name="email" value="#{employee.email}" placeholder="Email" required="true">
<f:facet name="prepend">
<b:icon name="inbox" />
</f:facet>
</b:inputText>
<b:inputText id="phone" name="phone" value="#{employee.phone}" placeholder="Phone" required="true">
<f:facet name="prepend">
<b:icon name="phone-alt" />
</f:facet>
</b:inputText>
<b:inputText id="salary" name="salary" value="#{employee.salary}" placeholder="Salary" required="true">
<f:facet name="prepend">
<b:icon name="usd" />
</f:facet>
</b:inputText>
<b:commandButton look="primary" style="margin-right: 10px" action="#{emp.editEmployee()}" value="Edit"></b:commandButton>
<b:button look="default" outcome="home" value="Back to Home"></b:button>
</b:form>
</b:container>
</h:body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment