Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Antti Väyrynen
/
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 653d2668
authored
Oct 27, 2012
by
Antti Tönkyrä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reverse-jyräys :)
1 parent
5d97b618
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
7 deletions
code/LanBortalWeb/src/fi/insomnia/bortal/web/cdiview/shop/FoodWaveView.java
code/LanBortalWeb/src/fi/insomnia/bortal/web/cdiview/shop/FoodWaveView.java
View file @
653d266
...
...
@@ -67,7 +67,7 @@ public class FoodWaveView extends GenericCDIView {
private
Integer
foodWaveId
;
private
ListDataModel
<
AccountEvent
>
accountEventLines
;
private
List
<
FoodWave
>
foodWaves
;
private
List
DataModel
<
FoodWave
>
foodWaves
;
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
FoodWaveView
.
class
);
public
List
<
Product
>
getProducts
()
{
...
...
@@ -79,6 +79,11 @@ public class FoodWaveView extends GenericCDIView {
public
void
onEdit
()
{
this
.
foodWaveBean
.
saveTemplate
(
template
);
}
public
void
onEditFoodWave
()
{
FoodWave
fw
=
foodWaves
.
getRowData
();
this
.
foodWaveBean
.
merge
(
fw
);
}
public
void
initTemplateList
()
{
super
.
requirePermissions
(
ShopPermission
.
SHOP_FOODWAVE
);
...
...
@@ -87,7 +92,11 @@ public class FoodWaveView extends GenericCDIView {
public
void
initFoodwaveManagerList
()
{
if
(
super
.
requirePermissions
(
ShopPermission
.
MANAGE_FOODWAVES
))
{
foodWaves
=
foodWaveBean
.
getEventFoodWaves
();
if
(
foodWaves
==
null
)
{
super
.
beginConversation
();
foodWaves
=
new
ListDataModel
<
FoodWave
>(
foodWaveBean
.
getEventFoodWaves
());
}
}
}
...
...
@@ -110,9 +119,9 @@ public class FoodWaveView extends GenericCDIView {
if
(
templateId
!=
null
)
{
template
=
foodWaveBean
.
findTemplate
(
templateId
);
foodWaves
=
template
.
getFoodwaves
(
);
foodWaves
=
new
ListDataModel
<
FoodWave
>(
template
.
getFoodwaves
()
);
}
else
{
foodWaves
=
foodWaveBean
.
getOpenFoodWaves
(
);
foodWaves
=
new
ListDataModel
<
FoodWave
>(
foodWaveBean
.
getOpenFoodWaves
()
);
}
super
.
beginConversation
();
}
...
...
@@ -235,7 +244,8 @@ public class FoodWaveView extends GenericCDIView {
public
String
deliverAccountEvent
()
{
if
(
getAccountEventLines
().
isRowAvailable
())
{
AccountEvent
e
=
getAccountEventLines
().
getRowData
();
e
=
accountEventBean
.
markDelivered
(
e
,
Calendar
.
getInstance
());
e
.
setDelivered
(
Calendar
.
getInstance
());
e
=
accountEventBean
.
merge
(
e
);
foodWaveId
=
selectedFoodWave
.
getId
();
selectedFoodWave
=
null
;
...
...
@@ -334,11 +344,11 @@ public class FoodWaveView extends GenericCDIView {
this
.
billLines
=
billLines
;
}
public
void
setFoodWaves
(
List
<
FoodWave
>
foodWaves
)
{
public
void
setFoodWaves
(
List
DataModel
<
FoodWave
>
foodWaves
)
{
this
.
foodWaves
=
foodWaves
;
}
public
List
<
FoodWave
>
getFoodWaves
()
{
public
List
DataModel
<
FoodWave
>
getFoodWaves
()
{
return
foodWaves
;
}
...
...
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