3.0 Content Viewer Component

Document created by resplin Employee on Jun 6, 2015
Version 1Show Document
  • View in full screen mode

Obsolete Pages{{Obsolete}}

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




Introduction


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


Overview


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.


API


/viewcontent?noderef=xyz


Implementation


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.


Configuration


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?


Preferences


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


Edit


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).
3.0
Engineering Notes

Attachments

    Outcomes