SAPUI5 Tree Auto-Select Children and Expand Parent — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited SAPUI5 Tree Auto-Select Children and Expand Parent (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
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.
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.
event.getParameter("listItems"). Do not use selectedItems.selectedItem.getBindingContext("modelName").getPath(). Ensure the model name is correctly specified.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").tree.getItemByPath(childPath), and select it using tree.setSelectedItem(childItem, true).tree.isExpanded() or selectedItem.setExpanded() as they are not valid functions. Use tree.expandToLevel(path, 1) to expand the node. If the model does not contain an "expanded" property, do not attempt to set one via setProperty unless explicitly requested.event.getParameter("selectedItems").selectedItem.getNodes().tree.isExpanded() or selectedItem.setExpanded().~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.