Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Linnea Samila
/
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 5af2a9e5
authored
May 19, 2012
by
Juho Salli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compo detailssivu purkkaversio
1 parent
5846c929
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
125 additions
and
6 deletions
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/beans/VotingBean.java
code/LanBortalWeb/WebContent/voting/addentry.xhtml
code/LanBortalWeb/WebContent/voting/compolist.xhtml
code/LanBortalWeb/WebContent/voting/details.xhtml
code/LanBortalWeb/src/fi/insomnia/bortal/web/cdiview/voting/VotingCompoAddEntryView.java
code/LanBortalWeb/src/fi/insomnia/bortal/web/cdiview/voting/VotingDetailsView.java
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/beans/VotingBean.java
View file @
5af2a9e
...
...
@@ -72,4 +72,6 @@ public class VotingBean implements VotingBeanLocal {
public
List
<
Compo
>
getCompoList
()
{
return
compoFacade
.
getList
();
}
}
code/LanBortalWeb/WebContent/voting/addentry.xhtml
View file @
5af2a9e
...
...
@@ -10,11 +10,12 @@
<ui:composition
template=
"/layout/#{sessionHandler.layout}/template.xhtml"
>
<f:metadata>
<f:viewParam
name=
"compoId"
value=
"#{votingCompoAddEntryView.compoId}"
></f:viewParam>
<f:event
type=
"preRenderView"
listener=
"#{votingCompoAddEntryView.initView()}"
/>
</f:metadata>
<ui:define
name=
"content"
>
<!-- <h:outputStylesheet library="style" name="insomnia2/css/actionlog.css" /> -->
<h1>
#{i18n['voting.compoentryadd.title']}
</h1>
<p>
#{i18n['voting.compoentryadd.description']}
</p>
<p>
#{i18n['voting.compoentryadd.description']}
#{votingCompoAddEntryView.compoName}
</p>
<h:form
enctype=
"multipart/form-data"
>
<h:panelGrid
columns=
"3"
>
...
...
code/LanBortalWeb/WebContent/voting/compolist.xhtml
View file @
5af2a9e
...
...
@@ -25,7 +25,11 @@
<f:facet
name=
"header"
>
<h:outputText
value=
"#{i18n['voting.allcompos.name']}"
/>
</f:facet>
<h:outputText
value=
"#{compo.name}"
/>
<h:link
outcome=
"details"
>
<f:param
name=
"compoId"
value=
"#{compo.id}"
/>
#{compo.name}
</h:link>
<!-- <h:outputText value="#{compo.name}" /> -->
</h:column>
<h:column>
<f:facet
name=
"header"
>
...
...
code/LanBortalWeb/WebContent/voting/details.xhtml
View file @
5af2a9e
...
...
@@ -9,15 +9,49 @@
<h:body>
<ui:composition
template=
"/layout/#{sessionHandler.layout}/template.xhtml"
>
<f:metadata>
<!-- f:event type="preRenderView" listener="#{newsListView.initView}" /-->
<f:viewParam
name=
"compoId"
value=
"#{votingDetailsView.compoId}"
/>
<!-- <f:viewParam name="compoId" value="#{votingDetailsView.compoId2}" /> -->
<f:event
type=
"preRenderView"
listener=
"#{votingDetailsView.initView}"
/>
</f:metadata>
<ui:define
name=
"content"
>
<!-- <h:outputStylesheet library="style" name="insomnia2/css/actionlog.css" /> -->
<h1>
#{i18n['voting.details.header']} (KOMPON NIMI)
</h1>
<p>
Compo#{i18n['voting.details.description']}
</p>
<h1>
Compo: #{votingDetailsView.compoName}
</h1>
<p>
Infoa compon entryistä
</p>
<div
class=
"clearfix"
></div>
<div
id=
"actionlog"
>
<h:dataTable
styleClass=
"bordertable"
rowClasses=
"roweven,rowodd"
id=
"compolisttable"
value=
"#{votingDetailsView.entries}"
var=
"entry"
>
<h:column>
<f:facet
name=
"header"
>
<h:outputText
value=
"nimi"
/>
</f:facet>
<h:outputText
value=
"#{entry.name}"
/>
</h:column>
<h:column>
<f:facet
name=
"header"
>
<h:outputText
value=
"notes"
/>
</f:facet>
<h:outputText
value=
"#{entry.notes}"
/>
</h:column>
<h:column>
<f:facet
name=
"header"
>
<h:outputText
value=
"screenmessage"
/>
</f:facet>
<h:outputText
value=
"#{entry.screenMessage}"
/>
</h:column>
<h:column>
<f:facet
name=
"header"
>
<h:outputText
value=
"creator"
/>
</f:facet>
<h:outputText
value=
"#{entry.creator.user.wholeName}"
/>
</h:column>
</h:dataTable>
</div>
</ui:define>
</ui:composition>
...
...
code/LanBortalWeb/src/fi/insomnia/bortal/web/cdiview/voting/VotingCompoAddEntryView.java
View file @
5af2a9e
...
...
@@ -27,6 +27,7 @@ public class VotingCompoAddEntryView {
private
UploadedFile
uploadedFile
;
private
Integer
compoId
;
private
String
compoName
;
public
Integer
getCompoId
()
{
return
compoId
;
...
...
@@ -68,6 +69,14 @@ public class VotingCompoAddEntryView {
this
.
name
=
name
;
}
public
String
getCompoName
()
{
return
compoName
;
}
public
void
setCompoName
(
String
compoName
)
{
this
.
compoName
=
compoName
;
}
public
void
send
()
{
CompoEntry
compoEntry
=
new
CompoEntry
();
compoEntry
.
setName
(
name
);
...
...
@@ -79,4 +88,8 @@ public class VotingCompoAddEntryView {
cef
.
setFileName
(
uploadedFile
.
getFileName
());
votingBean
.
addEntry
(
compoEntry
,
cef
);
}
public
void
initView
()
{
compoName
=
votingBean
.
getCompoById
(
compoId
).
getName
();
}
}
code/LanBortalWeb/src/fi/insomnia/bortal/web/cdiview/voting/VotingDetailsView.java
View file @
5af2a9e
package
fi
.
insomnia
.
bortal
.
web
.
cdiview
.
voting
;
import
javax.faces.bean.RequestScoped
;
import
java.util.List
;
import
javax.ejb.EJB
;
import
javax.enterprise.context.RequestScoped
;
import
javax.inject.Named
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
fi.insomnia.bortal.beans.VotingBeanLocal
;
import
fi.insomnia.bortal.web.cdiview.GenericCDIView
;
import
fi.insomnia.bortal.model.Compo
;
import
fi.insomnia.bortal.model.CompoEntry
;
@Named
@RequestScoped
public
class
VotingDetailsView
extends
GenericCDIView
{
...
...
@@ -13,5 +24,59 @@ public class VotingDetailsView extends GenericCDIView {
*
*/
private
static
final
long
serialVersionUID
=
-
8373473936336396427L
;
@EJB
private
VotingBeanLocal
votingBean
;
private
Integer
compoId
;
private
Integer
compoId2
;
private
String
compoName
;
private
Compo
compo
;
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
VotingDetailsView
.
class
);
public
Integer
getCompoId
()
{
return
compoId
;
}
public
void
setCompoId
(
Integer
compoId
)
{
this
.
compoId
=
compoId
;
}
public
List
<
CompoEntry
>
getEntries
(){
//return votingBean.getCompoById(compoId).getCompoEntries();
compo
=
votingBean
.
getCompoById
(
compoId
);
logger
.
info
(
"compoId "
+
compoId
);
if
(
compo
==
null
)
{
return
null
;
}
return
compo
.
getCompoEntries
();
}
public
void
initView
()
{
compoName
=
votingBean
.
getCompoById
(
compoId
).
getName
();
}
public
Integer
getCompoId2
()
{
return
compoId2
;
}
public
void
setCompoId2
(
Integer
compoId2
)
{
this
.
compoId2
=
compoId2
;
}
public
String
getCompoName
()
{
return
compoName
;
}
public
void
setCompoName
(
String
compoName
)
{
this
.
compoName
=
compoName
;
}
}
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