Customization
A map page extends com.manydesigns.portofino.pageactions.map.MapAction, you can override any method of it.
SUMMARY
Hooks
MapAction defines several hooks, predefined methods in Portofino, to extend its behavior.
void loadObjects()
This method loads the objects for the map view. In the predefined example it calls loadMarkers .
loadMarkers()
This is an example method that defines new "Marker" objects and add them in "Map" list.
Position markerPosition = new Position( new BigDecimal( 44.405650), new BigDecimal( 8.946256 )); map.addMarker( new Marker( "Genova", "ManyDesigns Office", markerPosition, "http://www.manydesigns.com"));
Useful objects
The action give to you the following objects that you can use in your methods:
context
The Stripes context, e.g. you can obtain the request from it.
originalPath
A string with the current path.
model
A com.manydesigns.portofino.model.Model, which stores all the information about the databases (e.g. tables, columns, ...).
portofinoConfiguration
This object stores all the configuration properties.
application
The Application object which store all common data of your application(e.g. all Hibernate sessions).
logger
The org.slf4j.Logger that you can use to log your activities.