viplist.xhtml
3.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:p="http://primefaces.org/ui" xmlns:shop="http://java.sun.com/jsf/composite/cditools/shop" xmlns:reader="http://java.sun.com/jsf/composite/cditools/reader"
xmlns:tools="http://java.sun.com/jsf/composite/cditools" xmlns:user="http://java.sun.com/jsf/composite/cditools/user" xmlns:infoview="http://java.sun.com/jsf/composite/cditools/infoview">
<h:body>
<ui:composition template="/resources/templates/#{sessionHandler.infoscreen}/template.xhtml">
<ui:param name="ignorenavigationleft" value="true" />
<f:metadata>
<f:event type="preRenderView" listener="#{vipListView.initView}" />
</f:metadata>
<ui:define name="content">
<br /><br />
<h:form id="vipform">
<p:dataTable id="vip" value="#{vipListView.viplist}" widgetVar="viplist" styleClass="moya_datatable4" var="vip" >
<f:facet name="header">
<p:outputPanel>
<h:outputText value="Search all fields:" />
<p:inputText id="globalFilter" onkeyup="PF('viplist').filter()" style="width:150px" placeholder="Enter keyword" />
</p:outputPanel>
</f:facet>
<p:column headerText="#{i18n['vip.hostsName']}" filterBy="#{vip.host.wholeName}" filterMatchMode="contains" style="width: 140px;">
<!-- <p:column headerText="#{i18n['vip.hostsName']}" style="width: 140px;"> -->
<h:outputText id="viphostsname" value="#{vip.host.wholeName}" />
<p:tooltip id="viphostsnamephone" for="viphostsname" value="#{vip.host.phone}" />
</p:column>
<p:column headerText="#{i18n['vip.description']}" filterBy="#{vip.shortDisplayDescr}" filterMatchMode="contains">
<!-- <p:column headerText="#{i18n['vip.shortdescr']}" style="width: 170px;"> -->
<h:outputText id="vipdescr" value="#{vip.shortDisplayDescr}" title="#{vip.description}" />
</p:column>
<p:column headerText="#{i18n['vip.description']}" filterBy="#{vip.description}" filterMatchMode="contains">
<h:outputText value="#{vip.description}"/>
</p:column>
<p:column filterBy="#{vip.searchableProductnames}" filterMatchMode="contains" headerText="#{i18n['vip.products']} | #{i18n['vip.productQuantity']} | #{i18n['vip.productDelivered']}">
<!-- p:column headerText="#{i18n['vip.products']} | #{i18n['vip.productQuantity']} | #{i18n['vip.productDelivered']}" -->
<h:dataTable border="0" var="prod" value="#{vip.products}" id="products">
<p:column>
<h:outputText title="#{prod.notes}" value="#{prod.productName}" />
</p:column>
<p:column>
<h:outputText value="#{prod.quantity}">
<f:convertNumber maxFractionDigits="3" minFractionDigits="0" />
</h:outputText>
</p:column>
<p:column>
<h:outputText value="#{prod.delivered}">
<f:convertNumber maxFractionDigits="3" minFractionDigits="0" />
</h:outputText>
</p:column>
</h:dataTable>
</p:column>
<p:column style="width: 90px; text-align: center;">
<p:commandButton id="delivebtn" rendered="#{not empty vip.id}" value="#{i18n['vip.deliver']}" actionListener="#{vipListView.deliverDialog(vip)}" >
<p:ajax event="dialogReturn" listener="#{vipListView.updateViplist()}" update="products" />
</p:commandButton>
</p:column>
<p:column style="width: 90px;">
<h:link outcome="/vip/edit" value="#{i18n['vip.edit']}" >
<f:param name="id" value="#{vip.id}" />
</h:link>
</p:column>
</p:dataTable>
</h:form>
</ui:define>
<ui:define name="sidebar">
</ui:define>
</ui:composition>
</h:body>
</html>