Skip to content

Add Filter Bar with Variant Management demo app (475) - #699

Merged
oblomov-dev merged 3 commits into
standardfrom
claude/z2ui5-demo-app-frontend-actions-durp1d
Jul 29, 2026
Merged

oblomov-dev merged 3 commits into
standardfrom
claude/z2ui5-demo-app-frontend-actions-durp1d

Conversation

@oblomov-dev

Copy link
Copy Markdown
Member

Summary

Introduces a new experimental demo application showcasing a list report built entirely in ABAP using the sap.ui.comp.FilterBar with integrated SmartVariantManagement. This eliminates the need for typical JavaScript controller boilerplate while maintaining full variant save/restore functionality.

Key Changes

  • New demo app z2ui5_cl_demo_app_475: Implements a complete filter bar with variant management pattern

    • Demonstrates client-side filtering via cs_event-binding_call (rows never re-travel after initial load)
    • Integrates SmartVariantManagement with FilterBar using cs_event-filter_bar_variant_init
    • Includes five filterable fields (Product, Create Date, Create By, Storage Location, Quantity)
    • Sample data with six product records for testing
  • Updated catalog references:

    • Added app 475 to z2ui5_cl_sample_app_g01 under EXPERIMENTAL section
    • Added three relocated apps (472, 473, 465) to z2ui5_cl_demo_app_g00 "More" section
  • File reorganization:

    • Moved apps 465, 472, 473 from src/01/01 to src/01/01 (internal reorganization)
    • Marked z2ui5_cl_demo_app_111 as obsolete with note that it's replaced by app 475

Notable Implementation Details

  • Uses fluent XML view builder API for declarative UI construction
  • Implements compound filter payload with OR/AND logic across filter groups
  • Includes JSON escaping for filter values to handle special characters
  • Demonstrates two-way binding for filter fields with automatic variant persistence
  • No JavaScript required—all filtering and variant management handled server-side

https://claude.ai/code/session_01G6YtB2n8uvFDmTv87Nba6S

claude added 3 commits July 28, 2026 18:18
Link with preventDefault, Menu Item Path and Popover Toggle move from
src/01/02 (Basic II) to src/01/01 (Basic I); the overview catalogs are
regenerated so the tiles follow them into the Basic I group.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G6YtB2n8uvFDmTv87Nba6S
The list report demo carried its whole behaviour as a JavaScript blob
loaded through z2ui5_cl_pop_js_loader plus an inline <html:script>: the
SmartVariantManagement/FilterBar handshake, an onSearch that built
sap.ui.model.Filter objects by hand, and an onChange per input. The
search part had not worked for a while either - the generated source read
`aFilters = return new sap.ui.model.Filter({...})`, which is not valid
JavaScript, so pressing Go threw before it filtered anything.

All three pieces are frontend actions now and the app is plain ABAP:

- the variant handshake is cs_event-filter_bar_variant_init, re-sent after
  every view_display because a rebuilt view brings new control instances
- Go filters the table's items binding through cs_event-binding_call with
  the compound group payload (one AND group per filled field), so the rows
  stay on the client exactly as the hand-written filter intended
- the per-field change handler is gone: the init action attaches it, since
  marking the variant modified is the same code in every list report

The class also follows the repository conventions now (shell/page frame,
intro MessageStrip, no mv_/mt_ prefixes, on_init/on_event structure) and
the dead set_search( ) full-text scan is dropped. It stays in
src/00/07 (experimental): the wiring is covered by unit specs on the
framework side but has not been verified in a system with sap.ui.comp and
sap.ui.fl yet - once it is, 00/02 is its category.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G6YtB2n8uvFDmTv87Nba6S
Sample 111 goes back to the version it had before the rebuild and moves
to src/00/99 (obsolete) unchanged - its DESCRIPT names the successor, as
the other retired samples do. The rebuilt list report keeps its own
identity instead of overwriting the original, so the JavaScript variant
of the screen stays readable next to the one that needs none.

The rebuild is now z2ui5_cl_demo_app_475 in src/00/00 (extended). It
carries the whole behaviour as frontend actions: the FilterBar /
SmartVariantManagement handshake through cs_event-filter_bar_variant_init
(re-sent after every view_display, because a rebuilt view brings new
control instances), Go through cs_event-binding_call with one AND group
per filled field, and no per-field change handler at all - the init
action attaches it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G6YtB2n8uvFDmTv87Nba6S
@oblomov-dev
oblomov-dev merged commit 554e051 into standard Jul 29, 2026
7 checks passed
@oblomov-dev
oblomov-dev deleted the claude/z2ui5-demo-app-frontend-actions-durp1d branch July 29, 2026 11:55
oblomov-dev pushed a commit that referenced this pull request Jul 29, 2026
Two leftovers from the src/00 reorganisation.

**AGENTS §1/§2 described packages that no longer exist.** The tree still listed
00/02 (only non-openui5 or higher UI5 1.71), 00/03 (only with launchpad) and
00/05 (only with javascript and css and html), and the CTEXTs of 00/00, 00/01,
00/06, 00/07 and 00/99 had all been renamed on disk - so
check-agents-structure.js, which CI runs, failed on seven mismatches. The tree
now matches the five actual subpackages, and the §2 decision list is rewritten
for them: 00/00 is the catch-all for "plain OpenUI5 1.71 on a standalone stack
cannot run this" - a SAPUI5-only control, a post-1.71 control/property, or a
runtime the sample cannot ship (Launchpad, an OData service, native JS/CSS).
The two stale pointers at 00/03 and at the old numeric slots are fixed too.

**The Filter Bar with Variant Management demo was lost in a merge.** It was
added as z2ui5_cl_demo_app_475 (#699) at the same path a smart control demo had
just taken, and the conflict resolution kept the other one - the class was gone
from the tree while its tile stayed in the catalog, which is why 475 was listed
twice. It is restored verbatim from 554e051 as z2ui5_cl_demo_app_481, same
folder (it uses sap.ui.comp: FilterBar + SmartVariantManagement +
cs_event-filter_bar_variant_init), and the catalogs are regenerated.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UHy6Sc3xwdL75pXkw1m28i
oblomov-dev added a commit that referenced this pull request Jul 29, 2026
* Add five sap.ui.comp smart control demos to src/00/00

The SAPUI5 Smart Controls tutorial rebuilt as abap2UI5 apps, moved here from
the abap2UI5/api repository, which is OpenUI5-only and could neither verify
nor scope-check them. They join the existing smart control demos 313/314/319
in src/00/00 ("extended"), so the cloud and 702 builds strip them as before.

- 475 SmartField    SmartForm/ColumnLayout/Group/GroupElement/SmartField
- 476 SmartForm     editTogglable form, two labelled groups, elementForLabel
- 477 SmartTable    SmartFilterBar + ControlConfiguration + SmartTable
- 478 PageVariant   SmartVariantManagement owning filter bar + table variants
- 479 SmartChart    SmartChart + navpopover SemanticObjectController

Each is rebuilt on the framework's own z2ui5_cl_xml_view builder - the typed
smart_filter_bar / control_configuration / smart_table /
smart_variant_management methods where they exist, _generic( ) for the smart
form, field and chart elements - inside the repository's shell/page frame with
back navigation, so they start from the overview like every other sample.

Two idioms carry over: the default model is an OData V2 service
(switch_default_model_path) instead of ABAP data, and a controller bindElement
becomes a declarative binding attribute with an OData entity path. 475-478 read
the Gateway demo service GWSAMPLE_BASIC (ProductSet), which ships with every
on-premise system and only has to be activated in /IWFND/MAINT_SERVICE; 478
adds the smart_variant_init handshake a controller-less app needs before a
page variant can save. 479 cannot use that service - a SmartChart needs an
analytical one (sap:aggregation-role, UI.Chart) - so it carries a placeholder
that reads as one.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UHy6Sc3xwdL75pXkw1m28i

* fix

* fixes

* fix

* fix

* fix

* Split the routing-modes demo into one sample per mode

App 468 was a hub with three buttons that switched client->set_nav_routing( )
between default, fresh and keep, plus a mode_hint( ) explaining whichever mode
was picked. Switching the mode mid-session is not what an app does - it picks
one - so the demo now shows one mode per sample and the default mode (routing
off, i.e. the behaviour before hash routing) is dropped entirely:

- 468 "Navigation - Routing mode fresh": the URL carries the class only, so
  browser Back/Forward start the app fresh - input and counter are gone.
- 480 "Navigation - Routing mode keep": the URL carries the app-state draft too,
  so browser Back/Forward restore input and counter exactly.

Both keep the same state to play with (an input, a counter) and both call the
shared detail page 469 via nav_app_call, whose text no longer mentions the
dropped default mode. The mode picker, button_type( ) and mode_hint( ) are gone
- each sample asserts its own mode in view_display and states the expected
outcome in a static MessageStrip.

The overview catalogs are regenerated. That also picks up drift the tree had
been carrying: class descriptions changed (More -> CSS / Popover / Navigation
groupings) and the src/00 subpackages were reorganised without a regenerate,
so the catalogs now mirror the folders again - 204 + 124 tiles, 11 hidden ZZZ
helpers, 339 classes accounted for.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UHy6Sc3xwdL75pXkw1m28i

* Fix the AGENTS tree drift and restore the lost Filter Bar sample

Two leftovers from the src/00 reorganisation.

**AGENTS §1/§2 described packages that no longer exist.** The tree still listed
00/02 (only non-openui5 or higher UI5 1.71), 00/03 (only with launchpad) and
00/05 (only with javascript and css and html), and the CTEXTs of 00/00, 00/01,
00/06, 00/07 and 00/99 had all been renamed on disk - so
check-agents-structure.js, which CI runs, failed on seven mismatches. The tree
now matches the five actual subpackages, and the §2 decision list is rewritten
for them: 00/00 is the catch-all for "plain OpenUI5 1.71 on a standalone stack
cannot run this" - a SAPUI5-only control, a post-1.71 control/property, or a
runtime the sample cannot ship (Launchpad, an OData service, native JS/CSS).
The two stale pointers at 00/03 and at the old numeric slots are fixed too.

**The Filter Bar with Variant Management demo was lost in a merge.** It was
added as z2ui5_cl_demo_app_475 (#699) at the same path a smart control demo had
just taken, and the conflict resolution kept the other one - the class was gone
from the tree while its tile stayed in the catalog, which is why 475 was listed
twice. It is restored verbatim from 554e051 as z2ui5_cl_demo_app_481, same
folder (it uses sap.ui.comp: FilterBar + SmartVariantManagement +
cs_event-filter_bar_variant_init), and the catalogs are regenerated.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UHy6Sc3xwdL75pXkw1m28i

* Drop the restored Filter Bar with Variant Management sample

z2ui5_cl_demo_app_481 was brought back from 554e051 after the app 475 number
collision had dropped it. It is not wanted - removed again, catalogs
regenerated (327 tiles). The class stays in the history at 554e051 if it is
ever needed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UHy6Sc3xwdL75pXkw1m28i

---------

Co-authored-by: Claude <noreply@anthropic.com>
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.

2 participants