Customization
A Gallery page extends com.manydesigns.portofino.pageactions.map.MapAction, you can override any method of it.
SUMMARY
Hooks
GalleryAction defines several hooks, predefined methods in Portofino, to extend its behavior.
void loadImages()
This method loads the images for the gallery view.
This is an example code that defines new "Image" objects and add them in "gallery" list.
Image img = new Image("Image 1","Image 1","","","/images/image1.png","/images/image1_thumb.jpg") gallery.addImage( img )
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.