Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Riina Antikainen
/
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 e6a46dde
authored
Mar 01, 2014
by
Liv Haapala
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lisätty juttuja userin csv-exporttiin
1 parent
91916caf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
8 deletions
code/MoyaWeb/src/fi/codecrew/moya/web/cdiview/user/UserCartView.java
code/MoyaWeb/src/fi/codecrew/moya/web/cdiview/user/UserCartView.java
View file @
e6a46dd
...
...
@@ -44,14 +44,19 @@ public class UserCartView extends GenericCDIView {
public
StreamedContent
getDownloadCsv
()
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
"firstname"
).
append
(
CSV_SEPARATOR
);
sb
.
append
(
"lastname"
).
append
(
CSV_SEPARATOR
);
sb
.
append
(
"nick"
).
append
(
CSV_SEPARATOR
);
sb
.
append
(
"login"
).
append
(
CSV_SEPARATOR
);
sb
.
append
(
"birthday"
).
append
(
CSV_SEPARATOR
);
sb
.
append
(
"phone"
).
append
(
CSV_SEPARATOR
);
sb
.
append
(
"email"
).
append
(
CSV_SEPARATOR
);
sb
.
append
(
"places"
).
append
(
CSV_SEPARATOR
);
sb
.
append
(
"Firstname"
).
append
(
CSV_SEPARATOR
);
sb
.
append
(
"Lastname"
).
append
(
CSV_SEPARATOR
);
sb
.
append
(
"Nick"
).
append
(
CSV_SEPARATOR
);
sb
.
append
(
"Login"
).
append
(
CSV_SEPARATOR
);
sb
.
append
(
"Birthday"
).
append
(
CSV_SEPARATOR
);
sb
.
append
(
"Age"
).
append
(
CSV_SEPARATOR
);
sb
.
append
(
"Phone"
).
append
(
CSV_SEPARATOR
);
sb
.
append
(
"Email"
).
append
(
CSV_SEPARATOR
);
sb
.
append
(
"Street"
).
append
(
CSV_SEPARATOR
);
sb
.
append
(
"Zip"
).
append
(
CSV_SEPARATOR
);
sb
.
append
(
"City"
).
append
(
CSV_SEPARATOR
);
sb
.
append
(
"Places"
).
append
(
CSV_SEPARATOR
);
sb
.
append
(
"\n"
);
for
(
EventUser
uc
:
usercart
)
{
...
...
@@ -60,8 +65,12 @@ public class UserCartView extends GenericCDIView {
sb
.
append
(
uc
.
getNick
()).
append
(
CSV_SEPARATOR
);
sb
.
append
(
uc
.
getLogin
()).
append
(
CSV_SEPARATOR
);
sb
.
append
(
uc
.
getBirthday
()
!=
null
?
dateformat
.
format
(
uc
.
getBirthday
())
:
""
).
append
(
CSV_SEPARATOR
);
sb
.
append
(
uc
.
getUser
().
getAge
()).
append
(
CSV_SEPARATOR
);
sb
.
append
(
uc
.
getPhone
()).
append
(
CSV_SEPARATOR
);
sb
.
append
(
uc
.
getEmail
()).
append
(
CSV_SEPARATOR
);
sb
.
append
(
uc
.
getAddress
()).
append
(
CSV_SEPARATOR
);
sb
.
append
(
uc
.
getZip
()).
append
(
CSV_SEPARATOR
);
sb
.
append
(
uc
.
getUser
().
getTown
()).
append
(
CSV_SEPARATOR
);
for
(
GroupMembership
gm
:
uc
.
getGroupMemberships
())
{
if
(
gm
.
getPlaceReservation
()
!=
null
)
...
...
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