--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/book/en/B1021-views-stdlib.en.txt Tue Dec 23 13:50:56 2008 -0800
@@ -0,0 +1,65 @@
+.. -*- coding: utf-8 -*-
+
+Predefined views in the library
+-------------------------------
+
+A certain number of views are used to build the web interface, which apply
+to one or more entities. Their identifier is what distinguish them from
+each others and the main ones are:
+
+:primary:
+ primary view of an entity, this is the view called by default when a single
+ entity is in the result set and needs to be displayed. This view is supposed
+ to render a maximum of informations about the entity.
+:secondary:
+ secondary view of an entity. By default it renders the two first attributes
+ of the entity as a clickable link redirecting to the primary view.
+:oneline:
+ similar to the `secondary` view, but called when we want the view to stand
+ on a single line, or just get a brief view. By default this view uses the
+ parameter `MAX_LINE_CHAR` to control the result size.
+:text:
+ similar to the `oneline` view, but should not contain HTML.
+:incontext, outofcontext:
+ similar to the `secondary` view, but called when an entity is considered
+ as in or out of context. By default it respectively returns the result of
+ `textincontext` and `textoutofcontext` wrapped in a link leading to
+ the primary view of the entity.
+:textincontext, textoutofcontext:
+ similar to the `text` view, but called is an entity is considered out or
+ in context. By default it returns respectively the result of the
+ methods `.dc_title` and `.dc_long_title` of the entity.
+:list:
+ creates a HTML list (`<ul>`) and call the view `listitem` for each entity
+ of the result set
+:listitem:
+ redirects by default to the `outofcontext` view
+:rss:
+ creates a RSS/XML view and call the view `rssitem` for each entity of
+ the result set
+:rssitem:
+ create a RSS/XML view for each entity based on the results of the dunblin core
+ methods of the entity (`dc_*`)
+
+Start view:
+
+:index:
+ home page
+:schema:
+ display the schema of the application
+
+Special views:
+
+:noresult:
+ called if the result set is empty
+:finall:
+ display the value of a cell without trasnformation (in case of a non final
+ entity, we see the eid). Applicable on any result set.
+:table:
+ creates a HTML table (`<table>`) and call the view `cell` for each cell of
+ the result set. Applicable on any result set.
+:cell:
+ by default redirects to the `final` view if this is a final entity or
+ `outofcontext` view otherwise
+:null:
+ view always applicable and which does not return anything