10-11-2016 05:06 AM
Hi,
I would like to get property value form AlfListWiev in a widget Checkbox.
Example:
{
name: "alfresco/lists/views/AlfListView",
config:
{
currentData: {
items: [ { value: "true"}, { value: "false"} ]
},
additionalCssClasses: "bordered",
widgetsForHeader:
[{
name: "alfresco/lists/views/layouts/HeaderCell",
config:
{
additionalCssClasses: "mediumpad",
abel: "title.refInvoice"
}]
widgets:
[{
name: "alfresco/lists/views/layouts/Cell",
config:
{
additionalCssClasses: "mediumpad",
widgets:
[{
name: "alfresco/forms/controls/CheckBox",
config:
{
fieldId: "SHOW",
name: "showValue",
value: "value"
}
}]
}
}]
}
I need your help. Thnks for advance
10-11-2016 09:01 AM
The CheckBox is a form control and usually not used for rendering data in a table-like structure. As such it does not support getting the value from the current list item on its own. For display purposes you may use the alfresco/renderers/Boolean widget.
10-11-2016 09:01 AM
The CheckBox is a form control and usually not used for rendering data in a table-like structure. As such it does not support getting the value from the current list item on its own. For display purposes you may use the alfresco/renderers/Boolean widget.
10-11-2016 09:37 AM
I just want to elaborate on Axel Faust's answer which is correct... everything in the "alfresco/renderers" package is broadly for use within an AlfListView widget. The idea is that the AlfList retrieves multiple items that are then iterated over and the model provided for the AlfListView is re-rendered for each item. So as suggested the Boolean renderer is the best widget for showing true/false data (if you review the linked JSDoc you'll see example of how it can be configured to work with different data values). This tutorial chapter covers the basic concepts.
The Checkbox widget is for rendering a single property of form data and is intended to be used within a Form widget. This tutorial chapter covers basic form configuration (within the context of a dialog)
The cross-over between the list and form approaches meets with the InlineEditProperty - this is a renderer which has an edit mode that contains a form with a form control for the property being edited. The InlineEditProperty renders a TextBox and the InlineEditSelect (which extends it) renders a Select. You could create a custom widget that extends InlineEditProperty to render a Checkbox form control (if you want to provide inline editing of boolean data).
10-12-2016 05:10 AM
Thnks a lot Dave DraperAxel Faust, Your answer was most helpful
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.