I070 – Create a view
What you will learn ?
How to configure views.
STEP 1 : Views list
The list of views is accessed via the Interface / View menu.
A view can be defined to become:
- User’s home page: it will set as the homepage of users (Users and rights / User menu)
- Group’s home page: it will set as the homepage of users (Users and rights / Group menu)
- Domain’s home page : associating the view to a domain (Administration / Main menu)
- A tab of a business object: this can be created by creating a right function and associate the object to the view
- A specific view: the page can be used to access via an external object (via
HTLMtool.getViewURL
)
STEP 2 : Create a view
Click the create button (icon +), enter the field of view:
- Unique code
- Icon code : displayed icon for the page
- Scope : name of a local scope : a scope group home pages (views)
- Template: HTML form syntax, containing ordered areas [AREA:n]
- Order: specify a display order (corresponds to the order of the tab when there are several on the object) otherwise default to 1
- Disposition : disposition site when the view is displayed
- Module
Exercise:
Create a view that will host the Customer area:
- Name =
AppVueClient
- Icon =
home
- Template: simple with 2 zones one under the other [AREA 1]
[AREA: 2] – Use the View template editor to position areas - Order = 1
- Module =
MyModule
- No specific disposition
- No scope
STEP 3 : Add areas to a view
Each area of the template view must have its match in the “Area” tab of the view. Click on “Create” in this tab to add an area:
- View name: already pre-selected
- Position: type a position corresponding to a area number [AREA: n] in the template view
- Title enabled : display or not a title for the area
- Module name : Choose a module
- Type: select a area type: Date, Login, Search, text code, child list, External Page, Image, Cross table … Depending on the type, specify one of the following fields:
- Preset search name: reference of an already registered predefined search
- Filter to add : additive SQL filter
- Text Code: To view a translated text, enter the text code (translate in Administration / Static Text)
- Child object;RefField: always specify the name of the object to use in the area (for a search, a cross table …) and if it is a link, type the name of the reference used (separated by semicolons)
- External page: specify the access page URL
- Image: enter the URL of the image to display
- Graph name: Choose a previously configured graph
- Pivot table name: select a table previously configured
- Publication template code: choose a configured publication template
Exercise:
Add 2 areas at the AppVueClient
view
- Area 1: the list of customers (ex. a search on all
cliType
=CTM
) - Be careful to fill in the
Object
withAppClient
STEP 4 : Area 2 Pivot table
Exercise
- Area 2: the pivot table
AppClientTC
- Child Object;RefField =
AppClient
Pivot table options on a View
To customize the rendering use the External page
attribute to add optional parameters (URL encoded).
For example: External page = &zgraph=bar_stack&zcontrol=no&zwidth=600&zheight=400&zstotal=no&ztable=yes&zcaption=right&zpreci=2
Options:
ztable
=yes
/no
to show/hide the pivot tablezcaption
=top
|left
|right
|bottom
to display the table caption, or empty to hide the captionzcontrol
=yes
/no
to show/hide controlszgraph
= default chart rendering =pie
|line
|bar
|bar_stack
|area
|area_stack
… or empty string to hide the chartzgraph_<fieldname>
= chart rendering per seriezsplit
=yes
/no
to split x-axis into distinct chartszwidth
= chart width in pxzheight
= chart height in pxzstotal
=yes
/no
to show/hide the sub-totals in gridzstcolor
= default sub-total colorzpreci
= float decimal precisionzmethod
=T
:textual |S
:sum |P
:product |A
:average |G
:geometric |L
:min |H
:max |F
:formula
STEP 7 : Domain Home Page
A domain has a home by default which lists all recently used objects. Another specific view can be assigned as the home page of a domain.
Exercise:
- Test the default homepage customer domain (
Sales
menu / Home) - Change the home using
AppVueClient
view: openMyDomain
code domain Adminstration / Main menu and change its view - Clear the cache and click on the homepage sales menu
STEP 9 : External object
Another possibility is to create a view through an external object, accessible via the menu:
- Create an external object with the following URL:
[EXPR:HTLMToll.getViewURL("AppVueClient")
- Add
MyAdminGroup
to grant external object reading function (Users and rights menu) - Position the external object in the main menu (Interface menu)
Exercise:
Use the view AppVueClient
to make it accessible via a menu item.
I060 – Disposition
How to create a specific disposition.