Claude/z2ui5 demo 346 focus action 3kxi8j#693
Closed
oblomov-dev wants to merge 3 commits into
Closed
Conversation
Replace the inline <script> block and the custom-JS follow-up actions with the framework's cs_event-set_focus follow-up action and the native s_focus focus report, so no JavaScript is shipped with the view. Each editable cell carries a stable control id (<column>-<row>) that set_focus targets directly, and NEXT reads the currently focused cell from client->get( )-s_focus-id. As the sample no longer needs native JS, move it from src/00/05 to src/01/02 (framework actions), mark the DESCRIPT with the (A) capability marker, and regenerate both overview catalogs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RjiwGw55EN3XxRMqfKg3eM
The first rewrite bound the table via items="{...}" and targeted cells by a
constructed id like Color-2. That never worked: with extended change detection
(the default for sap.m.Table) UI5 clones the item template under randomly
generated ids (uid('clone')), so view.byId - and therefore SET_FOCUS - cannot
resolve a constructed id. That is why the original sample discovered the id via
a DOM query in JavaScript.
Build the rows explicitly instead (no aggregation binding) so every cell keeps
the stable, declared control id <column>_<row> (Title_0, Color_2, ...), the
same pattern the working Focus samples 133/189 use with set_focus. The cells
stay two-way editable through absolute model paths into the bound table, and
read_focus parses the cell id the frontend reports in s_focus. Still no
JavaScript shipped with the view.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RjiwGw55EN3XxRMqfKg3eM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.