Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Codecrew
/
Moya
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
30
Merge Requests
2
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 1b3330f4
authored
Feb 12, 2012
by
Antti Tonkyra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ActionMessage stuff
1 parent
a5075373
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
77 additions
and
48 deletions
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/beans/ActionLogBean.java
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/facade/ActionLogFacade.java
code/LanBortalWeb/.metadata/WebContent/WEB-INF/faces-config.pageflow
code/LanBortalWeb/WebContent/WEB-INF/faces-config.xml
code/LanBortalWeb/WebContent/actionlog/create.xhtml
code/LanBortalWeb/WebContent/actionlog/messagelist.xhtml
code/LanBortalWeb/WebContent/resources/style/insomnia2/css/tyyli.css
code/LanBortalWeb/src/fi/insomnia/bortal/resources/i18n_fi.properties
code/LanBortalWeb/src/fi/insomnia/bortal/web/cdiview/actionlog/ActionLogCreateView.java
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/beans/ActionLogBean.java
View file @
1b3330f
...
@@ -49,7 +49,6 @@ public class ActionLogBean implements ActionLogBeanLocal {
...
@@ -49,7 +49,6 @@ public class ActionLogBean implements ActionLogBeanLocal {
alm
.
setMessage
(
message
);
alm
.
setMessage
(
message
);
alm
.
setUser
(
permissionBean
.
getCurrentUser
());
alm
.
setUser
(
permissionBean
.
getCurrentUser
());
//System.out.println("would creates, crew="+crew.getName()+" u="+alm.getUser().getNick());
actionLogFacade
.
saveToActionLog
(
alm
);
actionLogFacade
.
saveToActionLog
(
alm
);
}
}
...
...
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/facade/ActionLogFacade.java
View file @
1b3330f
...
@@ -6,6 +6,7 @@ import javax.ejb.LocalBean;
...
@@ -6,6 +6,7 @@ import javax.ejb.LocalBean;
import
javax.ejb.Stateless
;
import
javax.ejb.Stateless
;
import
javax.persistence.EntityManager
;
import
javax.persistence.EntityManager
;
import
javax.persistence.PersistenceContext
;
import
javax.persistence.PersistenceContext
;
import
javax.persistence.TypedQuery
;
import
javax.persistence.criteria.CriteriaBuilder
;
import
javax.persistence.criteria.CriteriaBuilder
;
import
javax.persistence.criteria.CriteriaQuery
;
import
javax.persistence.criteria.CriteriaQuery
;
import
javax.persistence.criteria.Root
;
import
javax.persistence.criteria.Root
;
...
@@ -13,6 +14,8 @@ import javax.persistence.criteria.Root;
...
@@ -13,6 +14,8 @@ import javax.persistence.criteria.Root;
import
fi.insomnia.bortal.model.AccountEvent
;
import
fi.insomnia.bortal.model.AccountEvent
;
import
fi.insomnia.bortal.model.AccountEvent_
;
import
fi.insomnia.bortal.model.AccountEvent_
;
import
fi.insomnia.bortal.model.ActionLogMessage
;
import
fi.insomnia.bortal.model.ActionLogMessage
;
import
fi.insomnia.bortal.model.Bill
;
import
fi.insomnia.bortal.model.Bill_
;
import
fi.insomnia.bortal.model.EventPk
;
import
fi.insomnia.bortal.model.EventPk
;
import
fi.insomnia.bortal.model.LanEvent
;
import
fi.insomnia.bortal.model.LanEvent
;
import
fi.insomnia.bortal.model.LogEntry
;
import
fi.insomnia.bortal.model.LogEntry
;
...
@@ -38,11 +41,19 @@ public class ActionLogFacade extends GenericFacade<Integer,ActionLogMessage> {
...
@@ -38,11 +41,19 @@ public class ActionLogFacade extends GenericFacade<Integer,ActionLogMessage> {
}
}
public
List
<
ActionLogMessage
>
getAllSortedByTimestamp
()
{
public
List
<
ActionLogMessage
>
getAllSortedByTimestamp
()
{
// TODO Auto-generated method stub
CriteriaBuilder
cb
=
getEm
().
getCriteriaBuilder
();
return
null
;
CriteriaQuery
<
ActionLogMessage
>
cq
=
cb
.
createQuery
(
ActionLogMessage
.
class
);
Root
<
ActionLogMessage
>
root
=
cq
.
from
(
ActionLogMessage
.
class
);
cq
.
orderBy
(
cb
.
desc
(
root
.
get
(
"time"
)));
TypedQuery
<
ActionLogMessage
>
tq
=
em
.
createQuery
(
cq
);
tq
.
setMaxResults
(
10
);
tq
.
setFirstResult
(
0
);
return
tq
.
getResultList
();
}
}
public
void
saveToActionLog
(
ActionLogMessage
alm
)
{
public
void
saveToActionLog
(
ActionLogMessage
alm
)
{
em
.
persist
(
alm
);
em
.
persist
(
alm
);
em
.
flush
();
}
}
}
}
code/LanBortalWeb/.metadata/WebContent/WEB-INF/faces-config.pageflow
View file @
1b3330f
...
@@ -4,7 +4,10 @@
...
@@ -4,7 +4,10 @@
<nodes
xsi:type=
"pageflow:PFPage"
name=
"auth/logoutResponse"
x=
"288"
y=
"60"
id=
"pf131682121330016"
referenceLink=
"//@navigationRule.0/@navigationCase.0/@toViewId|"
inlinks=
"pf131682121330015"
path=
"/auth/logoutResponse"
/>
<nodes
xsi:type=
"pageflow:PFPage"
name=
"auth/logoutResponse"
x=
"288"
y=
"60"
id=
"pf131682121330016"
referenceLink=
"//@navigationRule.0/@navigationCase.0/@toViewId|"
inlinks=
"pf131682121330015"
path=
"/auth/logoutResponse"
/>
<nodes
xsi:type=
"pageflow:PFPage"
name=
"place/placemap"
x=
"276"
y=
"228"
id=
"pf13168224196920"
referenceLink=
"//@navigationRule.1/@navigationCase.0/@toViewId|"
outlinks=
"pf13168224196921"
inlinks=
"pf13168224196921"
path=
"/place/placemap"
/>
<nodes
xsi:type=
"pageflow:PFPage"
name=
"place/placemap"
x=
"276"
y=
"228"
id=
"pf13168224196920"
referenceLink=
"//@navigationRule.1/@navigationCase.0/@toViewId|"
outlinks=
"pf13168224196921"
inlinks=
"pf13168224196921"
path=
"/place/placemap"
/>
<nodes
xsi:type=
"pageflow:PFPage"
name=
"user/sendPicture"
id=
"pf13196506256641"
referenceLink=
"//@navigationRule.0/@navigationCase.1/@toViewId|"
inlinks=
"pf13196506256640"
path=
"/user/sendPicture"
/>
<nodes
xsi:type=
"pageflow:PFPage"
name=
"user/sendPicture"
id=
"pf13196506256641"
referenceLink=
"//@navigationRule.0/@navigationCase.1/@toViewId|"
inlinks=
"pf13196506256640"
path=
"/user/sendPicture"
/>
<nodes
xsi:type=
"pageflow:PFPage"
name=
"actionlog/messagelist"
id=
"pf13290472154543"
referenceLink=
"//@navigationRule.2/@fromViewId|"
outlinks=
"pf13290472154544"
path=
"/actionlog/messagelist.xhtml"
/>
<nodes
xsi:type=
"pageflow:PFPage"
name=
"actionlog/messagelist.xhtml"
id=
"pf13290472154545"
referenceLink=
"//@navigationRule.2/@navigationCase.0/@toViewId|"
inlinks=
"pf13290472154544"
path=
"/actionlog/messagelist.xhtml"
/>
<links
id=
"pf131682121330015"
target=
"pf131682121330016"
source=
"pf131682121330014"
outcome=
"logoutDone"
redirect=
"true"
/>
<links
id=
"pf131682121330015"
target=
"pf131682121330016"
source=
"pf131682121330014"
outcome=
"logoutDone"
redirect=
"true"
/>
<links
id=
"pf13168224196921"
target=
"pf13168224196920"
source=
"pf13168224196920"
outcome=
"placesReserved"
redirect=
"true"
/>
<links
id=
"pf13168224196921"
target=
"pf13168224196920"
source=
"pf13168224196920"
outcome=
"placesReserved"
redirect=
"true"
/>
<links
id=
"pf13196506256640"
target=
"pf13196506256641"
source=
"pf131682121330014"
outcome=
"redirToUserimage"
redirect=
"true"
/>
<links
id=
"pf13196506256640"
target=
"pf13196506256641"
source=
"pf131682121330014"
outcome=
"redirToUserimage"
redirect=
"true"
/>
<links
id=
"pf13290472154544"
target=
"pf13290472154545"
source=
"pf13290472154543"
outcome=
"success"
redirect=
"true"
/>
</pageflow:Pageflow>
</pageflow:Pageflow>
code/LanBortalWeb/WebContent/WEB-INF/faces-config.xml
View file @
1b3330f
...
@@ -91,6 +91,15 @@
...
@@ -91,6 +91,15 @@
<redirect/>
<redirect/>
</navigation-case>
</navigation-case>
</navigation-rule>
</navigation-rule>
<navigation-rule>
<display-name>
actionlog/messagelist
</display-name>
<from-view-id>
/actionlog/messagelist.xhtml
</from-view-id>
<navigation-case>
<from-outcome>
success
</from-outcome>
<to-view-id>
/actionlog/messagelist.xhtml
</to-view-id>
<redirect/>
</navigation-case>
</navigation-rule>
</faces-config>
</faces-config>
...
...
code/LanBortalWeb/WebContent/actionlog/create.xhtml
deleted
100644 → 0
View file @
a507537
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns=
"http://www.w3.org/1999/xhtml"
xmlns:ui=
"http://java.sun.com/jsf/facelets"
xmlns:h=
"http://java.sun.com/jsf/html"
xmlns:users=
"http://java.sun.com/jsf/composite/cditools/user"
xmlns:tools=
"http://java.sun.com/jsf/composite/cditools"
xmlns:f=
"http://java.sun.com/jsf/core"
>
<h:body>
<ui:composition
template=
"/layout/#{sessionHandler.layout}/template.xhtml"
>
<f:metadata>
<!-- f:event type="preRenderView" listener="#{newsListView.initView}" /-->
</f:metadata>
<ui:define
name=
"content"
>
<h:form>
<h:messages
/>
<h1>
#{i18n['actionlog.create.header']}
</h1>
<h:outputText
value=
"#{i18n['actionlog.create.role']}"
/>
<h:selectOneMenu
value=
"#{actionLogCreateView.role}"
converter=
"#{roleConverter}"
>
<f:selectItems
var=
"role"
itemLabel=
"#{role.name}"
value=
"#{actionLogCreateView.roles}"
/>
</h:selectOneMenu>
<h:outputText
value=
"#{i18n['actionlog.create.message']}"
/>
<h:inputText
value=
"#{actionLogCreateView.message}"
/>
<h:outputText
value=
"#{i18n['actionlog.create.taskradio']}"
/>
<h:selectBooleanCheckbox
value=
"#{actionLogCreateView.task}"
/>
<br
/>
<h:commandButton
action=
"#{actionLogCreateView.send}"
value=
"#{i18n['actionlog.create.submitbutton']}"
/>
</h:form>
</ui:define>
</ui:composition>
</h:body>
</html>
\ No newline at end of file
code/LanBortalWeb/WebContent/actionlog/messagelist.xhtml
View file @
1b3330f
...
@@ -5,19 +5,55 @@
...
@@ -5,19 +5,55 @@
xmlns:h=
"http://java.sun.com/jsf/html"
xmlns:users=
"http://java.sun.com/jsf/composite/cditools/user"
xmlns:h=
"http://java.sun.com/jsf/html"
xmlns:users=
"http://java.sun.com/jsf/composite/cditools/user"
xmlns:tools=
"http://java.sun.com/jsf/composite/cditools"
xmlns:f=
"http://java.sun.com/jsf/core"
xmlns:tools=
"http://java.sun.com/jsf/composite/cditools"
xmlns:f=
"http://java.sun.com/jsf/core"
>
>
<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:event type="preRenderView" listener="#{newsListView.initView}" /-->
</f:metadata>
</f:metadata>
<ui:define
name=
"content"
>
<ui:define
name=
"content"
>
<h:outputStylesheet
library=
"style"
name=
"insomnia2/css/actionlog.css"
></h:outputStylesheet>
<h1>
#{i18n['actionlog.messagelist.header']}
</h1>
<h1>
#{i18n['actionlog.messagelist.header']}
</h1>
<h:dataTable
styleClass=
"bordertable"
id=
"message"
value=
"#{actionLogMessageView.messages}"
var=
"message"
>
<p>
#{i18n['actionlog.messagelist.description']}
</p>
<h:form
id=
"actionlog_create"
>
<h2>
#{i18n['actionlog.create.header']}
</h2>
<h:messages
/>
<div
class=
"row"
>
<h3
class=
"actionlog_create_role"
>
#{i18n['actionlog.create.role']}
</h3>
<h3
class=
"actionlog_create_message"
>
#{i18n['actionlog.create.message']}
</h3>
<h3
class=
"actionlog_create_istask"
>
#{i18n['actionlog.create.taskradio']}
</h3>
</div>
<div
class=
"row"
>
<div
class=
"actionlog_create_role"
>
<h:selectOneMenu
value=
"#{actionLogCreateView.role}"
converter=
"#{roleConverter}"
>
<f:selectItems
var=
"role"
itemLabel=
"#{role.name}"
value=
"#{actionLogCreateView.roles}"
/>
</h:selectOneMenu>
</div>
<div
class=
"actionlog_create_message"
>
<h:inputText
value=
"#{actionLogCreateView.message}"
/>
</div>
<div
class=
"actionlog_create_istask"
>
<h:selectBooleanCheckbox
value=
"#{actionLogCreateView.task}"
/>
</div>
<h:commandButton
class=
"sendbutton"
action=
"#{actionLogCreateView.send}"
value=
"#{i18n['actionlog.create.submitbutton']}"
/>
</div>
</h:form>
<div
class=
"clearfix"
></div>
<h2>
#{i18n['actionlog.tasklist.header']}
</h2>
<div
id=
"actionlog"
>
<h:dataTable
styleClass=
"bordertable"
rowClasses=
"roweven,rowodd"
id=
"actionlogtable"
value=
"#{actionLogMessageView.messages}"
var=
"message"
>
<h:column>
<h:column>
<f:facet
name=
"header"
>
<f:facet
name=
"header"
>
<h:outputText
value=
"#{i18n['actionlog.time']}"
/>
<h:outputText
value=
"#{i18n['actionlog.time']}"
/>
</f:facet>
</f:facet>
<h:outputText
value=
"#{message.time}"
/>
<h:outputText
value=
"#{message.time}"
>
<f:convertDateTime
type=
"both"
pattern=
"dd.MM.yyyy HH:mm"
/>
<!-- <f:convertDateTime type="both" dateStyle="HH:mm" /> -->
</h:outputText>
</h:column>
</h:column>
<h:column>
<h:column>
<f:facet
name=
"header"
>
<f:facet
name=
"header"
>
...
@@ -29,15 +65,20 @@
...
@@ -29,15 +65,20 @@
<f:facet
name=
"header"
>
<f:facet
name=
"header"
>
<h:outputText
value=
"#{i18n['actionlog.crew']}"
/>
<h:outputText
value=
"#{i18n['actionlog.crew']}"
/>
</f:facet>
</f:facet>
<h:outputText
value=
"#{message.crew
}"
/>
<h:outputText
value=
"#{message.crew.name
}"
/>
</h:column>
</h:column>
<h:column>
<h:column>
<f:facet
name=
"header"
>
<f:facet
name=
"header"
>
<h:outputText
value=
"#{i18n['actionlog.message']}"
/>
<h:outputText
value=
"#{i18n['actionlog.message']}"
/>
</f:facet>
</f:facet>
<h:outputText
value=
"#{message.message}"
/>
<h:outputText
value=
"#{message.message}"
/>
</h:column>
</h:column>
<h:column>
x
</h:column>
</h:dataTable>
</h:dataTable>
</div>
</ui:define>
</ui:define>
</ui:composition>
</ui:composition>
</h:body>
</h:body>
...
...
code/LanBortalWeb/WebContent/resources/style/insomnia2/css/tyyli.css
View file @
1b3330f
code/LanBortalWeb/src/fi/insomnia/bortal/resources/i18n_fi.properties
View file @
1b3330f
...
@@ -377,14 +377,15 @@ news.save=Tallenna
...
@@ -377,14 +377,15 @@ news.save=Tallenna
usertitle.managingUser
=
Hallitaan kyttj
usertitle.managingUser
=
Hallitaan kyttj
actionlog.messagelist.header
=
Viestilista
actionlog.messagelist.header
=
ActionLog
actionlog.messagelist.description
=
Voit seurata sek luoda uusia ActionMessageja tss nkymss.
actionlog.tasklist.header
=
Task
ilista
actionlog.tasklist.header
=
Viest
ilista
actionlog.create.header
=
Luo
eventti
actionlog.create.header
=
Luo
uusi ActionMessage
actionlog.create.role
=
R
ooli
actionlog.create.role
=
Kohder
ooli
actionlog.create.message
=
Viesti
actionlog.create.message
=
Viesti
actionlog.create.taskradio
=
T
m on taski
actionlog.create.taskradio
=
T
ehtv
actionlog.create.submitbutton
=
Lhet
actionlog.create.submitbutton
=
Lhet
actionlog.time
=
Aika
actionlog.time
=
Aika
...
...
code/LanBortalWeb/src/fi/insomnia/bortal/web/cdiview/actionlog/ActionLogCreateView.java
View file @
1b3330f
...
@@ -56,7 +56,8 @@ public class ActionLogCreateView extends GenericCDIView {
...
@@ -56,7 +56,8 @@ public class ActionLogCreateView extends GenericCDIView {
this
.
task
=
task
;
this
.
task
=
task
;
}
}
public
void
send
()
{
public
String
send
()
{
actionLogBean
.
createActionLogEvent
(
message
,
role
,
task
);
actionLogBean
.
createActionLogEvent
(
message
,
role
,
task
);
return
"success"
;
}
}
}
}
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