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 49255165
authored
Jun 04, 2015
by
Juho Juopperi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vip-listan poista-nappi
1 parent
ae3b0ab6
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
25 additions
and
3 deletions
code/moya-beans-client/ejbModule/fi/codecrew/moya/beans/VipBeanLocal.java
code/moya-beans/ejbModule/fi/codecrew/moya/beans/VipBean.java
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/resources/fi/codecrew/moya/resources/i18n.properties
code/moya-web/src/main/resources/fi/codecrew/moya/resources/i18n_en.properties
code/moya-web/src/main/resources/fi/codecrew/moya/resources/i18n_fi.properties
code/moya-beans-client/ejbModule/fi/codecrew/moya/beans/VipBeanLocal.java
View file @
4925516
...
@@ -20,6 +20,8 @@ public interface VipBeanLocal {
...
@@ -20,6 +20,8 @@ public interface VipBeanLocal {
void
create
(
Vip
vip
);
void
create
(
Vip
vip
);
void
delete
(
Vip
vip
);
Vip
find
(
Integer
id
);
Vip
find
(
Integer
id
);
Vip
createProduct
(
VipProduct
l
);
Vip
createProduct
(
VipProduct
l
);
...
...
code/moya-beans/ejbModule/fi/codecrew/moya/beans/VipBean.java
View file @
4925516
...
@@ -69,6 +69,12 @@ public class VipBean implements VipBeanLocal {
...
@@ -69,6 +69,12 @@ public class VipBean implements VipBeanLocal {
}
}
@Override
@Override
public
void
delete
(
Vip
vip
)
{
vip
=
vipFacade
.
merge
(
vip
);
vipFacade
.
remove
(
vip
);
}
@Override
public
Vip
find
(
Integer
id
)
{
public
Vip
find
(
Integer
id
)
{
return
vipFacade
.
find
(
id
);
return
vipFacade
.
find
(
id
);
}
}
...
...
code/moya-web/WebContent/vip/viplist.xhtml
View file @
4925516
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
<br
/>
<br
/>
<h:form
id=
"vipform"
>
<h:form
id=
"vipform"
>
<p:dataTable
id=
"vip"
value=
"#{vipListView.viplist}"
widgetVar=
"viplist"
styleClass=
"moya_datatable4"
var=
"vip"
filteredValue=
"#{vipListView.filteredVips}"
>
<p:dataTable
id=
"vip
List
"
value=
"#{vipListView.viplist}"
widgetVar=
"viplist"
styleClass=
"moya_datatable4"
var=
"vip"
filteredValue=
"#{vipListView.filteredVips}"
>
<!-- f:facet name="header">
<!-- f:facet name="header">
<p:outputPanel>
<p:outputPanel>
<h:outputText value="Search all fields:" />
<h:outputText value="Search all fields:" />
...
@@ -61,14 +61,19 @@
...
@@ -61,14 +61,19 @@
<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}"
>
<p:ajax
event=
"dialogReturn"
listener=
"#{vipListView.updateViplist()}"
update=
"vip"
/>
<p:ajax
event=
"dialogReturn"
listener=
"#{vipListView.updateViplist()}"
update=
"vip
List
"
/>
</p:commandButton>
</p:commandButton>
</p:column>
</p:column>
<p:column
style=
"width:
9
0px;"
>
<p:column
style=
"width:
7
0px;"
>
<h:link
outcome=
"/vip/edit"
value=
"#{i18n['vip.edit']}"
>
<h:link
outcome=
"/vip/edit"
value=
"#{i18n['vip.edit']}"
>
<f:param
name=
"id"
value=
"#{vip.id}"
/>
<f:param
name=
"id"
value=
"#{vip.id}"
/>
</h:link>
</h:link>
</p:column>
</p:column>
<p:column
style=
"width: 70px;"
>
<p:commandLink
actionListener=
"#{vipListView.deleteEntry(vip)}"
update=
"vipList"
>
<h:outputText
value=
"#{i18n['vip.delete']}"
/>
</p:commandLink>
</p:column>
</p:dataTable>
</p:dataTable>
</h:form>
</h:form>
</ui:define>
</ui:define>
...
...
code/moya-web/src/main/java/fi/codecrew/moya/web/cdiview/vip/VipListView.java
View file @
4925516
...
@@ -71,6 +71,12 @@ public class VipListView extends PaginationView<Vip> {
...
@@ -71,6 +71,12 @@ public class VipListView extends PaginationView<Vip> {
RequestContext
.
getCurrentInstance
().
openDialog
(
"/vip/deliver"
,
options
,
params
);
RequestContext
.
getCurrentInstance
().
openDialog
(
"/vip/deliver"
,
options
,
params
);
}
}
public
void
deleteEntry
(
Vip
item
)
{
vipBean
.
delete
(
item
);
viplist
=
null
;
initView
();
}
public
ListDataModel
<
Vip
>
getViplist
()
{
public
ListDataModel
<
Vip
>
getViplist
()
{
return
viplist
;
return
viplist
;
}
}
...
...
code/moya-web/src/main/resources/fi/codecrew/moya/resources/i18n.properties
View file @
4925516
...
@@ -536,3 +536,4 @@ vipProduct.name = Tuote
...
@@ -536,3 +536,4 @@ vipProduct.name = Tuote
vipProduct.quantity
=
Lukum
\u
00E4
\u
00E4r
\u
00E4
vipProduct.quantity
=
Lukum
\u
00E4
\u
00E4r
\u
00E4
yes
=
Kyll
\u
00E4
yes
=
Kyll
\u
00E4
vip.delete
=
Poista
code/moya-web/src/main/resources/fi/codecrew/moya/resources/i18n_en.properties
View file @
4925516
...
@@ -1777,3 +1777,4 @@ voting.create.voteEnd = Voting close
...
@@ -1777,3 +1777,4 @@ voting.create.voteEnd = Voting close
voting.create.voteStart
=
Voting start
voting.create.voteStart
=
Voting start
yes
=
Yes
yes
=
Yes
vip.delete
=
Delete
code/moya-web/src/main/resources/fi/codecrew/moya/resources/i18n_fi.properties
View file @
4925516
...
@@ -1761,3 +1761,4 @@ voting.create.voteEnd = \u00C4\u00E4nestys kiinni
...
@@ -1761,3 +1761,4 @@ voting.create.voteEnd = \u00C4\u00E4nestys kiinni
voting.create.voteStart
=
\u
00C4
\u
00E4nestys auki
voting.create.voteStart
=
\u
00C4
\u
00E4nestys auki
yes
=
Kyll
\u
00E4
yes
=
Kyll
\u
00E4
vip.delete
=
Poista
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