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 f0c6dfe6
authored
Oct 27, 2012
by
Riku Silvola
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of codecrew.fi:bortal
2 parents
8c4cfe8f
354bd2f1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
17 deletions
code/LanBortalWeb/WebContent/foodmanager/listOrders.xhtml
code/LanBortalWeb/src/fi/insomnia/bortal/HostnameFilter.java
code/LanBortalWeb/src/fi/insomnia/bortal/web/ErrorPageView.java
code/LanBortalWeb/src/fi/insomnia/bortal/web/cdiview/shop/FoodWaveFoodView.java
code/LanBortalWeb/WebContent/foodmanager/listOrders.xhtml
View file @
f0c6dfe
...
@@ -144,11 +144,16 @@
...
@@ -144,11 +144,16 @@
<h2>
#{i18n['foodwave.summaryView']}
</h2>
<h2>
#{i18n['foodwave.summaryView']}
</h2>
<div>
<div>
<h:outputLabel
value=
"#{i18n['foodwave.price']}: "
/>
<h:outputLabel
value=
"#{i18n['foodwave.price']}: "
/>
<h:outputText
value=
"#{foodWaveView.foodwavePrice}"
/>
<h:outputText
value=
"#{foodWaveView.foodwavePrice}"
>
<f:convertNumber
minFractionDigits=
"0"
/>
</h:outputText>
</div>
</div>
<div>
<div>
<h:outputLabel
value=
"#{i18n['foodwave.foodwaveBuyInPrice']}: "
/>
<h:outputLabel
value=
"#{i18n['foodwave.foodwaveBuyInPrice']}: "
/>
<h:outputText
value=
"#{foodWaveView.foodwaveBuyInPrice}"
/>
<h:outputText
value=
"#{foodWaveView.foodwaveBuyInPrice}"
>
<f:convertNumber
minFractionDigits=
"0"
/>
</h:outputText>
</div>
</div>
<p:dataTable
var=
"summ"
value=
"#{foodWaveView.productSummaries}"
>
<p:dataTable
var=
"summ"
value=
"#{foodWaveView.productSummaries}"
>
<p:column>
<p:column>
...
...
code/LanBortalWeb/src/fi/insomnia/bortal/HostnameFilter.java
View file @
f0c6dfe
...
@@ -31,7 +31,7 @@ public class HostnameFilter implements Filter {
...
@@ -31,7 +31,7 @@ public class HostnameFilter implements Filter {
@EJB
@EJB
private
SessionMgmtBeanLocal
sessionmgmt
;
private
SessionMgmtBeanLocal
sessionmgmt
;
p
rivate
static
final
String
HTTP_TRAIL_NAME
=
"lanbortal_http_trail"
;
p
ublic
static
final
String
HTTP_TRAIL_NAME
=
"lanbortal_http_trail"
;
/**
/**
* Default constructor.
* Default constructor.
...
...
code/LanBortalWeb/src/fi/insomnia/bortal/web/ErrorPageView.java
View file @
f0c6dfe
package
fi
.
insomnia
.
bortal
.
web
;
package
fi
.
insomnia
.
bortal
.
web
;
import
java.io.PrintWriter
;
import
java.io.Serializable
;
import
java.io.StringWriter
;
import
java.util.Calendar
;
import
java.util.Map
;
import
java.util.zip.CRC32
;
import
javax.enterprise.context.RequestScoped
;
import
javax.enterprise.context.RequestScoped
;
import
javax.faces.context.FacesContext
;
import
javax.faces.context.FacesContext
;
import
javax.inject.Inject
;
import
javax.inject.Inject
;
...
@@ -9,22 +16,13 @@ import javax.servlet.http.HttpServletRequest;
...
@@ -9,22 +16,13 @@ import javax.servlet.http.HttpServletRequest;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
java.util.Queue
;
import
fi.insomnia.bortal.HostnameFilter
;
import
java.io.PrintWriter
;
import
java.io.Serializable
;
import
java.io.StringWriter
;
import
java.util.Calendar
;
import
java.util.Map
;
import
java.util.zip.CRC32
;
@Named
@Named
@RequestScoped
@RequestScoped
public
class
ErrorPageView
implements
Serializable
{
public
class
ErrorPageView
implements
Serializable
{
/**
/**
*
*
*/
*/
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
...
@@ -37,7 +35,6 @@ public class ErrorPageView implements Serializable {
...
@@ -37,7 +35,6 @@ public class ErrorPageView implements Serializable {
@SuppressWarnings
(
"unused"
)
@SuppressWarnings
(
"unused"
)
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
ErrorPageView
.
class
);
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
ErrorPageView
.
class
);
public
String
getStackTrace
()
{
public
String
getStackTrace
()
{
FacesContext
context
=
FacesContext
.
getCurrentInstance
();
FacesContext
context
=
FacesContext
.
getCurrentInstance
();
...
@@ -67,7 +64,7 @@ public class ErrorPageView implements Serializable {
...
@@ -67,7 +64,7 @@ public class ErrorPageView implements Serializable {
}
}
public
String
getTime
(){
public
String
getTime
()
{
String
stamp
=
"0x"
+
Long
.
toHexString
(
Calendar
.
getInstance
().
getTimeInMillis
());
String
stamp
=
"0x"
+
Long
.
toHexString
(
Calendar
.
getInstance
().
getTimeInMillis
());
logger
.
error
(
"Error occured at {} trail {}"
,
stamp
,
getTrail
());
logger
.
error
(
"Error occured at {} trail {}"
,
stamp
,
getTrail
());
return
stamp
;
return
stamp
;
...
@@ -75,7 +72,7 @@ public class ErrorPageView implements Serializable {
...
@@ -75,7 +72,7 @@ public class ErrorPageView implements Serializable {
public
String
getTrail
()
{
public
String
getTrail
()
{
HttpServletRequest
req
=
(
HttpServletRequest
)
getContext
().
getExternalContext
().
getRequest
();
HttpServletRequest
req
=
(
HttpServletRequest
)
getContext
().
getExternalContext
().
getRequest
();
Object
trail
=
req
.
getSession
().
getAttribute
(
"trail"
);
Object
trail
=
req
.
getSession
().
getAttribute
(
HostnameFilter
.
HTTP_TRAIL_NAME
);
return
trail
!=
null
?
trail
.
toString
()
:
""
;
return
trail
!=
null
?
trail
.
toString
()
:
""
;
}
}
...
...
code/LanBortalWeb/src/fi/insomnia/bortal/web/cdiview/shop/FoodWaveFoodView.java
View file @
f0c6dfe
...
@@ -144,6 +144,10 @@ public class FoodWaveFoodView extends GenericCDIView {
...
@@ -144,6 +144,10 @@ public class FoodWaveFoodView extends GenericCDIView {
billBean
.
createBill
(
bill
);
billBean
.
createBill
(
bill
);
// TODO: do this right way
eventBean
.
flushCache
();
return
bill
;
return
bill
;
}
}
...
...
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