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 7b45166f
authored
Jun 12, 2010
by
Tuomas Riihimäki
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of dev.intra.insomnia.fi:/data/bortal
2 parents
e56e038e
0185b6ab
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
1 deletions
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/beans/PlaceMapBean.java
code/LanBortalBeansClient/ejbModule/fi/insomnia/bortal/beans/PlaceMapBeanLocal.java
code/LanBortalDatabase/src/fi/insomnia/bortal/model/Product.java
code/LanBortalWeb/WebContent/resources/tools/map/placeSelect.xhtml
code/LanBortalWeb/src/fi/insomnia/bortal/view/MapView.java
code/LanBortalBeans/ejbModule/fi/insomnia/bortal/beans/PlaceMapBean.java
View file @
7b45166
...
@@ -125,4 +125,8 @@ public class PlaceMapBean implements PlaceMapBeanLocal {
...
@@ -125,4 +125,8 @@ public class PlaceMapBean implements PlaceMapBeanLocal {
return
"/PlaceMap"
+
parameters
;
return
"/PlaceMap"
+
parameters
;
// TODO: do something.
// TODO: do something.
}
}
public
int
selectablePlaceCount
(
User
user
,
Event
currentEvent
)
{
throw
new
UnsupportedOperationException
(
"Not supported yet."
);
}
}
}
code/LanBortalBeansClient/ejbModule/fi/insomnia/bortal/beans/PlaceMapBeanLocal.java
View file @
7b45166
...
@@ -17,6 +17,8 @@ public interface PlaceMapBeanLocal {
...
@@ -17,6 +17,8 @@ public interface PlaceMapBeanLocal {
void
printPlaceMapToStream
(
OutputStream
outputStream
,
String
filetype
,
Event
event
,
Integer
mapId
,
Integer
userId
,
List
<
Integer
>
placeIds
)
throws
IOException
;
void
printPlaceMapToStream
(
OutputStream
outputStream
,
String
filetype
,
Event
event
,
Integer
mapId
,
Integer
userId
,
List
<
Integer
>
placeIds
)
throws
IOException
;
public
String
getSelectPlaceMapUrl
(
EventMap
activeMap
,
List
<
Place
>
selectedPlaces
,
User
user
);
public
String
getSelectPlaceMapUrl
(
EventMap
activeMap
,
List
<
Place
>
selectedPlaces
,
User
user
);
public
int
selectablePlaceCount
(
User
user
,
Event
currentEvent
);
// public EventMap findMap(int i);
// public EventMap findMap(int i);
}
}
code/LanBortalDatabase/src/fi/insomnia/bortal/model/Product.java
View file @
7b45166
...
@@ -53,6 +53,9 @@ public class Product implements EventChildInterface {
...
@@ -53,6 +53,9 @@ public class Product implements EventChildInterface {
@Column
(
name
=
"barcode"
)
@Column
(
name
=
"barcode"
)
private
String
barcode
;
private
String
barcode
;
@Column
(
name
=
"prepaid"
)
private
boolean
prepaid
=
false
;
@OneToMany
(
cascade
=
CascadeType
.
ALL
,
mappedBy
=
"product"
)
@OneToMany
(
cascade
=
CascadeType
.
ALL
,
mappedBy
=
"product"
)
private
List
<
Place
>
places
;
private
List
<
Place
>
places
;
...
@@ -212,4 +215,18 @@ public class Product implements EventChildInterface {
...
@@ -212,4 +215,18 @@ public class Product implements EventChildInterface {
return
foodWaveTemplates
;
return
foodWaveTemplates
;
}
}
/**
* @return the prepaid
*/
public
boolean
isPrepaid
()
{
return
prepaid
;
}
/**
* @param prepaid the prepaid to set
*/
public
void
setPrepaid
(
boolean
prepaid
)
{
this
.
prepaid
=
prepaid
;
}
}
}
code/LanBortalWeb/WebContent/resources/tools/map/placeSelect.xhtml
View file @
7b45166
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
<h:form>
<h:form>
<h:commandButton
image=
"#{mapView.selectPlaceMapUrl}"
actionListener=
"#{mapView.placeSelectActionListener}"
/>
<h:commandButton
image=
"#{mapView.selectPlaceMapUrl}"
actionListener=
"#{mapView.placeSelectActionListener}"
/>
<h:outputText
value=
"#{i18n['placeSelect.left']}: #{mapView.placeLeftToSelect}"
/>
</h:form>
</h:form>
...
...
code/LanBortalWeb/src/fi/insomnia/bortal/view/MapView.java
View file @
7b45166
...
@@ -122,4 +122,10 @@ public class MapView {
...
@@ -122,4 +122,10 @@ public class MapView {
public
void
setSessionHandler
(
SessionHandler
sessionHandler
)
{
public
void
setSessionHandler
(
SessionHandler
sessionHandler
)
{
this
.
sessionHandler
=
sessionHandler
;
this
.
sessionHandler
=
sessionHandler
;
}
}
public
String
placeLeftToSelect
()
{
int
totalPlaces
=
placeMapBean
.
selectablePlaceCount
(
sessionHandler
.
getUser
(),
sessionHandler
.
getCurrentEvent
());
return
(
totalPlaces
-
selectedPlaces
.
size
())+
""
;
}
}
}
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