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 d98296bd
authored
Apr 18, 2010
by
Juho Juopperi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of dev.intra.insomnia.fi:/data/bortal
2 parents
7a1fc681
0e9583c7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
8 deletions
code/LanBortalDatabase/src/fi/insomnia/bortal/model/Product.java
code/LanBortalWeb/src/fi/insomnia/bortal/view/ProductView.java
code/LanBortalDatabase/src/fi/insomnia/bortal/model/Product.java
View file @
d98296b
...
...
@@ -21,7 +21,6 @@ import javax.persistence.Table;
import
javax.persistence.UniqueConstraint
;
import
javax.persistence.Version
;
import
org.eclipse.persistence.annotations.PrimaryKey
;
/**
*
...
...
@@ -212,4 +211,5 @@ public class Product implements EventChildInterface {
public
List
<
FoodWaveTemplate
>
getFoodWaveTemplates
()
{
return
foodWaveTemplates
;
}
}
code/LanBortalWeb/src/fi/insomnia/bortal/view/ProductView.java
View file @
d98296b
...
...
@@ -5,17 +5,15 @@
package
fi
.
insomnia
.
bortal
.
view
;
import
fi.insomnia.bortal.beans.ProductBeanLocal
;
import
fi.insomnia.bortal.beans.RoleBeanLocal
;
import
fi.insomnia.bortal.beans.SecurityBeanLocal
;
import
fi.insomnia.bortal.exceptions.PermissionDeniedException
;
import
fi.insomnia.bortal.handler.SessionHandler
;
import
fi.insomnia.bortal.model.EventMap
;
import
fi.insomnia.bortal.model.Product
;
import
fi.insomnia.bortal.model.Role
;
import
java.util.List
;
import
java.util.Map
;
import
javax.ejb.EJB
;
import
javax.faces.bean.ManagedBean
;
import
javax.faces.bean.ManagedProperty
;
import
javax.faces.bean.SessionScoped
;
import
javax.faces.context.FacesContext
;
import
javax.faces.event.ActionEvent
;
import
javax.faces.model.DataModel
;
import
javax.faces.model.ListDataModel
;
import
org.slf4j.Logger
;
...
...
@@ -32,9 +30,12 @@ public class ProductView {
@EJB
private
ProductBeanLocal
productBean
;
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
ProductView
.
class
);
@EJB
private
SecurityBeanLocal
securitybean
;
private
EventMap
activeMap
=
null
;
public
DataModel
<
Product
>
getUserShoppableProducts
()
{
ListDataModel
<
Product
>
items
=
new
ListDataModel
<
Product
>(
productBean
.
listUserShoppableProducts
());
...
...
@@ -42,4 +43,41 @@ public class ProductView {
return
items
;
}
/**
* @return the activeMap
*/
public
EventMap
getActiveMap
()
{
return
activeMap
;
}
/**
* @param activeMap the activeMap to set
*/
public
void
setActiveMap
(
EventMap
activeMap
)
{
this
.
activeMap
=
activeMap
;
}
/*
public String placeMapActionListener(ActionEvent e) {
if(activeMap == null)
throw new UnsupportedOperationException("TODO error message");
FacesContext context = FacesContext.getCurrentInstance();
String clientId = e.getComponent().getClientId(context);
Map requestParams = context.getExternalContext().getRequestParameterMap();
int x = new Integer((String) requestParams.get(clientId + ".x")).intValue();
int y = new Integer((String) requestParams.get(clientId + ".y")).intValue();
System.out.println("x: " + x + ", y:" + y);
throw new UnsupportedOperationException();
}*/
}
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