Difference between revisions of "GalleryView Options"

From Lianjapedia
Jump to: navigation, search
Line 1: Line 1:
''Under Construction''
+
 
 +
==See Also==
 +
[[GalleryView Section Attributes]]
 +
 
 +
==Overview==
 +
 
 +
[[{{ns:file}}:gallery_web1.png|450px|thumb|left|link={{filepath:gallery_web1.png}}|GalleryView Section in Lianja Web Client]]
 +
 
 +
 
 +
 
 +
 
 +
GalleryView Sections are used to display a gallery of Tiles.
 +
 
 +
 +
<br clear=all>
 +
 
 +
[[{{ns:file}}:gallery_web2.png|450px|thumb|left|link={{filepath:gallery_web2.png}}|GalleryView Section in Lianja Web Client: expanded]]
 +
 
 +
 
 +
 
 +
 
 +
Clicking a Tile displays the Content.
 +
 
 +
Click the '''x''' in the top right of the Content to return to the Tiles.
 +
 
 +
<br clear=all>
 +
 
 +
==Lianja GalleryView Demo==
 +
[[{{ns:file}}:gallery1.png|450px|thumb|left|link={{filepath:gallery1.png}}|example_galleryview App]]
 +
 
 +
 
 +
 
 +
 
 +
The 'Lianja GalleryView Demo' (example_galleryview) is included in the Lianja App Builder distribution to demonstrate the use of a GalleryView Section.
 +
 
 +
<br clear=all>
 +
 
 +
[[{{ns:file}}:gallery2.png|450px|thumb|left|link={{filepath:gallery2.png}}|example_galleryview App]]
 +
<br clear=all>
 +
 
 +
==GalleryView Section options==
 +
 
 +
[[{{ns:file}}:gallery_options.png|450px|thumb|left|link={{filepath:gallery_options.png}}|GalleryView Section options]]
 +
 
 +
 
 +
 
 +
 
 +
GalleryView Sections are based on the 'galleryview.rsp' Lianja Server Page script located in the Library.
 +
 
 +
The 'Lianja GalleryView Demo' App uses default values included in galleryview.rsp, so the Attributes are not populated.  Their purpose and examples are shown below.
 +
 
 +
<br clear=all>
 +
 
 +
[[{{ns:file}}:gallery_tile.png|450px|thumb|left|link={{filepath:gallery_tile.png}}|GalleryView Section options: Tile]]
 +
 
 +
 
 +
 
 +
 
 +
This screenshot shows how you would specify the same Tile using the GalleryView options Attributes.
 +
 
 +
<br clear=all>
 +
 
 +
[[{{ns:file}}:gallery_content.png|450px|thumb|left|link={{filepath:gallery_content.png}}|GalleryView Section options: Content]]
 +
 
 +
 
 +
 
 +
 
 +
This screenshot shows how you would specify the same Content using the GalleryView options Attributes.
 +
 
 +
<br clear=all>
 +
The Details section at the top of the attributes dialog holds the specification of the '''database''' and '''table'''.  These default to southwind and employees in the galleryview.rsp script.
 +
 
 +
The following GalleryView Section section-specific options are available:
 +
 
 +
===Tile caption===
 +
The '''Tile caption''' Attribute specifies the name of the column in the table (or expression) containing the caption for each Tile.
 +
 
 +
The 'Lianja GalleryView Demo' App uses the default value.  This is equivalent to:
 +
 
 +
<pre>concat(alltrim(firstname),' ',alltrim(lastname),'<br>',alltrim(address),'<br>',alltrim(city),
 +
'<br>',alltrim(region),'<br>',alltrim(country))</pre>
 +
 
 +
Note the use of the [[CONCAT()|concat()]] function and the HTML line break tag.
 +
 
 +
===Tile category===
 +
The '''Tile category''' Attribute specifies the name of the column in the table (or expression) containing the category caption for each Tile.
 +
 
 +
The 'Lianja GalleryView Demo' App uses the default value, the title column:
 +
 
 +
<pre>title</pre>
 +
 
 +
===Content title===
 +
The '''Content title''' Attribute specifies an expression to be used as the title of the Content.
 +
 
 +
The 'Lianja GalleryView Demo' App uses the default value.  This is equivalent to:
 +
 
 +
<pre>concat(alltrim(firstname),' ',alltrim(lastname))</pre>
 +
 
 +
===Content details===
 +
The '''Content details''' Attribute specifies the name of the column in the table containing the Content (typically a varchar/memo).
 +
 
 +
The 'Lianja GalleryView Demo' App uses the default value, the notes column:
 +
 
 +
<pre>notes</pre>
 +
 
 +
===Custom library===
 +
The optional '''Custom library''' Attribute specifies the Custom library containing the Tile producer and Content producer delegates.  These allow you to define your own Tile and Content layouts if you do not want to use the default ones.
 +
 
 +
The '''Custom library''' should be the name of a Lianja script file (.prg).  Clicking on the [...] button will automatically generate the name of the script file and take you to the Script Editor in the Apps Workspace to edit the file.  It will be loaded as a procedure library by galleryview.rsp.
 +
 
 +
<pre>libgv_page1_section1.prg</pre>
 +
 
 +
e.g. GalleryView Section using the southwind!customers table
 +
<pre>// libgv_page1_section1.prg
 +
// The Tile and Content delegates just output HTML
 +
// Use the '?' display command followed by a character string
 +
// or enclose text in a 'text raw' 'endtext' block
 +
// Use '&' for macro substitution
 +
 
 +
proc myTileDelegate()
 +
private m_title = customerid
 +
private m_category = contactname
 +
text raw
 +
<h2 class="title title--preview">&m_title</h2>
 +
<div class="loader"></div>
 +
<span class="category">&m_category</span>
 +
endtext
 +
endproc
 +
 
 +
proc myContentDelegate()
 +
private m_contenttitle = contactname
 +
private m_content = notes
 +
? '<h2 class="title title--full">&m_contenttitle</h2>'
 +
? '<p>'
 +
? m_content
 +
? '</p>'
 +
endproc</pre>
 +
 
 +
===Tile producer===
 +
The optional '''Tile producer''' Attribute specifies the Delegate to call to render a custom Tile.
 +
 
 +
<pre>myTileDelegate</pre>
 +
 
 +
See above for the script used in the screenshot.
 +
 
 +
[[{{ns:file}}:gallery_tileproducer.png|450px|thumb|left|link={{filepath:gallery_tileproducer.png}}|Tile producer]]
 +
 
 +
<br clear=all>
 +
 
 +
===Content producer===
 +
The optional '''Content producer''' Attribute specifies the Delegate to call to render the Content.
 +
 
 +
<pre>myContentDelegate</pre>
 +
 
 +
See above for the script used in the screenshot.
 +
 
 +
[[{{ns:file}}:gallery_contentproducer.png|450px|thumb|left|link={{filepath:gallery_contentproducer.png}}|Content producer]]
 +
 
 +
<br clear=all>
 +
 
 +
===Filter===
 +
The optional '''Filter''' Attribute specifies the filter expression that restricts which records will be included.
 +
 
 +
e.g. GalleryView Section using the southwind!customers table
 +
<pre>customerid < "N"</pre>
 +
 
 +
===Order by===
 +
The optional '''Order by''' Attribute specifies the orderby expression for the data in the GalleryView.
 +
 
 +
e.g. GalleryView Section using the southwind!customers table
 +
<pre>country</pre>
 +
 
 +
==Notes on Client Support==
  
 
{| class="wikitable" width="100%"
 
{| class="wikitable" width="100%"
 
!width="20%"|Attribute
 
!width="20%"|Attribute
!width="80%"|Description
+
!width="80%"|Notes
 +
|-
 +
|valign="top"|Tile caption||-
 
|-
 
|-
|valign="top"|Tile caption||The name of the column in the table (or expression) containing the caption for each tile
+
|valign="top"|Tile category||-
 
|-
 
|-
|valign="top"|Tile category||The name of the column in the table (or expression) containing the category caption for each tile
+
|valign="top"|Content title||-
 
|-
 
|-
|valign="top"|Content details||The name of the column in the table containing the content (typically a varchar/memo)
+
|valign="top"|Content details||-
 
|-
 
|-
|valign="top"|Custom library||Custom library containing the Tile producer and Content producer delegates
+
|valign="top"|Custom library||-
 
|-
 
|-
|valign="top"|Tile producer||Delegate to call to render a custom tile.  This should just output the HTML
+
|valign="top"|Tile producer||-
 
|-
 
|-
|valign="top"|Content producer||Delegate to call to render the content.  This should just output the HTML
+
|valign="top"|Content producer||-
 
|-
 
|-
|valign="top"|Filter||The filter expression that restricts which records will be included
+
|valign="top"|Filter||-
 
|-
 
|-
|valign="top"|Order by||The orderby expression for the data in the GalleryView
+
|valign="top"|Order by||-
 
|-
 
|-
 
|}
 
|}

Revision as of 11:32, 27 October 2015

See Also

GalleryView Section Attributes

Overview

GalleryView Section in Lianja Web Client



GalleryView Sections are used to display a gallery of Tiles.



GalleryView Section in Lianja Web Client: expanded



Clicking a Tile displays the Content.

Click the x in the top right of the Content to return to the Tiles.


Lianja GalleryView Demo

example_galleryview App



The 'Lianja GalleryView Demo' (example_galleryview) is included in the Lianja App Builder distribution to demonstrate the use of a GalleryView Section.


example_galleryview App


GalleryView Section options

GalleryView Section options



GalleryView Sections are based on the 'galleryview.rsp' Lianja Server Page script located in the Library.

The 'Lianja GalleryView Demo' App uses default values included in galleryview.rsp, so the Attributes are not populated. Their purpose and examples are shown below.


GalleryView Section options: Tile



This screenshot shows how you would specify the same Tile using the GalleryView options Attributes.


GalleryView Section options: Content



This screenshot shows how you would specify the same Content using the GalleryView options Attributes.


The Details section at the top of the attributes dialog holds the specification of the database and table. These default to southwind and employees in the galleryview.rsp script.

The following GalleryView Section section-specific options are available:

Tile caption

The Tile caption Attribute specifies the name of the column in the table (or expression) containing the caption for each Tile.

The 'Lianja GalleryView Demo' App uses the default value. This is equivalent to:

concat(alltrim(firstname),' ',alltrim(lastname),'<br>',alltrim(address),'<br>',alltrim(city),
'<br>',alltrim(region),'<br>',alltrim(country))

Note the use of the concat() function and the HTML line break tag.

Tile category

The Tile category Attribute specifies the name of the column in the table (or expression) containing the category caption for each Tile.

The 'Lianja GalleryView Demo' App uses the default value, the title column:

title

Content title

The Content title Attribute specifies an expression to be used as the title of the Content.

The 'Lianja GalleryView Demo' App uses the default value. This is equivalent to:

concat(alltrim(firstname),' ',alltrim(lastname))

Content details

The Content details Attribute specifies the name of the column in the table containing the Content (typically a varchar/memo).

The 'Lianja GalleryView Demo' App uses the default value, the notes column:

notes

Custom library

The optional Custom library Attribute specifies the Custom library containing the Tile producer and Content producer delegates. These allow you to define your own Tile and Content layouts if you do not want to use the default ones.

The Custom library should be the name of a Lianja script file (.prg). Clicking on the [...] button will automatically generate the name of the script file and take you to the Script Editor in the Apps Workspace to edit the file. It will be loaded as a procedure library by galleryview.rsp.

libgv_page1_section1.prg

e.g. GalleryView Section using the southwind!customers table

// libgv_page1_section1.prg
// The Tile and Content delegates just output HTML
// Use the '?' display command followed by a character string
// or enclose text in a 'text raw' 'endtext' block
// Use '&' for macro substitution

proc myTileDelegate()
	private m_title = customerid
	private m_category = contactname
	text raw
	<h2 class="title title--preview">&m_title</h2>
	<div class="loader"></div>
	<span class="category">&m_category</span>
	endtext
endproc

proc myContentDelegate()
	private m_contenttitle = contactname
	private m_content = notes
	? '<h2 class="title title--full">&m_contenttitle</h2>'
	? '<p>'
	? m_content
	? '</p>'
endproc

Tile producer

The optional Tile producer Attribute specifies the Delegate to call to render a custom Tile.

myTileDelegate

See above for the script used in the screenshot.

Tile producer


Content producer

The optional Content producer Attribute specifies the Delegate to call to render the Content.

myContentDelegate

See above for the script used in the screenshot.

Content producer


Filter

The optional Filter Attribute specifies the filter expression that restricts which records will be included.

e.g. GalleryView Section using the southwind!customers table

customerid < "N"

Order by

The optional Order by Attribute specifies the orderby expression for the data in the GalleryView.

e.g. GalleryView Section using the southwind!customers table

country

Notes on Client Support

Attribute Notes
Tile caption -
Tile category -
Content title -
Content details -
Custom library -
Tile producer -
Content producer -
Filter -
Order by -