Does the "Expand When" setting only get fired once?
I have a question about the "Expand When" container setting on dynamic layout panel.
I have a button that toggles the value of thisVariable true or false.
On a layout, I set the Header Type to be "Collapsabile" and, using the expression builder set the "Expand When" setting to "thisVariable = true".
When I first click the button and set thisVariable to true, the layout expands.
However, subsequently when I click the button nothing happens. When I manually collapse the layout, and then change the value of thisVariable to true again, nothing happens.
Question: Is this a defect or the correction functionality? Does the "Expand when" setting only get fired once? Why doesn't my layout expand everytime I set thisVariable to true?
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
"Expand when" configuration honors the state of layout at design time and executes the when rule only during initial load. But once the layout is expanded manually or through a server side when condition, it remains in an expanded state for further AJAX requests. It is designed this way to always honor the user preference ahead of the expand when. There may be use cases where the user expands the layout manually and expects the layout to remain expanded, irrespective of whether the when condition is true / false. Also developers need to keep in mind that this is an expand when condition and not collapse when condition.
Please have a look on the below article for more information :
Please let me know if it helps.
Keep up to date on this post and subscribe to comments
- Localization of "Expand All/Collapse All" Icon
- Case Management: "Permitted When" for "Manual instantiation" is not working
- After a jar file deployment, is it possible to see what rules that were deployed got executed at least once?
- How to make listeners in two nodes process a single file in a S3 bucket only once?
- How to set "Error Message" in a "when" condition to capture it later by @getMessagesAll(Primary)