Frontmatter
| id | 7115 |
| title | Neo.selection.Model: add getController() |
| state | Closed |
| labels | enhancement |
| assignees | [] |
| createdAt | Jul 27, 2025, 2:22 AM |
| updatedAt | Oct 23, 2025, 12:58 AM |
| githubUrl | https://github.com/neomjs/neo/issues/7115 |
| author | tobiu |
| commentsCount | 0 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Jul 27, 2025, 2:24 AM |
Use case are selectionModel based listeners, which should get mapped to view controllers:
{ module: ComponentTreeList, header: { text: 'Components' }, selectionModel: { listeners: { selectionChange: 'onComponentTreeListSelectionChange' } } }this leads to
util.Function:export function resolveCallback(fn, scope=this) { if (Neo.isString(fn)) { if (!scope[fn] && fn.startsWith('up.')) { fn = fn.slice(3); while (!scope[fn] && (scope = scope.parent)); } else { scope = scope.getController?.()?.getHandlerScope(fn, null) || scope } fn = scope[fn] } return {fn, scope} }the SM must try to pass a matching view controller.
@gplanansky