Creatio Freedom UI – Dynamic binding of editable properties in standard crt.ListWidget not working
Hi everyone,
I'm working with the standard crt.ListWidget component in a Creatio Freedom UI form page.
I want to dynamically enable or disable row editing and item creation based on a Boolean page attribute.
I've declared the attribute in viewModelConfig:
"IsListEditable": {
"value": false
}In the ListWidget configuration, I'm using:
"editable": {
"enable": "$IsListEditable",
"itemsCreation": "$IsListEditable",
"floatingEditPanel": false
}I'm updating the attribute dynamically through a page handler:
request.$context.IsListEditable = false;What I've observed:
- The Boolean attribute is registered correctly.
- I can successfully change its value between
trueandfalsethrough JavaScript. - The updated value is correctly reflected in console logs.
- However, the ListWidget continues to allow editing existing rows and creating new rows.
- If I hardcode the configuration as follows, both operations are disabled successfully:
"editable": {
"enable": false,
"itemsCreation": false,
"floatingEditPanel": false
}This suggests that the standard ListWidget supports disabling editing, but the dynamic attribute binding does not appear to update these properties at runtime.
My question:
Does the standard crt.ListWidget support dynamic/reactive binding for editable.enable and editable.itemsCreation?
If yes, could someone share the correct syntax or an example of implementing this?
If these properties are evaluated only during widget initialization, is there a supported alternative to dynamically control row editing and item creation based on a Boolean page attribute?
Thanks in advance!
Like
I've found that often the nested properties don't work when bound to attributes. I've not tried this, but maybe try binding the entire "editable" property, rather than the sub properties below it? Again, I don't know if that will work, but something I would try.
Bind to editable:
"editable": "$IsListEditable"Set in code:
request.$context.IsListEditable = {
enable: false,
itemsCreation: false,
floatingEditPanel: false
};Ryan