Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Codecrew
/
Moya
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
30
Merge Requests
2
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 30475f1f
authored
Jan 31, 2019
by
Tuomas Riihimäki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rnd
1 parent
e29088ce
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
4 deletions
code/moya-beans/ejbModule/fi/codecrew/moya/facade/VipFacade.java
code/moya-web/WebContent/bill/productSummary.xhtml
code/moya-web/WebContent/vip/viplist.xhtml
code/moya-web/src/main/java/fi/codecrew/moya/web/cdiview/vip/VipListView.java
code/moya-beans/ejbModule/fi/codecrew/moya/facade/VipFacade.java
View file @
30475f1
...
@@ -55,6 +55,8 @@ public class VipFacade extends IntegerPkGenericFacade<Vip> {
...
@@ -55,6 +55,8 @@ public class VipFacade extends IntegerPkGenericFacade<Vip> {
LanEvent
event
=
eventBean
.
getCurrentEvent
();
LanEvent
event
=
eventBean
.
getCurrentEvent
();
cq
.
where
(
cb
.
equal
(
root
.
get
(
Vip_
.
event
),
event
));
cq
.
where
(
cb
.
equal
(
root
.
get
(
Vip_
.
event
),
event
));
cq
.
orderBy
(
cb
.
asc
(
root
.
get
(
Vip_
.
id
)));
return
getEm
().
createQuery
(
cq
).
getResultList
();
return
getEm
().
createQuery
(
cq
).
getResultList
();
}
}
...
...
code/moya-web/WebContent/bill/productSummary.xhtml
View file @
30475f1
...
@@ -25,10 +25,14 @@
...
@@ -25,10 +25,14 @@
<f:selectItem
itemLabel=
"#{i18n['bill.isNotPaid']}"
itemValue=
"false"
/>
<f:selectItem
itemLabel=
"#{i18n['bill.isNotPaid']}"
itemValue=
"false"
/>
</p:selectOneButton>
</p:selectOneButton>
</f:facet>
</f:facet>
<p:link
outcome=
"/bill/edit"
value=
"#{line.bill.id} (#{line.bill.paid?i18n['bill.isPaid']:i18n['bill.isNotPaid']})"
>
<p:link
outcome=
"/bill/edit"
value=
"#{line.bill.id} (#{line.bill.paid ? i18n['bill.isPaid'] : i18n['bill.isNotPaid']})"
>
<f:param
name=
"billid"
value=
"#{line.bill.id}"
/>
<f:param
name=
"billid"
value=
"#{line.bill.id}"
/>
</p:link>
</p:link>
</p:column>
</p:column>
<p:column
headerText=
"#{i18n['bill.notes']}"
>
<h:outputText
value=
"#{line.bill.notes}"
/>
</p:column>
<p:column
sortable=
"true"
sortBy=
"#{line.bill.paidDate}"
headerText=
"#{i18n['bill.paidDate']}"
>
<p:column
sortable=
"true"
sortBy=
"#{line.bill.paidDate}"
headerText=
"#{i18n['bill.paidDate']}"
>
<h:outputText
value=
"#{line.bill.paidDate}"
>
<h:outputText
value=
"#{line.bill.paidDate}"
>
...
...
code/moya-web/WebContent/vip/viplist.xhtml
View file @
30475f1
...
@@ -64,7 +64,7 @@
...
@@ -64,7 +64,7 @@
</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(vip)}"
>
<p:commandButton
id=
"delivebtn"
rendered=
"#{not empty vip.id}"
value=
"#{i18n['vip.deliver']}"
actionListener=
"#{vipListView.deliverDialog(vip
.id
)}"
>
<p:ajax
event=
"dialogReturn"
listener=
"#{vipListView.updateViplist()}"
update=
"products"
/>
<p:ajax
event=
"dialogReturn"
listener=
"#{vipListView.updateViplist()}"
update=
"products"
/>
</p:commandButton>
</p:commandButton>
</p:column>
</p:column>
...
...
code/moya-web/src/main/java/fi/codecrew/moya/web/cdiview/vip/VipListView.java
View file @
30475f1
...
@@ -57,10 +57,12 @@ public class VipListView extends PaginationView<Vip> {
...
@@ -57,10 +57,12 @@ public class VipListView extends PaginationView<Vip> {
initView
();
initView
();
}
}
public
void
deliverDialog
(
Vip
item
)
{
public
void
deliverDialog
(
Integer
vipId
)
{
//getDeliverView().setVip(viplist.getRowData());
//getDeliverView().setVip(viplist.getRowData());
getDeliverView
().
setVip
(
item
);
Vip
vip
=
vipBean
.
find
(
vipId
);
getDeliverView
().
setVip
(
vip
);
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
<>();
...
...
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