From ui5
Provides authoritative guidelines and API references for sap.ui.mdc Model-Driven Controls (FilterBar, Chart, Field, ValueHelp, etc.) with OData V4 delegates. Load when generating or troubleshooting MDC controls in UI5 freestyle apps.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ui5:ui5-best-practices-mdcThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Apply these guidelines whenever generating, reviewing, or troubleshooting MDC control code in freestyle applications using OData V4 services.
Apply these guidelines whenever generating, reviewing, or troubleshooting MDC control code in freestyle applications using OData V4 services.
UI5 version baseline: SAPUI5 1.136+ LTS. All features mentioned are available from this version unless noted.
| Trigger | Load |
|---|---|
Working on or planning a sap.ui.mdc.FilterBar | references/mdc-filter-bar.md |
Working on or planning a sap.ui.mdc.Chart | references/mdc-chart.md |
Working on or planning a sap.ui.mdc.Field | references/mdc-field.md |
Working on or planning a sap.ui.mdc.FilterField | references/mdc-filter-field.md |
Working on or planning a sap.ui.mdc.ValueHelp | references/mdc-value-help.md |
Working on or planning a sap.ui.mdc.Link | references/mdc-link.md |
Working on or planning a sap.ui.mdc.MultiValueField | references/mdc-multi-value-field.md |
| Using MDC controls with JSON model (non-OData) | references/mdc-json-delegates.md |
Working on or planning a sap.ui.mdc.Table | See ui5-best-practices-tables skill, references/mdc-table.md |
Load before producing any output. Do not work from memory.
All MDC controls use a delegate to decouple the control from data-source-specific logic. App developers must:
delegate="{name: 'my/app/delegate/MyDelegate', payload: {entitySet: 'Products'}}"fetchProperties)Base delegates for OData V4:
| Control | Base Delegate |
|---|---|
| Table | sap/ui/mdc/odata/v4/TableDelegate |
| FilterBar | sap/ui/mdc/odata/v4/FilterBarDelegate |
| Chart | sap/ui/mdc/odata/v4/vizChart/Delegate |
| ValueHelp | sap/ui/mdc/ValueHelpDelegate |
| Link | sap/ui/mdc/LinkDelegate |
| MultiValueField | sap/ui/mdc/field/MultiValueFieldDelegate |
JSON model usage: MDC controls also work with JSON models. Extend the base delegates directly (sap/ui/mdc/TableDelegate, sap/ui/mdc/FilterBarDelegate) — not the OData V4 variants. See references/mdc-json-delegates.md for details.
PropertyInfo — the core metadata format returned by fetchProperties:
{
key: "propertyName", // Unique identifier (required)
label: "Display Label", // User-visible label (required)
dataType: "sap.ui.model.odata.v4.type.String" // Data type (required)
}
delegate property pointing to a valid module path.fetchProperties in the delegate returning PropertyInfo[] with at minimum: key, label, dataType.p13nMode to enable personalization (Column, Sort, Filter, Group for Table; Item, Sort, Filter, Type for Chart; Item for FilterBar).sap.ui.mdc.condition.Condition.createCondition() to construct conditions programmatically.sap.ui.model.odata.v4.type.* types in PropertyInfo dataType field for OData V4 models. Use sap.ui.model.type.* with JSON models. Register types in the TypeMap.ariaLabelledBy on FilterBar and Chart for accessibility.get_api_reference MCP tool to verify control APIs. Use run_ui5_linter to validate code.sap.ui.comp) instead. MDC works with OData V4 and JSON models.sap.chart.Chart or sap.m.Table). Use the delegate or MDC control's public API.key from PropertyInfo objects (formerly name, now deprecated).Condition.createCondition(operator, values).sap.ui.mdc.FilterBar). Use sap.ui.define or ES6 imports.| Control | Use when | Do not use when |
|---|---|---|
MDC FilterBar | OData V4 or JSON model, delegate-driven filter UI, MDC Table/Chart | OData V2 (use SmartFilterBar), simple search bar |
MDC Chart | OData V4, delegate-driven chart visualization, drill-down | OData V2 (use SmartChart), simple static charts, no analytical data |
MDC Field | OData V4 or JSON, single field with auto-rendering by data type | OData V2 (use SmartField), purely custom rendering needed |
MDC FilterField | Inside MDC FilterBar for individual filter conditions | Standalone filtering outside FilterBar context |
MDC ValueHelp | OData V4 or JSON, type-ahead + dialog value selection | OData V2 (use ValueHelpDialog), simple dropdowns without search |
MDC Link | OData V4, semantic object navigation, delegate-driven link targets | OData V2 (use SmartLink), simple static links |
MDC MultiValueField | OData V4 or JSON, multi-value token entry via items aggregation | OData V2 (use SmartMultiInput), simple single-value fields |
| Symptom | Cause | Fix |
|---|---|---|
| "Delegate module could not be loaded" | Wrong path in delegate property | Verify module path matches actual file location in project. |
| Chart shows no data | fetchProperties returns wrong PropertyInfo (missing groupable/aggregatable) | Ensure dimensions have groupable: true, measures have aggregatable: true. |
| FilterBar fields not appearing | PropertyInfo missing or hiddenFilter: true | Check delegate fetchProperties returns properties with correct visibility. |
| Field shows wrong inner control | dataType in PropertyInfo doesn't match expected format | Verify dataType uses full qualified type name (e.g., sap.ui.model.odata.v4.type.String). |
| Personalization dialog empty | p13nMode not set or PropertyInfo incomplete | Add p13nMode="Column,Sort,Filter" and ensure PropertyInfo has sortable/filterable flags. |
| ValueHelp not opening | ValueHelp not connected to Field or containers missing | Verify valueHelp association on Field and that Popover/Dialog containers are defined. |
| Conditions not applied to binding | updateBindingInfo not implemented in delegate | Implement updateBindingInfo to apply filter conditions to the OData binding. |
| Link always rendered as text | fetchLinkType returns LinkType.Text or fails | Implement fetchLinkType returning Popup or DirectLink type. |
fetchProperties).updateBindingInfo (conditions are never applied to the data binding).p13nMode configuration (personalization features are disabled by default).ariaLabelledBy on FilterBar referencing a visible title.ariaLabelledBy on Chart referencing a visible title.label.claude plugin install ui5@claude-plugins-officialGuides UI5 developers on OData V2 smart controls: SmartField, SmartForm, SmartFilterBar, SmartChart, SmartLink, and SmartMultiInput. Covers annotation rules, error patterns, and per-control API references.
Develops SAP UI5 applications: freestyle and Fiori Elements apps, custom controls, OData v2/v4 integration, data binding, MVC patterns, routing, QUnit/OPA5 testing, performance, accessibility.
Reviews SAP Fiori/UI5 apps for design guidelines, MVC structure, OData patterns, performance, accessibility, and launchpad integration from source code.