-
Type: Sub-task
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Component/s: Layouts & Widgets
-
Impact type:API added
-
Upgrade notes:
Widgets can already be registered independently from layouts. This makes it pos-
sible to reuse a defined widget in several layouts.
Mechanisms to render a widget independently from a layout already exist: the tag
"nxl:widgetType" does render a widget, but needs the whole widget configuration
as attributes, and the tag "nxl:widget" performs rendering of a given widget instance, that has been already computed by the parent layout.
The nxl:widget tag could be improved to take only the name of a global widget, a mode, the
object to map, and query the layout service to get the configuration. That kind of
tag could be used in every page, inside or outside a form. As a reminder, layouts
and widgets do not require a document model: any kind of object will do, using the
object attribute name (getter/setters need to be available) as field names.
As an alternative, providing a widget definition should also be made possible, to allow dynamic creation of widgets to render.
This can be useful to render widgets referenced by actions for instance.