From ui5
Guides UI5 developers on OData V2 smart controls: SmartField, SmartForm, SmartFilterBar, SmartChart, SmartLink, and SmartMultiInput. Covers annotation rules, error patterns, and per-control API references.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ui5:ui5-best-practices-smart-controlsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Apply these guidelines whenever generating, reviewing, or troubleshooting UI5 smart control code in freestyle applications using OData V2 services.
Apply these guidelines whenever generating, reviewing, or troubleshooting UI5 smart control code in freestyle applications using OData V2 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.comp.smartfield.SmartField | references/smart-field.md |
Working on or planning a sap.ui.comp.smartform.SmartForm | references/smart-form.md |
Working on or planning a sap.ui.comp.smartfilterbar.SmartFilterBar | references/smart-filter-bar.md |
Working on or planning a sap.ui.comp.smartchart.SmartChart | references/smart-chart.md |
Working on or planning a sap.ui.comp.navpopover.SmartLink | references/smart-link.md |
Working on or planning a sap.ui.comp.smartmultiinput.SmartMultiInput | references/smart-multi-input.md |
Working on or planning a sap.ui.comp.filterbar.FilterBar | references/filter-bar.md |
Working on or planning a sap.ui.comp.valuehelpdialog.ValueHelpDialog | references/value-help-dialog.md |
Working on or planning a sap.ui.comp.smarttable.SmartTable | See ui5-best-practices-tables skill, references/smart-table.md |
Load before producing any output. Do not work from memory.
entitySet on Smart controls or ensure the control inherits a binding context that resolves the entity type.ControlConfiguration in XML for SmartFilterBar field overrides (control type, filter type, index). Only visible, label, and visibleInAdvancedArea can be changed at runtime.SmartForm > Group > GroupElement > SmartField. Never place SmartFields directly in a SmartForm.initialise event before programmatically accessing inner controls (e.g., getInnerControl(), getChart()).sap.ui.model.odata.type.* types in bindings alongside OData V2 models. Never use sap.ui.model.type.* with OData V2.ariaLabelledBy on SmartFilterBar and SmartChart referencing a visible title for accessibility.check() on SmartForm for client-side mandatory field validation before submitting data.get_api_reference MCP tool to verify control APIs. Use run_ui5_linter to validate code.sap.ui.mdc) instead.value property. SmartField manages its own rendering based on metadata. Use annotations to influence behavior.parts: [...]) on SmartField. It manages its own composite bindings for unit/currency fields.getChart() synchronously during initialization. Use the initialise event or getChartAsync().sap.chart.Chart). Use the smart control's public API.sap:label or @Common.Label annotations in OData metadata.sap.ui.comp.smartfield.SmartField). Use sap.ui.define or ES6 imports.| Control | Use when | Do not use when |
|---|---|---|
SmartField | OData V2, single property display/edit, auto-rendering by Edm type and annotations | OData V4, JSON models, custom rendering required, composite/multi-property fields |
SmartForm | OData V2, entity editing with multiple SmartFields, auto-labels from annotations | OData V4, complex custom layouts, non-OData data |
SmartFilterBar | OData V2, annotation-driven filter UI, integration with SmartTable/SmartChart | OData V4 (use MDC FilterBar), JSON-only, purely custom filter logic |
SmartChart | OData V2, annotation-driven chart visualization, drill-down, variant management | OData V4 (use MDC Chart), non-analytical data, custom chart JS |
SmartLink | OData V2, semantic object navigation, cross-app navigation via FLP | OData V4 (use MDC Link), simple static links, no FLP available |
SmartMultiInput | OData V2, multi-value entry with tokens, value help with ranges | OData V4, simple single-value input, JSON-only |
FilterBar | Manual filter UI without OData annotations, inside ValueHelpDialog, custom filters | OData V2 with annotations (use SmartFilterBar), OData V4 (use MDC FilterBar) |
ValueHelpDialog | Complex value selection with table + conditions tabs, token-based multi-select | Simple dropdowns, single-value selection, OData V4 (use MDC ValueHelp) |
| Symptom | Cause | Fix |
|---|---|---|
| SmartField renders as plain text in edit mode | Missing binding context or wrong entitySet | Verify value="{PropertyName}" and entity context resolution. |
| SmartField shows Input instead of DatePicker | Missing sap:display-format="Date" on property | Add annotation or use controlType in ControlConfiguration. |
| SmartForm labels missing | sap:label annotation not set in OData metadata | Add sap:label to property or set label on GroupElement. |
| SmartFilterBar type-ahead not working | Missing ValueList annotation with correct target path | Verify target: {Namespace}.{EntityName}/{FieldName}. |
| SmartFilterBar default values ignored | Setting ControlConfiguration dynamically after initialise | Set values statically in XML or use setFilterData() API. |
| SmartChart height is 0 / not visible | Container does not provide explicit height | Set height on parent container (e.g., height="50vh"). |
| SmartChart missing dimensions/measures | Wrong or missing UI.Chart annotation | Verify MeasureAttributes and DimensionAttributes in annotation. |
| SmartLink popover shows "No content available" | No navigation targets for semantic object in FLP | Verify FLP configuration and user authorizations. |
| SmartLink rendered as text (not clickable) | No SemanticObject annotation on property | Add @Common.SemanticObject annotation to OData property. |
| SmartMultiInput tokens not persisting | Missing ValueList or incorrect binding | Verify ValueList annotation and navigation property binding. |
liveMode="true" on SmartFilterBar with expensive backend queries (causes rapid re-fetching).ignoredChartTypes when certain chart types are irrelevant (unnecessary UI options).ariaLabelledBy on SmartFilterBar referencing a visible title.ariaLabelledBy on SmartChart referencing a visible title.claude plugin install ui5@claude-plugins-officialProvides 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.
Reviews SAP Fiori/UI5 apps for design guidelines, MVC structure, OData patterns, performance, accessibility, and launchpad integration from source code.
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.