Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

 

 

Description

The gallery widget provides a way to display a collection of images as a grid of enlargeable thumbnails, with the thumbnail size depending on the number of images in the collection, ranging from a single large thumbnail to nine small thumbnails in a 3x3 grid. It implements paging similar to that of the table widget, with a maximum of nine thumbnails per page.

 

 

Syntax

Code Block
languagejava
titleExample
linenumberstrue
<gallery title="my.gallery.heading" imageAttribute="image" descriptionAttribute="description">
    <collectionSource function="getObjectsWithImageBlobs"/>
    <binding variable="selectedObject"/>
</gallery>

In the above example, the "getObjectsWithImageBlobs" function needs to return a collection of custom DSL objects with an "image" attribute that is of the primitive type blob. The FileUpload widget can be used to upload images as blobs (if the image data aren't provided from an external source, as is often done). Similarly, the object attribute specified for the descriptionAttribute attribute must be of type string.

 

 

User Interaction

Single-clicking on an image thumbnail will highlight and bind the selected image's object to the specified binding variable. Double-clicking a thumbnail will open the full size image in a pop-up modal. Click anywhere on the screen to close the modal.

 

Captions that are too long for the allotted caption space underneath the thumbnails will but cut off and end with an ellipsis ("...") instead. Hovering your mouse over the caption for one second will make a tooltip with the full caption appear.

 

 

Paging

For large data sets the galler widget provides a paging mechanism. When a view with a gallery is loaded the default behaviour will be to display at most nine image thumbnails per page. This can, however, be adjusted by selecting the page size in the middle of the gallery footer area.

The page size options available start at 9 rows and is incremented by 9 all the way to a maximum of 99 records per page. Note that if the total number of records from the collection source is less that 99 and not a multiple of 9, the total number of rows will also be shown as an option. Also note that the page size option will only be visible when the number of records from the collection source exceeds 9.

 

 

Additional Mentions And References