3.0 Content Viewer Component

Showing results for 
Search instead for 
Did you mean: 

3.0 Content Viewer Component

0 0 1,115

Obsolete Pages{{Obsolete}}

The official documentation is at: http://docs.alfresco.com


This page contains the current WIP thoughts for the content viewer component for use in the 3.0 release.


The content viewer component is responsible for rendering content of differing types. The component is given the noderef of some content, determines what it is and provides the most appropriate display medium.




The first place the component will look for a nodeRef will be the component instance data, if it finds one it will take precedence over the supplied nodeRef as the component has been configured within a site.

Once the content has been retrieved the component needs to select a ‘viewer’ to show the content being pointed to, the best 'viewer' will be selected using the mime type and the component configuration, explained in the next section.

The selected viewer is then added to the model passed to the template. Finally, depending on the viewer selected the template renders the appropriate section to display the content.


If a format is not provided as a parameter the viewer to use will be decided from the following configuration...

<content mimetype=”text/plain” viewer=”text” />
<content mimetype=”text/html” viewer=”text” />
<content mimetype=”text/xml” viewer=”xml” />
<content mimetype=”video/mpeg” viewer=”media” />
<content mimetype=”video/audio” viewer=”media” />
<content mimetype='application/rss+xml' viewer='rss' />

Could we use the same ‘controls’ as the property sheet stuff, this will allow people to re-use controls across the app?


User preference data may also be present i.e. the dimensions of the ‘viewer’.


When the component is configured in a site the nodeRef to be used can be configured, this needs to be captured somehow (this depends somewhat on the framework and app model).
Engineering Notes