Skip to content

Add sample 493 - classic FilterBar wired to variant management - #17

Merged
oblomov-dev merged 2 commits into
mainfrom
claude/framework-samples-coverage-jzohu1
Aug 13, 2026
Merged

Add sample 493 - classic FilterBar wired to variant management#17
oblomov-dev merged 2 commits into
mainfrom
claude/framework-samples-coverage-jzohu1

Conversation

@oblomov-dev

Copy link
Copy Markdown
Member

What changed

A new Smart Controls sample for cs_event-filter_bar_variant_init, which had no sample anywhere in the ecosystem.

It is the event that saves the most code of any in the framework: a classic sap.ui.comp.filterbar.FilterBar knows nothing about variants, so a list report normally hand-writes registerFetchData / registerApplyData / registerGetFiltersWithValues, an addPersonalizableControl( ) with a PersonalizableInfo, and a change handler per filter field that marks the variant dirty. The action does all of it, so the app writes no JavaScript at all.

478 is the neighbouring case and shows why this one is separate: a SmartFilterBar knows its fields from OData metadata and registers itself, so it only needs smart_variant_init to place the anchor. Nothing in the package covered the classic bar — the closest was a classic FilterBar in samples-controls with no variant management next to it.

Unlike the rest of the package this sample needs no service: a classic FilterBar builds from what the app names, and the three filter controls are ordinary two-way bound sap.m inputs over an ABAP table. That is also what makes the payoff visible — selecting a saved variant puts the values back into the fields and, through the binding, into ABAP, so Go filters on the restored values without a roundtrip of its own.

Registered in the package README, the overview app and the repository sample count (30 → 31).

How to test

Start ?app_start=z2ui5_cl_smpe_app_493, or pick it from the overview app.

  1. Type a filter (e.g. Category Monitors), press Go — the table filters and the toast reports the row count.
  2. Save the selection as a variant via the variant management above the bar.
  3. Clear the fields, press Go — everything comes back.
  4. Select the saved variant again: the values reappear in the fields, and pressing Go filters on them. That last step is the point — no extra wiring carries them to ABAP, the two-way binding does.

Not runtime-verified. This package has no e2e suite, and variant persistence needs a system with sap.ui.fl / LREP, which the CI sandbox has neither of. Static checks are green; the behaviour above wants one manual pass on a real system before merge.

Verified

npx abaplint (158 files), npm run check:abap2ui5 (target OpenUI5 1.71), npm run check:overview — all clean.

Companion to abap2UI5/abap2UI5#2561, the audit that found the gap.


Generated by Claude Code

cs_event-filter_bar_variant_init had no sample anywhere in the ecosystem,
and it is the event that saves the most code: a classic
sap.ui.comp.filterbar.FilterBar knows nothing about variants, so a list
report normally hand-writes registerFetchData / registerApplyData /
registerGetFiltersWithValues, an addPersonalizableControl( ) with a
PersonalizableInfo, and a change handler per filter field. The action does
all of it, so the app needs no JavaScript at all.

478 is the neighbouring case and shows why this one is separate: a
SmartFilterBar knows its fields from OData metadata and registers itself, so
it only needs smart_variant_init to place the anchor.

Unlike the rest of the package this sample needs no service - a classic
FilterBar builds from what the app names, and the three filter controls are
ordinary two-way bound sap.m inputs over an ABAP table. That is also what
makes the payoff visible: selecting a saved variant puts the values back
into the fields AND, through the binding, into ABAP, so Go filters on the
restored values without a roundtrip of its own.

Registered in the package README, the overview app and the repository
sample count.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LLqG5572QgSgbhfAWm7RAp
Copilot AI lite review requested due to automatic review settings August 13, 2026 06:18

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@oblomov-dev
oblomov-dev merged commit b64b276 into main Aug 13, 2026
3 checks passed
@oblomov-dev
oblomov-dev deleted the claude/framework-samples-coverage-jzohu1 branch August 13, 2026 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants