Skip to content

Add demo apps for tree table, wizard, drag-drop, and sound features#611

Merged
oblomov-dev merged 3 commits into
standardfrom
claude/js-samples-frontend-events-ZXpXJ
May 21, 2026
Merged

Add demo apps for tree table, wizard, drag-drop, and sound features#611
oblomov-dev merged 3 commits into
standardfrom
claude/js-samples-frontend-events-ZXpXJ

Conversation

@oblomov-dev
Copy link
Copy Markdown
Member

Summary

This PR adds five new demo applications showcasing advanced abap2UI5 features: tree table state management, wizard navigation with branching, tree drag-and-drop, sound playback, and client-side JavaScript execution. It also refactors existing demo apps to extract reusable patterns into separate versioned classes.

Key Changes

  • New demo apps in /src/99/ (versioned, reusable implementations):

    • z2ui5_cl_demo_app_116_0: Tree table with expand/collapse state persistence using JavaScript
    • z2ui5_cl_demo_app_202_0: Wizard control with nextStep and subsequentSteps branching
    • z2ui5_cl_demo_app_317_0: Tree with drag-and-drop node reordering
    • z2ui5_cl_demo_app_s_03_0: Sound playback (success/error audio feedback)
    • z2ui5_cl_demo_app_309_0: Client-side JavaScript execution via follow_up_action
  • Refactored existing demo apps in /src/ (main versions):

    • z2ui5_cl_demo_app_116: Removed inline JavaScript functions; now delegates to versioned _0 class
    • z2ui5_cl_demo_app_202: Removed wizard script injection; simplified to use versioned implementation
    • z2ui5_cl_demo_app_317: Replaced raw JavaScript string with client->_event_client() API call for tree expansion
    • z2ui5_cl_demo_app_309: Updated to use _event_client() for cleaner event handling
    • z2ui5_cl_demo_app_s_03: Removed audio script injection; delegated to versioned class
  • Configuration update:

    • Updated abaplint.jsonc to exclude /src/99 from linting (versioned demo code)

Implementation Details

  • Tree table state management uses custom JavaScript functions (saveState(), setState()) to preserve expand/collapse state across roundtrips
  • Wizard branching implemented via nextStep and subsequentSteps properties with custom decideNextStep() function
  • Tree drag-and-drop uses DragDropInfo with custom data extraction from tree items
  • Sound playback loads audio files from ICF service /SAP/PUBLIC/BC/ABAP/mime_demo/
  • Client-side JavaScript execution via follow_up_action() enables direct DOM manipulation and custom logic
  • Versioned _0 classes serve as reference implementations; main classes remain simplified entry points

https://claude.ai/code/session_01644zuAPuFkd1GHsFU5P9xM

claude and others added 3 commits May 21, 2026 19:57
… s_03)

Archive originals as _0 in src/99 and rewrite to use new cs_event constants:
- 309: follow_up_action alert -> cs_event-z2ui5 (afterBE)
- 116: function setState() -> sap.z2ui5.setState + cs_event-z2ui5
- 317: expandToLevel / myFunction -> cs_event-expand_to_level
- 202: sap.z2ui5.decideNextStep -> cs_event-wizard_set_next_step
- s_03: playSuccess/playError -> cs_event-play_audio

Also add src/99 to noIssues (archived code) and point abaplint dependency
to feature branch until framework PR is merged.

https://claude.ai/code/session_01644zuAPuFkd1GHsFU5P9xM
Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>
|function playSuccess() \{ new Audio("/SAP/PUBLIC/BC/ABAP/mime_demo/z2ui5_demo_success.mp3").play(); \}|
&& |function playError() \{ new Audio("/SAP/PUBLIC/BC/ABAP/mime_demo/z2ui5_demo_error.mp3").play(); \}| ).

DATA(vbox) = view->page( `Play success and error sounds` )->vbox( class = `sapUiSmallMargin` ).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Omit default parameter name "CLASS"

Suggest following fix,

Suggested change
DATA(vbox) = view->page( `Play success and error sounds` )->vbox( class = `sapUiSmallMargin` ).
DATA(vbox) = view->page( `Play success and error sounds` )->vbox( `sapUiSmallMargin` ).

@oblomov-dev oblomov-dev merged commit 92f9313 into standard May 21, 2026
2 of 6 checks passed
@oblomov-dev oblomov-dev deleted the claude/js-samples-frontend-events-ZXpXJ branch May 21, 2026 20:03
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