Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Max Mecklin
/
Moya
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 42255cc4
authored
Feb 05, 2016
by
Tuomas Riihimäki
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'gitViplistFilterFix' into 'master'
Git viplist filter fix See merge request !322
2 parents
1e3b77f3
59358096
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
46 additions
and
28 deletions
code/moya-web/WebContent/info/viplist.xhtml
code/moya-web/WebContent/vip/edit.xhtml
code/moya-web/WebContent/vip/viplist.xhtml
code/moya-web/src/main/java/fi/codecrew/moya/web/cdiview/vip/VipListView.java
code/moya-web/src/main/java/fi/codecrew/moya/web/cdiview/vip/VipView.java
code/moya-web/WebContent/info/viplist.xhtml
View file @
42255cc
...
...
@@ -12,34 +12,37 @@
<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">
<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;" -->
</f:facet>
<p:column
headerText=
"#{i18n['vip.hostsName']}"
style=
"width: 140px;"
>
<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.description}" filterMatchMode="contains" --
>
<
p:column
headerText=
"#{i18n['vip.shortdescr']}"
style=
"width: 170px;"
>
<
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']}"
>
<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}"
>
<
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>
...
...
@@ -57,8 +60,8 @@
</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}"
>
<p:ajax
event=
"dialogReturn"
listener=
"#{vipListView.updateViplist()}"
update=
"
vip
"
/>
<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;"
>
...
...
code/moya-web/WebContent/vip/edit.xhtml
View file @
42255cc
...
...
@@ -26,6 +26,7 @@
<br
/>
<p:commandButton
action=
"#{vipView.save()}"
value=
"#{i18n['vip.save']}"
/>
<!-- p:commandButton action="#{vipView.delete()}" value="#{i18n['vip.delete']}" rendered="#{empty vipView.vip.products}" /-->
<br
/>
</h:form>
<br
/>
...
...
code/moya-web/WebContent/vip/viplist.xhtml
View file @
42255cc
...
...
@@ -13,32 +13,38 @@
<ui:define
name=
"content"
>
<h:form
id=
"vipform"
>
<br
/><br
/>
<p:dataTable
id=
"vipList"
value=
"#{vipListView.viplist}"
widgetVar=
"viplist"
styleClass=
"moya_datatable4"
var=
"vip"
>
<!-- f:facet name="header">
<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;" -->
</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;"
>
<
!-- 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.description}" filterMatchMode="contains" --
>
<
p:column
headerText=
"#{i18n['vip.shortdescr']}"
style=
"width: 170px;"
>
<
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']}"
>
<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}"
>
<
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>
...
...
@@ -56,8 +62,8 @@
</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}"
>
<p:ajax
event=
"dialogReturn"
listener=
"#{vipListView.updateViplist()}"
update=
"
vipList
"
/>
<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: 70px;"
>
...
...
@@ -66,7 +72,7 @@
</h:link>
</p:column>
<p:column
style=
"width: 70px;"
>
<p:commandLink
actionListener=
"#{vipListView.deleteEntry(vip)}"
update=
"vipList"
>
<p:commandLink
actionListener=
"#{vipListView.deleteEntry(vip)}"
update=
"vipList"
rendered=
"#{empty vip.products}"
>
<h:outputText
value=
"#{i18n['vip.delete']}"
/>
</p:commandLink>
</p:column>
...
...
code/moya-web/src/main/java/fi/codecrew/moya/web/cdiview/vip/VipListView.java
View file @
42255cc
...
...
@@ -57,9 +57,12 @@ public class VipListView extends PaginationView<Vip> {
initView
();
}
public
void
deliverDialog
()
{
getDeliverView
().
setVip
(
viplist
.
getRowData
());
public
void
deliverDialog
(
Vip
item
)
{
//getDeliverView().setVip(viplist.getRowData());
getDeliverView
().
setVip
(
item
);
logger
.
info
(
"Set vip in deliverView to {}"
,
deliverView
.
getVip
());
Map
<
String
,
Object
>
options
=
new
HashMap
<>();
options
.
put
(
"modal"
,
true
);
...
...
code/moya-web/src/main/java/fi/codecrew/moya/web/cdiview/vip/VipView.java
View file @
42255cc
...
...
@@ -114,6 +114,11 @@ public class VipView extends GenericCDIView {
vipProducts
=
null
;
}
public
String
delete
()
{
vipBean
.
delete
(
vip
);
return
"/vip/viplist"
;
}
public
List
<
EventUser
>
usersearch
(
String
search
)
{
UserSearchQuery
usq
=
new
UserSearchQuery
();
usq
.
setSearch
(
search
);
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment