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 df5040eb
authored
May 12, 2012
by
Antti Tonkyra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More work on compo entry adding
1 parent
dceb91a2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
2 deletions
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/beans/VotingBean.java
code/LanBortalBeansClient/ejbModule/fi/insomnia/bortal/beans/VotingBeanLocal.java
code/LanBortalWeb/WebContent/voting/addentry.xhtml
code/LanBortalWeb/src/fi/insomnia/bortal/web/cdiview/voting/VotingCompoAddEntryView.java
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/beans/VotingBean.java
View file @
df5040e
...
@@ -59,6 +59,10 @@ public class VotingBean implements VotingBeanLocal {
...
@@ -59,6 +59,10 @@ public class VotingBean implements VotingBeanLocal {
compoEntryFacade
.
create
(
compoEntry
);
compoEntryFacade
.
create
(
compoEntry
);
compoEntryFileFacade
.
create
(
compoEntryFile
);
compoEntryFileFacade
.
create
(
compoEntryFile
);
}
}
public
Compo
getCompoById
(
Integer
compoId
)
{
return
compoFacade
.
find
(
compoId
);
}
public
List
<
Compo
>
getCompoList
()
{
public
List
<
Compo
>
getCompoList
()
{
return
compoFacade
.
getList
();
return
compoFacade
.
getList
();
...
...
code/LanBortalBeansClient/ejbModule/fi/insomnia/bortal/beans/VotingBeanLocal.java
View file @
df5040e
...
@@ -13,4 +13,5 @@ public interface VotingBeanLocal {
...
@@ -13,4 +13,5 @@ public interface VotingBeanLocal {
public
void
createCompo
(
Compo
c
);
public
void
createCompo
(
Compo
c
);
public
void
addEntry
(
CompoEntry
compoEntry
,
CompoEntryFile
compoEntryFile
);
public
void
addEntry
(
CompoEntry
compoEntry
,
CompoEntryFile
compoEntryFile
);
public
List
<
Compo
>
getCompoList
();
public
List
<
Compo
>
getCompoList
();
public
Compo
getCompoById
(
Integer
compoId
);
}
}
code/LanBortalWeb/WebContent/voting/addentry.xhtml
View file @
df5040e
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
<h:body>
<h:body>
<ui:composition
template=
"/layout/#{sessionHandler.layout}/template.xhtml"
>
<ui:composition
template=
"/layout/#{sessionHandler.layout}/template.xhtml"
>
<f:metadata>
<f:metadata>
<
!-- f:event type="preRenderView" listener="#{newsListView.initView}" /--
>
<
f:viewParam
name=
"compoId"
value=
"#{votingCompoAddEntryView.compoId}"
></f:viewParam
>
</f:metadata>
</f:metadata>
<ui:define
name=
"content"
>
<ui:define
name=
"content"
>
<!-- <h:outputStylesheet library="style" name="insomnia2/css/actionlog.css" /> -->
<!-- <h:outputStylesheet library="style" name="insomnia2/css/actionlog.css" /> -->
...
...
code/LanBortalWeb/src/fi/insomnia/bortal/web/cdiview/voting/VotingCompoAddEntryView.java
View file @
df5040e
...
@@ -31,6 +31,8 @@ public class VotingCompoAddEntryView {
...
@@ -31,6 +31,8 @@ public class VotingCompoAddEntryView {
@NotNull
@NotNull
private
UploadedFile
uploadedFile
;
private
UploadedFile
uploadedFile
;
private
Integer
compoId
;
public
UploadedFile
getUploadedFile
()
{
public
UploadedFile
getUploadedFile
()
{
return
uploadedFile
;
return
uploadedFile
;
}
}
...
@@ -61,7 +63,7 @@ public class VotingCompoAddEntryView {
...
@@ -61,7 +63,7 @@ public class VotingCompoAddEntryView {
compoEntry
.
setName
(
name
);
compoEntry
.
setName
(
name
);
compoEntry
.
setNotes
(
notes
);
compoEntry
.
setNotes
(
notes
);
compoEntry
.
setScreenMessage
(
screenMessage
);
compoEntry
.
setScreenMessage
(
screenMessage
);
compoEntry
.
setCompo
(
null
);
compoEntry
.
setCompo
(
votingBean
.
getCompoById
(
compoId
)
);
CompoEntryFile
cef
=
new
CompoEntryFile
(
compoEntry
);
CompoEntryFile
cef
=
new
CompoEntryFile
(
compoEntry
);
cef
.
setFileData
(
this
.
uploadedFile
.
getContents
());
cef
.
setFileData
(
this
.
uploadedFile
.
getContents
());
cef
.
setFileName
(
uploadedFile
.
getFileName
());
cef
.
setFileName
(
uploadedFile
.
getFileName
());
...
...
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