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"
}
}
]
}
}
]
};
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.
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?
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.