r3 - 01 Jul 2005 - 09:38:34 - LisaDusseaultYou are here: OSAF >  Journal Web  > ZeroPointFourDetailView

Detail View Overview

You can think of the Detail View as a CPIA block that displays any Item. The Item can be a Content Item, an Item Collection (which is also an Item), or pretty much anything in the Repository. The idea is to display the details of that item in some nice way, and provide a way to edit some of those details.

The current implementation in release 0.4 has a few drawbacks when compared to this idealized role.

  • It's not really a single block. Because it shows many details, it's implemented as a tree of blocks, with one or two blocks showing each attribute of an item. Since the Detail View is presented in several different places in the UI, we have to copy the master tree of blocks into those places where it should appear.
  • We can't easily handle different kinds of items. Each Kind of Item has different attributes, and should be displayed with a different layout. But we don't yet have a graceful way to do this inside CPIA. So the Detail View is implemented with a whole bunch of blocks, which show or hide themselves depending on wheather or not the attirbute they display is present.
  • There's no Generic Detail View, so it can't really be used to display any arbitrary item. It will show a few fields, like the Kind of the item, but basically ignore most of the data of the item; It doesn't really have a way to see which attributes are present and show all those attributes.

For the next release (version 0.5) we plan to fix the first two problems, and diminish the impact of the third. The Detail View will be much improved!

A single key idea solves most of our problems; we'll implement a view-selection mechanism that allows the Kind of the Item to determine which view to select for display purposes. We'll build a block-substitution mechanism that will lookup the appropriate tree of blocks to use in a given situation. Then we can just use a single kind-switched block any place we want a Detail View to appear, and the block will be replaced by the appropriate tree of blocks when an item is determined. For each Kind of Item, we'll define a tree of blocks to use when displaying that Item in a Detail View. This should make it easy to add custom Detail Views for new kinds of items, or items developed by 3rd parties. Once our library of "Detail Views" is reasonable, there will be less need for a Generic Detail View, since the common kinds of items will have a pre-defined view.

The implementation for this system is related to the Attribute Renderers that were added to Chandler just before the 0.4 release. Attribute Renderers allow the drawing of an attribute to be based on the kind of data that attribute holds. Essentially, we already have a kind-based switching system for attributes. Now we'll be expanding that system to support entire Items.

-- DonnDenman - 19 Oct 2004

Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r3 < r2 < r1 | More topic actions
 
Open Source Applications Foundation
Except where otherwise noted, this site and its content are licensed by OSAF under an Creative Commons License, Attribution Only 3.0.
See list of page contributors for attributions.