<?xml version="1.0" encoding="UTF-8" ?>
-<ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"
- xmlns="http://www.w3.org/1999/xhtml"
- xmlns:widgets="http://mxchange.org/jsf/core/widgets"
- xmlns:links="http://mxchange.org/jsf/core/links"
- 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:p="http://primefaces.org/ui">
-
- <ui:define name="admin_title">
+<ui:composition
+ template="/WEB-INF/templates/admin/admin_base.tpl"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:core="http://mxchange.org/jsf/core/widgets"
+ xmlns:links="http://mxchange.org/jsf/core/links"
+ 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:p="http://primefaces.org/ui"
+ >
+
+ <ui:define name="document_admin_title">
<h:outputText value="#{msg.PAGE_TITLE_ADMIN_LIST_CONTACT}" />
</ui:define>
</ui:define>
<ui:define name="content">
- <p:dataTable id="table_list_contacts" var="contact" value="#{contactController.allContacts()}" tableStyleClass="table table-full" paginator="true" rows="10" summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_CONTACT}" emptyMessage="#{msg.ADMIN_CONTACT_LIST_EMPTY}">
- <p:column>
- <f:facet name="header">
- <h:outputText value="#{msg.ADMIN_CONTACT_ID}" />
- </f:facet>
-
- <p:link outcome="admin_show_contact" title="#{msg.ADMIN_LINK_SHOW_CONTACT_DATA_TITLE}" value="#{contact.contactId}">
- <f:param name="contactId" value="#{contact.contactId}" />
- </p:link>
- </p:column>
-
- <p:column>
- <f:facet name="header">
- <h:outputText value="#{msg.ADMIN_CONTACT_PERSONAL_TITLE}" />
- </f:facet>
-
- <h:outputText value="#{msg[contact.contactPersonalTitle.messageKey]}" />
- </p:column>
-
- <p:column>
- <f:facet name="header">
- <h:outputText value="#{msg.ADMIN_CONTACT_FIRST_NAME}" />
- </f:facet>
-
- <h:outputText value="#{contact.contactFirstName}" />
- </p:column>
-
- <p:column>
- <f:facet name="header">
- <h:outputText value="#{msg.ADMIN_CONTACT_FAMILY_NAME}" />
- </f:facet>
-
- <h:outputText value="#{contact.contactFamilyName}" />
- </p:column>
-
- <p:column>
- <f:facet name="header">
- <h:outputText value="#{msg.ADMIN_CONTACT_USAGE}" />
- </f:facet>
-
- <h:outputText value="#{msg[beanHelper.getContactUsageMessageKey(contact)]}" />
- </p:column>
+ <h:form id="form-list-contacts">
+ <p:dataTable
+ id="contactList"
+ var="contact"
+ value="#{contactController.allContacts()}"
+ paginator="true"
+ rows="10"
+ summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_CONTACT}"
+ emptyMessage="#{msg.ADMIN_EMPTY_LIST_CONTACT}"
+ widgetVar="contactList"
+ >
+ <p:column>
+ <f:facet name="header">
+ <h:outputText value="#{msg.ADMIN_CONTACT_ID}" />
+ </f:facet>
+
+ <p:link outcome="admin_show_contact" title="#{msg.ADMIN_LINK_SHOW_CONTACT_DATA_TITLE}" value="#{contact.contactId}">
+ <f:param name="contactId" value="#{contact.contactId}" />
+ </p:link>
+ </p:column>
+
+ <p:column>
+ <f:facet name="header">
+ <h:outputText value="#{msg.ADMIN_CONTACT_PERSONAL_TITLE}" />
+ </f:facet>
+
+ <h:outputText value="#{msg[contact.contactPersonalTitle.messageKey]}" />
+ </p:column>
+
+ <p:column>
+ <f:facet name="header">
+ <h:outputText value="#{msg.ADMIN_CONTACT_FIRST_NAME}" />
+ </f:facet>
+
+ <h:outputText value="#{contact.contactFirstName}" />
+ </p:column>
+
+ <p:column>
+ <f:facet name="header">
+ <h:outputText value="#{msg.ADMIN_CONTACT_FAMILY_NAME}" />
+ </f:facet>
+
+ <h:outputText value="#{contact.contactFamilyName}" />
+ </p:column>
+
+ <p:column>
+ <f:facet name="header">
+ <h:outputText value="#{msg.ADMIN_CONTACT_USAGE}" />
+ </f:facet>
+
+ <h:outputText value="#{msg[beanHelper.getContactUsageMessageKey(contact)]}" />
+ </p:column>
+
+ <p:column>
+ <f:facet name="header">
+ <h:outputText value="#{msg.ENTRY_CREATED_HEADER}" />
+ </f:facet>
+
+ <h:outputText id="contactCreated" value="#{contact.contactCreated}">
+ <f:convertDateTime type="both" timeStyle="short" dateStyle="short" />
+ </h:outputText>
+ </p:column>
+
+ <p:column>
+ <f:facet name="header">
+ <h:outputText value="#{msg.ADMIN_ACTION_LINKS_HEADER}" />
+ </f:facet>
+
+ <links:outputContactAdminMiniLinks contact="#{contact}" />
+ </p:column>
+ </p:dataTable>
+ </h:form>
- <p:column>
+ <h:form>
+ <p:panelGrid
+ columns="1"
+ layout="grid"
+ >
<f:facet name="header">
- <h:outputText value="#{msg.ADMIN_LIST_ENTRY_CREATED}" />
+ <h:outputText value="#{msg.ADMIN_ADD_CONTACT_TITLE}" />
</f:facet>
- <h:outputText id="contactCreated" value="#{contact.contactCreated.time}">
- <f:convertDateTime for="contactCreated" type="both" timeStyle="short" dateStyle="short" />
- </h:outputText>
- </p:column>
-
- <p:column>
- <f:facet name="header">
- <h:outputText value="#{msg.ADMIN_ACTION_LINKS}" />
+ <h:outputText value="#{msg.ADMIN_ADD_CONTACT_MINIMUM_DATA}" />
+
+ <core:outputAdminContactDataFormFields allowEmptyRequiredData="true" />
+
+ <f:facet name="footer">
+ <p:commandButton
+ styleClass="reset"
+ type="reset"
+ value="#{msg.BUTTON_RESET_FORM}"
+ />
+ <p:commandButton
+ process="@form"
+ type="submit"
+ value="#{msg.BUTTON_ADMIN_ADD_CONTACT}"
+ action="#{adminContactController.addContact()}"
+ update=":master:form-list-contacts:contactList"
+ />
</f:facet>
-
- <links:outputContactAdminMiniLinks contact="#{contact}" />
- </p:column>
- </p:dataTable>
-
- <h:form id="form_admin_add_contact">
- <h:panelGroup styleClass="table table-medium" layout="block">
- <div class="table-header">
- <h:outputText value="#{msg.ADMIN_ADD_CONTACT_TITLE}" />
- </div>
-
- <div class="para">
- <h:outputText value="#{msg.ADMIN_ADD_CONTACT_MINIMUM_DATA}" />
- </div>
-
- <widgets:outputAdminContactDataFormFields />
-
- <div class="table-footer">
- <p:commandButton styleClass="reset divider-right" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
- <p:commandButton styleClass="submit" type="submit" id="button_add_contact" value="#{msg.BUTTON_ADMIN_ADD_CONTACT}" action="#{adminContactController.addContact()}" />
- </div>
- </h:panelGroup>
+ </p:panelGrid>
</h:form>
</ui:define>
</ui:composition>