Ticket #908 (closed Enhancement: fixed)

Opened 9 years ago

Last modified 9 years ago

Webclient framework: composite renderers

Reported by: jri Owned by: jri
Priority: Major Milestone: Release 4.8
Component: DeepaMehta Standard Distribution Version: 4.7
Keywords: Cc: dgf, Malte
Complexity: 5 Area: Application Framework / API
Module: deepamehta-webclient

Description (last modified by jri) (diff)

At the moment Webclient's detail panel allows to plug in simple renderers (for simple values), and multi renderers (for cardinality "many" values), page renderers (take control of the entire detail panel). What is missing is composite renderers for composite values.

Change History

comment:1 Changed 9 years ago by jri

  • Status changed from new to accepted

comment:2 Changed 9 years ago by jri

  • Description modified (diff)

comment:3 Changed 9 years ago by Jörg Richter <jri@…>

In 05099a2c2557fd24eac2fc22e4ec0e1295cececa/deepamehta:

Webclient: pluggable composite renderers (#908).

A composite renderer can be registered like a simple renderer:

dm4c.add_simple_renderer(renderer_uri, renderer)

Also the renderers info and form methods are analogous to a simple renderer, instead that page_model (as passed by the webclient) is a composite model:

render_info(page_model, parent_element, level)
render_form(page_model, parent_element, level)

At the moment the function to process a composite form is still hardcoded.
So, at the moment render_form() is not required to return the form processing function.

In a View Configuration you setup a composite renderer by setting Simple Renderer URI to the renderer's URI.
So, there is no new view config type added. Simple Renderer URI is used for both, simple renderers, and composite renderers.

The wording Simple Renderer is about to be changed to Single Renderer, in order to contrast it to Multi Renderer. A Single Renderer renders a single topic, regardless if it is a simple one, or a composite one.

BREAKING CHANGE

The render_form() method is now responsible for rendering the field labels too. Thus your renderer have full control about how/wether the labels of the form fields are rendered.

See #908.

comment:4 Changed 9 years ago by Jörg Richter <jri@…>

In d9648b760b23095c0c2a3a0c6d2c25d6ba6459e3/deepamehta:

Webclient: pluggable form reading function (#908).

The function that reads the user input of a composite form is pluggable as well. A composite renderer's render_form() hook must return the form reading function. The form reading function receives no parameters and must return an object model that reflects the user input.

See #908.

comment:5 Changed 9 years ago by jri

  • Status changed from accepted to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.