diff --git a/source/import_documentation/Components/Solid-Widget.rst b/source/import_documentation/Components/Solid-Widget.rst index 45304e32d5072e730d3b43a52f83cb3e6033d429..b37e151c2e61719296c624722d5877e25d00a578 100644 --- a/source/import_documentation/Components/Solid-Widget.rst +++ b/source/import_documentation/Components/Solid-Widget.rst @@ -41,17 +41,20 @@ Attributes ~~~~~~~~~~~~~~~ Special attribute which can be inserted in a ``<solid-form>`` or an ``<input>`` within a ``<solid-widget>``. -It associates the ``value`` of the concerned ``field`` in the widget. +When set on an element in the widget, it takes the ``value`` of this element and associate it with the ``field`` targetted by the widget. -If this attribute is combined with ``data-src="${value}"`` the value of the field is directly editable. +If this attribute is combined with ``data-src="${value}"`` on a ``<solid-form>`` in a widget, values from the nested resource are directly editable. It works only if ``value`` is a resource (and not if it's a literal). ``data-src="${value}"`` ~~~~~~~~~~~~~~~~~~~~~~~ -It allows to link the ``id`` of a data, to insert it automatically as ``data-src`` of a ``<solid-form>``. +It is usable to edit a nested resource (ie: a profile of a user, a customer of a project, ...) by creating a ``<solid-form>`` in a ``<solid-widget>``. + +The ``value`` will be the ``@id`` of the nested resource, thus put it in the ``data-src`` will create a form on this nested resource. It cannot be used without ``data-holder`` attribute. + The example below illustrates the input widget with and without ``value="${value}"`` (input's ``value="${value}"`` is equivalent to solid-form's ``data-src="${value}"``) : diff --git a/source/import_documentation/Mixins/store-mixin.rst b/source/import_documentation/Mixins/store-mixin.rst index 1be3565042c00e7c17347b7fe5995156dae065b7..a3ba70b5a4f4ce389770ec141795eb82b7f20707 100644 --- a/source/import_documentation/Mixins/store-mixin.rst +++ b/source/import_documentation/Mixins/store-mixin.rst @@ -35,10 +35,10 @@ Attributes with the attribute ``bind-resources``) but you need to display another field of this source. - The example below illustrates how to use nested-field attribute. - The ``profile`` value is an ``id`` of another resource, it will automatically fetch the ``city``, ``phone``, ``website`` values to display them. + The example below illustrates how to use nested-field attribute : - The second solid-display shows another way to display the values from a nested resource with dot ``.``. + * The ``profile`` is a resource nested in the current resource, it will automatically fetch the ``city``, ``phone``, ``website`` values to display them. + * The second solid-display shows another way to display the values from a nested resource with dot ``.``. .. code:: html