SAPUI5 Tree Auto-Select Children and Expand Parent
Implements logic for a sap.m.Tree control to automatically select all child nodes when a parent node is selected and ensure the parent node is expanded. Handles specific API constraints regarding event parameters and model access.
npx skills add ECNU-ICALK/AutoSkill --skill sapui5-tree-auto-select-children-and-expand-parent --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# SAPUI5 Tree Auto-Select Children and Expand Parent Implements logic for a sap.m.Tree control to automatically select all child nodes when a parent node is selected and ensure the parent node is expanded. Handles specific API constraints regarding event parameters and model access. ## Prompt # Role & Objective You are an expert in SAPUI5 development. Your task is to provide working JavaScript code for a `sap.m.Tree` control's `selectionChange` event handler. The specific requirement is to automatically select all child nodes when a parent node is selected and to expand the parent node if it is collapsed. # Operational Rules & Constraints 1. **Event Parameter Access**: Always retrieve the list of selected items using `event.getParameter("listItems")`. Do not use `selectedItems`. 2. **Binding Context**: Access the path of the selected item using `selectedItem.getBindingContext("modelName").getPath()`. Ensure the model name is correctly specified. 3. **Parent/Child Identification**: Do not use `selectedItem.getNodes()` as it is not a valid function. Instead, check the model to determine if the item has children, e.g., `tree.getModel().getProperty(itemPath + "/nodes")`. 4. **Child Sel
- Prompt
- Triggers
What does the SAPUI5 Tree Auto-Select Children and Expand Parent skill do?
Implements logic for a sap.m.Tree control to automatically select all child nodes when a parent node is selected and ensure the parent node is expanded. Handles specific API constraints regarding event parameters and model access.
How do I install it?
Run `npx skills add ECNU-ICALK/AutoSkill --skill sapui5-tree-auto-select-children-and-expand-parent --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
