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 59358096
authored
Feb 05, 2016
by
Tuukka Kivilahti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed filters
1 parent
0b8e3237
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 @
5935809
...
@@ -12,34 +12,37 @@
...
@@ -12,34 +12,37 @@
<f:event
type=
"preRenderView"
listener=
"#{vipListView.initView}"
/>
<f:event
type=
"preRenderView"
listener=
"#{vipListView.initView}"
/>
</f:metadata>
</f:metadata>
<ui:define
name=
"content"
>
<ui:define
name=
"content"
>
<br
/><br
/>
<h:form
id=
"vipform"
>
<h:form
id=
"vipform"
>
<p:dataTable
id=
"vip"
value=
"#{vipListView.viplist}"
widgetVar=
"viplist"
styleClass=
"moya_datatable4"
var=
"vip"
>
<p:dataTable
id=
"vip"
value=
"#{vipListView.viplist}"
widgetVar=
"viplist"
styleClass=
"moya_datatable4"
var=
"vip"
>
<!-- f:facet name="header">
<f:facet
name=
"header"
>
<p:outputPanel>
<p:outputPanel>
<h:outputText
value=
"Search all fields:"
/>
<h:outputText
value=
"Search all fields:"
/>
<p:inputText
id=
"globalFilter"
onkeyup=
"PF('viplist').filter()"
style=
"width:150px"
placeholder=
"Enter keyword"
/>
<p:inputText
id=
"globalFilter"
onkeyup=
"PF('viplist').filter()"
style=
"width:150px"
placeholder=
"Enter keyword"
/>
</p:outputPanel>
</p:outputPanel>
</f:facet -->
</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']}"
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}"
/>
<h:outputText
id=
"viphostsname"
value=
"#{vip.host.wholeName}"
/>
<p:tooltip
id=
"viphostsnamephone"
for=
"viphostsname"
value=
"#{vip.host.phone}"
/>
<p:tooltip
id=
"viphostsnamephone"
for=
"viphostsname"
value=
"#{vip.host.phone}"
/>
</p:column>
</p:column>
<
!-- p:column headerText="#{i18n['vip.description']}" filterBy="#{vip.description}" filterMatchMode="contains" --
>
<
p:column
headerText=
"#{i18n['vip.description']}"
filterBy=
"#{vip.shortDisplayDescr}"
filterMatchMode=
"contains"
>
<
p:column
headerText=
"#{i18n['vip.shortdescr']}"
style=
"width: 170px;"
>
<
!-- <p:column headerText="#{i18n['vip.shortdescr']}" style="width: 170px;"> --
>
<h:outputText
id=
"vipdescr"
value=
"#{vip.shortDisplayDescr}"
title=
"#{vip.description}"
/>
<h:outputText
id=
"vipdescr"
value=
"#{vip.shortDisplayDescr}"
title=
"#{vip.description}"
/>
</p:column>
</p:column>
<p:column
headerText=
"#{i18n['vip.description']}"
>
<p:column
headerText=
"#{i18n['vip.description']}"
filterBy=
"#{vip.description}"
filterMatchMode=
"contains"
>
<h:outputText
value=
"#{vip.description}"
/>
<h:outputText
value=
"#{vip.description}"
/>
</p:column>
</p:column>
<
!-- p:column filterBy="#{vip.searchableProductnames}" filterMatchMode="contains" headerText="#{i18n['vip.products']} | #{i18n['vip.productQuantity']} | #{i18n['vip.productDelivered']}" --
>
<
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']}"
>
<
!-- p:column headerText="#{i18n['vip.products']} | #{i18n['vip.productQuantity']} | #{i18n['vip.productDelivered']}" --
>
<h:dataTable
border=
"0"
var=
"prod"
value=
"#{vip.products}"
>
<h:dataTable
border=
"0"
var=
"prod"
value=
"#{vip.products}"
id=
"products"
>
<p:column>
<p:column>
<h:outputText
title=
"#{prod.notes}"
value=
"#{prod.productName}"
/>
<h:outputText
title=
"#{prod.notes}"
value=
"#{prod.productName}"
/>
</p:column>
</p:column>
...
@@ -57,8 +60,8 @@
...
@@ -57,8 +60,8 @@
</p:column>
</p:column>
<p:column
style=
"width: 90px; text-align: center;"
>
<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:commandButton
id=
"delivebtn"
rendered=
"#{not empty vip.id}"
value=
"#{i18n['vip.deliver']}"
actionListener=
"#{vipListView.deliverDialog
(vip)
}"
>
<p:ajax
event=
"dialogReturn"
listener=
"#{vipListView.updateViplist()}"
update=
"
vip
"
/>
<p:ajax
event=
"dialogReturn"
listener=
"#{vipListView.updateViplist()}"
update=
"
products
"
/>
</p:commandButton>
</p:commandButton>
</p:column>
</p:column>
<p:column
style=
"width: 90px;"
>
<p:column
style=
"width: 90px;"
>
...
...
code/moya-web/WebContent/vip/edit.xhtml
View file @
5935809
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
<br
/>
<br
/>
<p:commandButton
action=
"#{vipView.save()}"
value=
"#{i18n['vip.save']}"
/>
<p:commandButton
action=
"#{vipView.save()}"
value=
"#{i18n['vip.save']}"
/>
<!-- p:commandButton action="#{vipView.delete()}" value="#{i18n['vip.delete']}" rendered="#{empty vipView.vip.products}" /-->
<br
/>
<br
/>
</h:form>
</h:form>
<br
/>
<br
/>
...
...
code/moya-web/WebContent/vip/viplist.xhtml
View file @
5935809
...
@@ -13,32 +13,38 @@
...
@@ -13,32 +13,38 @@
<ui:define
name=
"content"
>
<ui:define
name=
"content"
>
<h:form
id=
"vipform"
>
<h:form
id=
"vipform"
>
<br
/><br
/>
<p:dataTable
id=
"vipList"
value=
"#{vipListView.viplist}"
widgetVar=
"viplist"
styleClass=
"moya_datatable4"
var=
"vip"
>
<p:dataTable
id=
"vipList"
value=
"#{vipListView.viplist}"
widgetVar=
"viplist"
styleClass=
"moya_datatable4"
var=
"vip"
>
<!-- f:facet name="header">
<f:facet
name=
"header"
>
<p:outputPanel>
<p:outputPanel>
<h:outputText
value=
"Search all fields:"
/>
<h:outputText
value=
"Search all fields:"
/>
<p:inputText
id=
"globalFilter"
onkeyup=
"PF('viplist').filter()"
style=
"width:150px"
placeholder=
"Enter keyword"
/>
<p:inputText
id=
"globalFilter"
onkeyup=
"PF('viplist').filter()"
style=
"width:150px"
placeholder=
"Enter keyword"
/>
</p:outputPanel>
</p:outputPanel>
</f:facet -->
</f:facet>
<!-- p:column headerText="#{i18n['vip.hostsName']}" filterBy="#{vip.host.wholeName}" filterMatchMode="contains" 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;"
>
<
!-- p:column headerText="#{i18n['vip.hostsName']}" style="width: 140px;" --
>
<h:outputText
id=
"viphostsname"
value=
"#{vip.host.wholeName}"
/>
<h:outputText
id=
"viphostsname"
value=
"#{vip.host.wholeName}"
/>
<p:tooltip
id=
"viphostsnamephone"
for=
"viphostsname"
value=
"#{vip.host.phone}"
/>
<p:tooltip
id=
"viphostsnamephone"
for=
"viphostsname"
value=
"#{vip.host.phone}"
/>
</p:column>
</p:column>
<
!-- p:column headerText="#{i18n['vip.description']}" filterBy="#{vip.description}" filterMatchMode="contains" --
>
<
p:column
headerText=
"#{i18n['vip.description']}"
filterBy=
"#{vip.shortDisplayDescr}"
filterMatchMode=
"contains"
>
<
p:column
headerText=
"#{i18n['vip.shortdescr']}"
style=
"width: 170px;"
>
<
!-- p:column headerText="#{i18n['vip.shortdescr']}" style="width: 170px;" --
>
<h:outputText
id=
"vipdescr"
value=
"#{vip.shortDisplayDescr}"
title=
"#{vip.description}"
/>
<h:outputText
id=
"vipdescr"
value=
"#{vip.shortDisplayDescr}"
title=
"#{vip.description}"
/>
</p:column>
</p:column>
<p:column
headerText=
"#{i18n['vip.description']}"
>
<p:column
headerText=
"#{i18n['vip.description']}"
filterBy=
"#{vip.description}"
filterMatchMode=
"contains"
>
<h:outputText
value=
"#{vip.description}"
/>
<h:outputText
value=
"#{vip.description}"
/>
</p:column>
</p:column>
<
!-- p:column filterBy="#{vip.searchableProductnames}" filterMatchMode="contains" headerText="#{i18n['vip.products']} | #{i18n['vip.productQuantity']} | #{i18n['vip.productDelivered']}" --
>
<
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']}"
>
<
!-- p:column headerText="#{i18n['vip.products']} | #{i18n['vip.productQuantity']} | #{i18n['vip.productDelivered']}" --
>
<h:dataTable
border=
"0"
var=
"prod"
value=
"#{vip.products}"
>
<h:dataTable
border=
"0"
var=
"prod"
value=
"#{vip.products}"
id=
"products"
>
<p:column>
<p:column>
<h:outputText
title=
"#{prod.notes}"
value=
"#{prod.productName}"
/>
<h:outputText
title=
"#{prod.notes}"
value=
"#{prod.productName}"
/>
</p:column>
</p:column>
...
@@ -56,8 +62,8 @@
...
@@ -56,8 +62,8 @@
</p:column>
</p:column>
<p:column
style=
"width: 90px; text-align: center;"
>
<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:commandButton
id=
"delivebtn"
rendered=
"#{not empty vip.id}"
value=
"#{i18n['vip.deliver']}"
actionListener=
"#{vipListView.deliverDialog
(vip)
}"
>
<p:ajax
event=
"dialogReturn"
listener=
"#{vipListView.updateViplist()}"
update=
"
vipList
"
/>
<p:ajax
event=
"dialogReturn"
listener=
"#{vipListView.updateViplist()}"
update=
"
products
"
/>
</p:commandButton>
</p:commandButton>
</p:column>
</p:column>
<p:column
style=
"width: 70px;"
>
<p:column
style=
"width: 70px;"
>
...
@@ -66,7 +72,7 @@
...
@@ -66,7 +72,7 @@
</h:link>
</h:link>
</p:column>
</p:column>
<p:column
style=
"width: 70px;"
>
<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']}"
/>
<h:outputText
value=
"#{i18n['vip.delete']}"
/>
</p:commandLink>
</p:commandLink>
</p:column>
</p:column>
...
...
code/moya-web/src/main/java/fi/codecrew/moya/web/cdiview/vip/VipListView.java
View file @
5935809
...
@@ -57,9 +57,12 @@ public class VipListView extends PaginationView<Vip> {
...
@@ -57,9 +57,12 @@ public class VipListView extends PaginationView<Vip> {
initView
();
initView
();
}
}
public
void
deliverDialog
()
{
public
void
deliverDialog
(
Vip
item
)
{
getDeliverView
().
setVip
(
viplist
.
getRowData
());
//getDeliverView().setVip(viplist.getRowData());
getDeliverView
().
setVip
(
item
);
logger
.
info
(
"Set vip in deliverView to {}"
,
deliverView
.
getVip
());
logger
.
info
(
"Set vip in deliverView to {}"
,
deliverView
.
getVip
());
Map
<
String
,
Object
>
options
=
new
HashMap
<>();
Map
<
String
,
Object
>
options
=
new
HashMap
<>();
options
.
put
(
"modal"
,
true
);
options
.
put
(
"modal"
,
true
);
...
...
code/moya-web/src/main/java/fi/codecrew/moya/web/cdiview/vip/VipView.java
View file @
5935809
...
@@ -114,6 +114,11 @@ public class VipView extends GenericCDIView {
...
@@ -114,6 +114,11 @@ public class VipView extends GenericCDIView {
vipProducts
=
null
;
vipProducts
=
null
;
}
}
public
String
delete
()
{
vipBean
.
delete
(
vip
);
return
"/vip/viplist"
;
}
public
List
<
EventUser
>
usersearch
(
String
search
)
{
public
List
<
EventUser
>
usersearch
(
String
search
)
{
UserSearchQuery
usq
=
new
UserSearchQuery
();
UserSearchQuery
usq
=
new
UserSearchQuery
();
usq
.
setSearch
(
search
);
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