blob: 012e78a61d9123edd97e5e608c796c4d8dc41206 [file] [log] [blame]
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<ui:composition template="/WEB-INF/facelets/templates/layout.xhtml"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:e="http://java.sun.com/jsf/composite/empire"
xmlns:sample="http://java.sun.com/jsf/composite/components"
xmlns:h="http://java.sun.com/jsf/html">
<f:metadata>
<f:viewParam name="action" value="#{page.action}" />
<f:viewParam name="id" value="#{page.idParam}" />
</f:metadata>
<!-- parameters used in layout.xhtml -->
<ui:param name="pageTitle" value="#{msg.employeeDetail_title}" />
<ui:param name="contentStyle" value="unstyled" />
<!-- content -->
<ui:define name="content">
<h:form id="employeeDetail">
<e:tabView minHeight="400px" activeIndex="#{page.activeTab}" tabChangedListener="#{page.onTabChanged}">
<e:tabPage title="#{msg.employeeDetail_tab_basic}" id="tabBasic">
<e:record value="#{page.employeeRecord}">
<!-- input form -->
<sample:formPanel>
<tr><e:control column="#{db.EMPLOYEES.SALUTATION}" /></tr>
<tr><e:control column="#{db.EMPLOYEES.FIRST_NAME}" /></tr>
<tr><e:control column="#{db.EMPLOYEES.LAST_NAME}" /></tr>
<tr><e:control column="#{db.EMPLOYEES.DATE_OF_BIRTH}"/></tr>
<tr><e:control column="#{db.EMPLOYEES.DEPARTMENT_ID}" /></tr>
<tr><e:control column="#{db.EMPLOYEES.GENDER}" /> </tr>
<tr><e:control column="#{db.EMPLOYEES.PHONE_NUMBER}" /></tr>
<tr><e:control column="#{db.EMPLOYEES.EMAIL}" /></tr>
<tr><e:control column="#{db.EMPLOYEES.SALARY}" /></tr>
<tr><e:control column="#{db.EMPLOYEES.RETIRED}" /></tr>
<tr><e:control column="#{db.EMPLOYEES.UPDATE_TIMESTAMP}"/></tr>
</sample:formPanel>
</e:record>
</e:tabPage>
<e:tabPage title="#{msg.employeeDetail_tab_extended}" id="tabExtended" disabled="#{not page.employeeRecord.exists}">
<h3><h:outputText value="#{msg.employeeDetail_payments}"/></h3>
<!-- Payment data -->
<h:dataTable id="paymentData" value="#{page.payments}" var="item" rowClasses="odd,even">
<h:column>
<f:facet name="header">
<e:title column="#{db.PAYMENTS.YEAR}" />
</f:facet>
<e:value record="#{item}" column="#{db.PAYMENTS.YEAR}"/>
</h:column>
<h:column>
<f:facet name="header">
<e:title column="#{db.PAYMENTS.MONTH}" />
</f:facet>
<e:value record="#{item}" column="#{db.PAYMENTS.MONTH}"/>
</h:column>
<h:column>
<f:facet name="header">
<e:title column="#{db.PAYMENTS.AMOUNT}" />
</f:facet>
<e:value record="#{item}" column="#{db.PAYMENTS.AMOUNT}"/>
</h:column>
</h:dataTable>
<h:panelGroup layout="block" styleClass="info-msg">
<h:outputText value="#{msg.employeeDetail_msg_extended}"/>
</h:panelGroup>
</e:tabPage>
</e:tabView>
<!-- button bar -->
<h:panelGroup styleClass="buttonBar" layout="block">
<h:commandLink value="#{msg.employeeDetail_back}" action="#{page.doCancel}" immediate="true" />
<h:commandLink value="#{msg.employeeDetail_delete}" action="#{page.doDelete}" immediate="true" rendered="#{page.employeeRecord.exists}" />
<h:commandLink value="#{msg.employeeDetail_save}" action="#{page.doSave}" />
<h:commandLink value="#{msg.employeeDetail_test}" actionListener="#{page.doTestSerialization}" />
</h:panelGroup>
</h:form>
</ui:define>
</ui:composition>