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 12b9a122
authored
Apr 07, 2012
by
Juho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rivoa minun nimissäni
1 parent
24b2364c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
67 additions
and
5 deletions
code/LanBortalWeb/WebContent/actionlog/taskview.xhtml
code/LanBortalWeb/src/fi/insomnia/bortal/web/cdiview/actionlog/TaskModificationView.java
code/LanBortalWeb/WebContent/actionlog/taskview.xhtml
View file @
12b9a12
...
@@ -44,16 +44,52 @@
...
@@ -44,16 +44,52 @@
</div>
</div>
<div
class=
"clearfix"
></div>
<div
class=
"clearfix"
></div>
<hr
style=
"width:90%;"
/>
<hr
style=
"width:90%;"
/>
<div>
<h:dataTable
value=
"#{taskModificationView.responses}"
var=
"response"
>
<h:column>
<f:facet
name=
"header"
>
<h:outputText
value=
"Aika"
/>
</f:facet>
<h:outputText
value=
"#{response.time}"
/>
</h:column>
<h:column>
<f:facet
name=
"header"
>
<h:outputText
value=
"Submitter"
/>
</f:facet>
<h:outputText
value=
"#{response.user.nick}"
/>
</h:column>
<h:column>
<f:facet
name=
"header"
>
<h:outputText
value=
"Message"
/>
</f:facet>
<h:outputText
value=
"#{response.message}"
/>
</h:column>
<h:column>
<f:facet
name=
"header"
>
<h:outputText
value=
"tilanvaihdos"
/>
</f:facet>
<h:outputText
value=
"#{response.statechange}"
/>
</h:column>
</h:dataTable>
</div>
<div>
<div>
<h:form>
<h3>
Lisää viesti
</h3>
<h3>
Lisää viesti
</h3>
<h:outputText
value=
"Viestisi: "
/>
<h:outputText
value=
"Viestisi: "
/>
<h:inputText
size=
"100"
/>
<h:inputText
value=
"#{taskModificationView.responseMessage}"
size=
"100"
/>
<h:outputText
value=
"Tila: "
/>
<h:outputText
value=
"Tila: "
/>
<h:selectOneMenu
id=
"stateMenu"
title=
"asdas"
>
<h:selectOneMenu
id=
"stateMenu"
title=
"asdas"
value=
"#{taskModificationView.message.state}"
>
<f:selectItem
id=
"s1"
itemLabel=
"No change"
itemValue=
"1"
/>
<f:selectItem
itemLabel=
"Ei muutosta"
itemValue=
"#{null}"
/>
<f:selectItem
id=
"s2"
itemLabel=
"Done"
itemValue=
"2"
/>
<f:selectItem
itemLabel=
"Uusi"
itemValue=
"NEW"
/>
<f:selectItem
itemLabel=
"Työn alla"
itemValue=
"PENDING"
/>
<f:selectItem
itemLabel=
"Tehty"
itemValue=
"DONE"
/>
</h:selectOneMenu>
</h:selectOneMenu>
<h:commandButton
class=
"sendbutton2"
value=
"#{i18n['actionlog.create.submitbutton']}"
/>
<h:commandButton
class=
"sendbutton2"
value=
"#{i18n['actionlog.create.submitbutton']}"
action=
"#{taskModificationView.createResponse}"
/>
</h:form>
</div>
</div>
</ui:define>
</ui:define>
</ui:composition>
</ui:composition>
...
...
code/LanBortalWeb/src/fi/insomnia/bortal/web/cdiview/actionlog/TaskModificationView.java
View file @
12b9a12
...
@@ -4,8 +4,13 @@ import javax.ejb.EJB;
...
@@ -4,8 +4,13 @@ import javax.ejb.EJB;
import
javax.enterprise.context.ConversationScoped
;
import
javax.enterprise.context.ConversationScoped
;
import
javax.inject.Named
;
import
javax.inject.Named
;
import
java.sql.Date
;
import
java.util.ArrayList
;
import
java.util.List
;
import
fi.insomnia.bortal.beans.ActionLogBeanLocal
;
import
fi.insomnia.bortal.beans.ActionLogBeanLocal
;
import
fi.insomnia.bortal.model.ActionLogMessage
;
import
fi.insomnia.bortal.model.ActionLogMessage
;
import
fi.insomnia.bortal.model.ActionLogMessageResponse
;
import
fi.insomnia.bortal.web.cdiview.GenericCDIView
;
import
fi.insomnia.bortal.web.cdiview.GenericCDIView
;
@Named
@Named
...
@@ -13,6 +18,8 @@ import fi.insomnia.bortal.web.cdiview.GenericCDIView;
...
@@ -13,6 +18,8 @@ import fi.insomnia.bortal.web.cdiview.GenericCDIView;
public
class
TaskModificationView
extends
GenericCDIView
{
public
class
TaskModificationView
extends
GenericCDIView
{
private
Integer
id
;
private
Integer
id
;
private
ActionLogMessage
message
;
private
ActionLogMessage
message
;
private
List
<
ActionLogMessageResponse
>
responses
;
private
String
responseMessage
;
@EJB
@EJB
private
ActionLogBeanLocal
logbean
;
private
ActionLogBeanLocal
logbean
;
...
@@ -22,6 +29,17 @@ public class TaskModificationView extends GenericCDIView {
...
@@ -22,6 +29,17 @@ public class TaskModificationView extends GenericCDIView {
super
.
beginConversation
();
super
.
beginConversation
();
message
=
logbean
.
find
(
id
);
message
=
logbean
.
find
(
id
);
}
}
if
(
responses
==
null
)
{
responses
=
logbean
.
getActionLogMessageResponsesByID
(
id
);
}
}
public
void
createResponse
()
{
}
public
List
<
ActionLogMessageResponse
>
getResponses
()
{
return
responses
;
}
}
public
ActionLogMessage
getMessage
(){
public
ActionLogMessage
getMessage
(){
...
@@ -36,4 +54,12 @@ public class TaskModificationView extends GenericCDIView {
...
@@ -36,4 +54,12 @@ public class TaskModificationView extends GenericCDIView {
this
.
id
=
id
;
this
.
id
=
id
;
}
}
public
String
getResponseMessage
()
{
return
responseMessage
;
}
public
void
setResponseMessage
(
String
responseMessage
)
{
this
.
responseMessage
=
responseMessage
;
}
}
}
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