02-27-2018 10:07 AM
I want to have several lines of labels (alfresco/html/Label widget). But if I create such Aikau model, it doesn't work correct (see attached image – it works for Logo widgets, but all text is on one line):
model.jsonModel = {
widgets: [
{
name: "alfresco/layout/VerticalWidgets",
"config": {
"widgetMarginTop": 10,
"widgetMarginBottom": 10,
"widgets": [
{
"name": "alfresco/logo/Logo"
},
{
"name": "alfresco/logo/Logo"
},
{
name: "alfresco/html/Label",
config: {
label: "text1 text2"
}
},
{
name: "alfresco/html/Label",
config: {
label: "text3 text4"
}
}
]
}
}
]
};
02-27-2018 01:26 PM
At first I was thinking that it is a bug in aikau, but may be not.I think labels are implemented for using it with the other widget as well.For example giving the label to the textfield.In this case this behaviour will be useful.
If you would like to print several values in a vertical way than i think you might use below widget.
02-28-2018 07:31 AM
Hi, thanks a lot. I'm new in Aikau so I have a few more questions:
Do you think that we shouldn't use Label widget as ordinary widget at all? For example, i want to get a few lines of Labels how should I use AlfListView?
Such model doesn't work (I can't see anything on page):
{
name: "alfresco/lists/views/AlfListView",
config: {
widgets: [
{
name: "alfresco/lists/views/layouts/Row",
config: {
widgets: [
{
name: "alfresco/lists/views/layouts/Cell",
config: {
widgets: [
{
name: "alfresco/html/Label",
config: {
label: "text1 text2"
}
}
]
}
}
]
}
},
{
name: "alfresco/lists/views/layouts/Row",
config: {
widgets: [
{
name: "alfresco/lists/views/layouts/Cell",
config: {
widgets: [
{
name: "alfresco/html/Label",
config: {
label: "text3 text4"
}
}
]
}
}
]
}
}
]
}
}
How I should push my widgets into that list?
I found another widget:
JSDoc: Module: alfresco/lists/AlfList
There are example for hard-coded data (but I don't know how to put my widget into value, if it is possible):
{
name: "alfresco/lists/AlfList",
config: {
currentData: {
items: [
{value: "one"},
{value: [
{
name: "alfresco/html/Label",
config: {
label: "text1 text2"
}
}
]
},
{value: "two"}
]
},
widgets: [
{
name: "alfresco/lists/views/HtmlListView",
config: {
propertyToRender: "value"
}
}
]
}
}
For that model i get:
one
[object Object]
two
on my page. Could we use insert our widget here?
Explore our Alfresco products with the links below. Use labels to filter content by product module.