[Cubicweb] views dont refresh

Sylvain Thénault sylvain.thenault at logilab.fr
Mon Aug 3 08:42:35 CEST 2009


On 02 août 17:12, Nicolas Chauvat wrote:
> On Sun, Aug 02, 2009 at 05:37:31PM +0530, Dhaval Sharma wrote:
> > Good, and when you do CTRL+R it refreshes the registery. isn' it?
> 
> No. The Shift-Ctrl-R is just for overriding the cache. It has no
> effect on the registry.
> 
> > Okay, can you throw some light on selector magic and the cell and row game
> > that the framework plays?
> 
> The views are defined with a __select__ attribute which is a set of
> functions that compute a score when given a resultset.

more generally, given a "context" (which may contains a rset)
> Each time the web engine wants to display a resultset, it looks up the
> registry for the views with id <younameit> that could be used for that
> resultset. The view with the highest score is the one the web app will
> use to display the resultset.

Also, the context may contains a "row" and "col" additionaly to a rset,
specifying if we're interested about the rset as a whole (eg no row/col
specified), or about a specific cell of this rset (eg rset[row][col]).

> > Briefly how many inbuilt objects does the view carry and what can we do with
> > them?
> 
> View is the generic term for the classes that will be given a
> resultset and expected to generate some output. Output could be HTML,
> JSON, XML, PDF, PNG, etc.
> 
> You define views and name them with the id attribute and explain what
> resultset they can handle with the __select__ attribute.

and of course, views may call some other views.

 
> > How can I place those actions in say , side boxes or main menu bar?

First, 'actions' is a concept taken from the Zope CMF framework.

Currently, actions are dispatched according to their category:
* mainactions, for first level actions of the "actions" box
* moreactions, for actions of the "more actions" submenu of the "actions" box
* useractions, for actions in the drop-down menu appearing when you click on 
  the logged user link

of course you can define your own categories, and call the api to retreive
actions by category.
-- 
Sylvain Thénault                               LOGILAB, Paris (France)
Formations Python, Debian, Méth. Agiles: http://www.logilab.fr/formations
Développement logiciel sur mesure:       http://www.logilab.fr/services
CubicWeb, the semantic web framework:    http://www.cubicweb.org




More information about the Cubicweb mailing list