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 9da32beb
authored
Oct 25, 2012
by
Riku Silvola
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of codecrew.fi:bortal
2 parents
2dd46485
eb860c94
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
4 deletions
code/LanBortalDatabase/src/fi/insomnia/bortal/model/FoodWaveTemplate.java
code/LanBortalWeb/WebContent/foodadmin/createTemplate.xhtml
code/LanBortalWeb/src/fi/insomnia/bortal/web/cdiview/shop/FoodWaveView.java
code/LanBortalDatabase/src/fi/insomnia/bortal/model/FoodWaveTemplate.java
View file @
9da32be
...
@@ -27,7 +27,7 @@ import org.eclipse.persistence.annotations.OptimisticLockingType;
...
@@ -27,7 +27,7 @@ import org.eclipse.persistence.annotations.OptimisticLockingType;
@Table
(
name
=
"food_wave_templates"
)
@Table
(
name
=
"food_wave_templates"
)
@OptimisticLocking
(
type
=
OptimisticLockingType
.
CHANGED_COLUMNS
)
@OptimisticLocking
(
type
=
OptimisticLockingType
.
CHANGED_COLUMNS
)
public
class
FoodWaveTemplate
extends
GenericEntity
{
public
class
FoodWaveTemplate
extends
GenericEntity
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
String
EVENT_ID
=
"event_id"
;
private
static
final
String
EVENT_ID
=
"event_id"
;
...
...
code/LanBortalWeb/WebContent/foodadmin/createTemplate.xhtml
View file @
9da32be
...
@@ -62,9 +62,7 @@
...
@@ -62,9 +62,7 @@
update=
"productTable"
/>
update=
"productTable"
/>
</h:panelGrid>
</h:panelGrid>
<p:dataTable
name=
"productTable"
id=
"productTable"
<p:dataTable
name=
"productTable"
id=
"productTable"
value=
"#{foodWaveView.template.products}"
var=
"product"
editable=
"true"
>
value=
"#{foodWaveView.template.products}"
var=
"product"
editable=
"true"
>
<p:column
headerText=
"#{i18n['foodwavetemplate.productname']}"
>
<p:column
headerText=
"#{i18n['foodwavetemplate.productname']}"
>
<p:cellEditor>
<p:cellEditor>
<f:facet
name=
"output"
>
<f:facet
name=
"output"
>
...
@@ -99,8 +97,13 @@
...
@@ -99,8 +97,13 @@
<p:column
headerText=
"Options"
style=
"width:50px"
>
<p:column
headerText=
"Options"
style=
"width:50px"
>
<p:rowEditor
/>
<p:rowEditor
/>
</p:column>
</p:column>
<p:column
headerText=
"#{i18n['foodwavetemplate.actions']}"
style=
"width:20px;"
>
<p:rowEditor
/>
<p:commandButton
value=
"#{i18n['foodwavetemplate.removeFromList']}"
action=
"#{foodWaveView.removeProductFromList(product)}"
update=
"productTable"
/>
</p:column>
</p:dataTable>
</p:dataTable>
</p:tab>
</p:tab>
</p:wizard>
</p:wizard>
</h:form>
</h:form>
...
...
code/LanBortalWeb/src/fi/insomnia/bortal/web/cdiview/shop/FoodWaveView.java
View file @
9da32be
...
@@ -176,4 +176,8 @@ public class FoodWaveView extends GenericCDIView {
...
@@ -176,4 +176,8 @@ public class FoodWaveView extends GenericCDIView {
this
.
templateId
=
templateId
;
this
.
templateId
=
templateId
;
}
}
public
void
removeProductFromList
(
Product
product
)
{
template
.
getProducts
().
remove
(
product
);
}
}
}
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