Open syncro opened 1 month ago
Option 1: Implement generic XML element aka wrapper for HTML components.
<htmlDataBinder dataContainer="usersDc" property="username">
<span/>
</htmlDataBinder>
or
<htmlDataBinder dataContainer="usersDc">
<span property="username"/>
<div property="firstName"/>
</htmlDataBinder>
Option 2: Support dataContainer
and property
attributes for HTML components in XML only. Loader creates one-way data binding.
<span dataContainer="usersDc" property="username"/>
Both options assumes something like ReadOnlyDataBidner
that creates one-way data binding for passed component.
In some cases usage of flowui components can be not enough to fit developer's requirements and java-side data assignments to achieve simple display purposes may feel too verbose. So there should be a way to easily render context data into custom ui layout, e.g. to show label with localized field title or span with database entity field value.
Possible solutions:
Add property attribute support for all or most-used and suitable html components, e.g. for container-like ones: span, div, label, headings, lists etc.
Implement new component for data binded output or add data-binding to html/div componets only