gallery:gallery

Purpose

Defines a Gallery widget that displays content items identified in the items attribute.

Contained by

Contains

Attribute groups

Attributes

Attribute Description Type Default Options Use
items Identifies a set of items to be displayed in the gallery. If this attribute is not specified, the default set will be used. xs:string     optional 
slideshow Identifies the Slideshow widget that should be used to display content. If this attribute is not specified, the default Slideshow widget will be used. xs:string     optional 
slideshow-popup Identifies a Popup widget containing a Slideshow widget. Placing the Slideshow widget within a popup lets users display the items on demand. xs:string     optional 

Property

Property Description Type Access
page-number The number of the page being displayed. xs:integer read 

Event

Event Description
value-changed This event is sent whenever the page number changes.

Example

<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/2002/06/xhtml2"
  xmlns:widget="http://www.volantis.com/xmlns/2006/05/widget"
  xmlns:gallery="http://www.volantis.com/xmlns/2006/10/gallery-widget">
  <head>
    <title>Gallery Widget with AJAX</title>
  </head>
  <body>
    <div>
      <gallery:items>
        <widget:load src="http://localhost:8080/mcs/projects/client-app/service/itemgallery"
          when="defer"/>
      </gallery:items>
    </div>
    <table>
      <tr>
        <td>
          <gallery:gallery class="widget" slideshow="slideshow" slideshow-popup="gallery-popup">
            <div>
              <table>
                <tr>
                  <td>
                    <widget:previous>&lt;&lt;</widget:previous>
                  </td>
                  <td>
                    <gallery:item-display/>
                  </td>
                  <td>
                    <gallery:item-display/>
                  </td>
                  <td>
                    <widget:next>&gt;&gt;</widget:next>
                  </td>
                </tr>
              </table>
            </div>
            <div>Displaying items from <gallery:start-item-number/> to <gallery:end-item-number/> of
              <gallery:items-count/></div>
            <div>Page number: <gallery:page-number/> of <gallery:pages-count/></div>
          </gallery:gallery>
        </td>
      </tr>
      <tr>
        <td>
          <widget:popup id="gallery-popup">
            <gallery:slideshow id="slideshow">
              <gallery:item-display/>
              <widget:previous>&lt;&lt;</widget:previous>
              <widget:pause>Pause</widget:pause>
              <widget:play>Play</widget:play>
              <widget:next>&gt;&gt;</widget:next>
              <widget:dismiss>Close</widget:dismiss>
              <div>Displaying item <gallery:item-number/> of <gallery:items-count/></div>
            </gallery:slideshow>
          </widget:popup>
        </td>
      </tr>
    </table>
  </body>
</html>

Related topics