nerdexam
Adobe

AD0-E724 · Question #42

A developer is building a new Admin page using the UI Component framework. In which file is the data source for an Admin grid or form component typically defined, specifying the provider class that wi

The correct answer is C. The UI Component's XML declaration file (e.g., 'my_grid.xml'). Option C is correct because in Magento 2's UI Component framework, the data source is declared directly inside the component's XML file (e.g., my_grid.xml) using a <dataSource> element, which specifies the provider class responsible for supplying data to the grid or form. This XM

Customization

Question

A developer is building a new Admin page using the UI Component framework. In which file is the data source for an Admin grid or form component typically defined, specifying the provider class that will supply the data?

Options

  • AThe 'menu.xml' file
  • BThe component's '.js' file
  • CThe UI Component's XML declaration file (e.g., 'my_grid.xml')
  • DThe 'di.xml' file for the module

How the community answered

(31 responses)
  • A
    6% (2)
  • B
    13% (4)
  • C
    77% (24)
  • D
    3% (1)

Explanation

Option C is correct because in Magento 2's UI Component framework, the data source is declared directly inside the component's XML file (e.g., my_grid.xml) using a <dataSource> element, which specifies the provider class responsible for supplying data to the grid or form. This XML file lives in view/adminhtml/ui_component/ and serves as the single declaration point for all component structure, columns, filters, and data binding.

Why the distractors are wrong:

  • A (menu.xml) - This file only registers navigation items in the Admin sidebar; it has nothing to do with data.
  • B (the .js file) - JavaScript handles client-side behavior and rendering logic, not server-side data sourcing.
  • D (di.xml) - While di.xml handles dependency injection and can configure the provider class's dependencies, it is not where you declare which provider a UI component uses; that binding lives in the component XML itself.

Memory tip: Think "the XML owns its data." The UI Component XML file is the blueprint - it declares what the component is, how it looks, and where it gets its data, all in one place. If a question asks "where is X defined for a UI component," the XML declaration file is almost always the answer.

Topics

#UI Component framework#Admin grid#XML declaration#data source

Community Discussion

No community discussion yet for this question.

Full AD0-E724 Practice