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 f7eed6bc
authored
May 13, 2012
by
Juho Salli
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of dev.insomnia.fi:/data/bortal
2 parents
002a3bbc
d0648abc
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 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 @
f7eed6b
package
fi
.
insomnia
.
bortal
.
beans
;
import
java.util.ArrayList
;
import
java.util.Calendar
;
import
java.util.List
;
...
...
@@ -58,6 +59,13 @@ public class VotingBean implements VotingBeanLocal {
compoEntryFacade
.
create
(
compoEntry
);
compoEntryFileFacade
.
create
(
compoEntryFile
);
compoEntry
.
setCurrentFile
(
compoEntryFile
);
compoEntry
.
setFiles
(
new
ArrayList
<
CompoEntryFile
>());
compoEntry
.
getFiles
().
add
(
compoEntryFile
);
}
public
Compo
getCompoById
(
Integer
compoId
)
{
return
compoFacade
.
find
(
compoId
);
}
public
List
<
Compo
>
getCompoList
()
{
...
...
code/LanBortalBeansClient/ejbModule/fi/insomnia/bortal/beans/VotingBeanLocal.java
View file @
f7eed6b
...
...
@@ -13,4 +13,5 @@ public interface VotingBeanLocal {
public
void
createCompo
(
Compo
c
);
public
void
addEntry
(
CompoEntry
compoEntry
,
CompoEntryFile
compoEntryFile
);
public
List
<
Compo
>
getCompoList
();
public
Compo
getCompoById
(
Integer
compoId
);
}
code/LanBortalWeb/WebContent/voting/addentry.xhtml
View file @
f7eed6b
...
...
@@ -9,7 +9,7 @@
<h:body>
<ui:composition
template=
"/layout/#{sessionHandler.layout}/template.xhtml"
>
<f:metadata>
<
!-- f:event type="preRenderView" listener="#{newsListView.initView}" /--
>
<
f:viewParam
name=
"compoId"
value=
"#{votingCompoAddEntryView.compoId}"
></f:viewParam
>
</f:metadata>
<ui:define
name=
"content"
>
<!-- <h:outputStylesheet library="style" name="insomnia2/css/actionlog.css" /> -->
...
...
code/LanBortalWeb/src/fi/insomnia/bortal/web/cdiview/voting/VotingCompoAddEntryView.java
View file @
f7eed6b
...
...
@@ -31,6 +31,8 @@ public class VotingCompoAddEntryView {
@NotNull
private
UploadedFile
uploadedFile
;
private
Integer
compoId
;
public
UploadedFile
getUploadedFile
()
{
return
uploadedFile
;
}
...
...
@@ -61,7 +63,7 @@ public class VotingCompoAddEntryView {
compoEntry
.
setName
(
name
);
compoEntry
.
setNotes
(
notes
);
compoEntry
.
setScreenMessage
(
screenMessage
);
compoEntry
.
setCompo
(
null
);
compoEntry
.
setCompo
(
votingBean
.
getCompoById
(
compoId
)
);
CompoEntryFile
cef
=
new
CompoEntryFile
(
compoEntry
);
cef
.
setFileData
(
this
.
uploadedFile
.
getContents
());
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