LearnNewsExamplesServices
Frontmatter
id8304
title[Neural Link] Deep Value Collection for form.Container.toJSON
stateClosed
labels
enhancementai
assigneestobiu
createdAtJan 3, 2026, 10:12 PM
updatedAtJan 3, 2026, 10:22 PM
githubUrlhttps://github.com/neomjs/neo/issues/8304
authortobiu
commentsCount1
parentIssue8200
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJan 3, 2026, 10:22 PM

[Neural Link] Deep Value Collection for form.Container.toJSON

Closed v11.18.0 enhancementai
tobiu
tobiu commented on Jan 3, 2026, 10:12 PM

Enhance Neo.form.Container.toJSON to support deep value collection for nested forms (e.g. fields inside TabContainers or CardLayouts).

Current State: toJSON currently uses ComponentManager.getChildComponents(this) which relies on the parentId chain. This works for standard nesting but might miss edge cases where components are visually nested but logically detached (e.g. via vdom references without parentId updates).

Goal: Ensure toJSON captures the values of ALL fields that are logically part of the form, regardless of nesting depth, matching the scope of getSubmitValues() but remaining synchronous and read-only.

Implementation Idea:

  • Verify if getChildComponents covers all needed cases.
  • If not, implement a recursive walker or use a VDOM-based lookup to find fields.
tobiu added the enhancement label on Jan 3, 2026, 10:12 PM
tobiu added the ai label on Jan 3, 2026, 10:12 PM
tobiu assigned to @tobiu on Jan 3, 2026, 10:12 PM
tobiu added parent issue #8200 on Jan 3, 2026, 10:12 PM
tobiu
tobiu Jan 3, 2026, 10:21 PM

Input from Gemini 2.5 pro:

✦ I have verified the implementation logic again.

Neo.manager.Component inherits from Neo.collection.Base, so it holds a global registry of all instantiated components in its items array. The getChildComponents method uses this.find('parentId', component.id) to query this global registry. It does not rely on the local items config of the component instance.

Because getChildComponents recursively queries the global registry for parentId matches, it correctly traverses the entire component tree (including TabContainer -> TabBody -> Field chains) as long as the components are instantiated and registered.

Therefore, form.Container.toJSON is already performing a deep, recursive collection of all field values in the form.

Closing as implemented/duplicate of the logic in #8296.

tobiu closed this issue on Jan 3, 2026, 10:22 PM