Skip to content

Commit 02eb496

Browse files
authored
Merge pull request #91 from abap2UI5/claude/modest-goldberg-MtbLK
Reorganize troubleshooting docs and restructure sidebar navigation
2 parents a21196b + 9f0736f commit 02eb496

3 files changed

Lines changed: 49 additions & 31 deletions

File tree

docs/.vitepress/config.mjs

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,15 @@ export default defineConfig({
105105
collapsed: true,
106106
items: [
107107
{ text: "Introduction", link: "/get_started/about" },
108-
{ text: "Quickstart", link: "/get_started/quickstart" },
109108
{ text: "Use Cases", link: "/get_started/use_cases" },
110-
{ text: "Hello World", link: "/get_started/hello_world" },
111-
{ text: "Full Example", link: "/get_started/full_example" },
109+
{
110+
text: "Quickstart",
111+
items: [
112+
{ text: "Installation", link: "/get_started/quickstart" },
113+
{ text: "Hello World", link: "/get_started/hello_world" },
114+
{ text: "Full Example", link: "/get_started/full_example" },
115+
],
116+
},
112117
{ text: `What's Next?`, link: "/get_started/next" },
113118
],
114119
},
@@ -231,7 +236,7 @@ export default defineConfig({
231236
collapsed: true,
232237
items: [
233238
{
234-
text: "Advanced Features",
239+
text: "Advanced",
235240
collapsed: true,
236241
items: [
237242
{ text: "Lock", link: "/cookbook/expert_more/lock" },
@@ -265,6 +270,14 @@ export default defineConfig({
265270
{ text: "Fuzzy Search", link: "/cookbook/eml_cds_sql/fuzzy_search" },
266271
],
267272
},
273+
{
274+
text: "Troubleshooting",
275+
collapsed: true,
276+
items: [
277+
{ text: "Debugging", link: "/configuration/troubleshooting" },
278+
{ text: "Common Failures", link: "/cookbook/troubleshooting/common_failures" },
279+
],
280+
},
268281
{
269282
text: "Obsolete",
270283
collapsed: true,
@@ -290,7 +303,6 @@ export default defineConfig({
290303
{ text: "Performance", link: "/configuration/performance" },
291304
{ text: "UI5 Version", link: "/configuration/ui5_versions" },
292305
{ text: "Production Use", link: "/configuration/productive_usage" },
293-
{ text: "Debugging", link: "/configuration/troubleshooting" },
294306
{ text: "Launchpad", link: "/configuration/launchpad" },
295307
{
296308
text: "ABAP Cloud, BTP",

docs/cookbook/event_navigation/exception.md

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -41,31 +41,6 @@ METHOD z2ui5_if_app~main.
4141
ENDMETHOD.
4242
```
4343

44-
## Common Failure Modes
45-
46-
Not every problem raises an ABAP exception. Many failures surface only in the browser, or fail silently. The sections below describe what to look for in three frequent cases.
47-
48-
#### Binding-Path Mismatch
49-
50-
When a `_bind` / `_bind_edit` path does not resolve against the JSON model on the frontend — typically because the public attribute was renamed, the data was never sent, or the path is mistyped — UI5 does **not** raise an ABAP exception. The control simply renders empty or with a default value.
51-
52-
Where to look:
53-
- **Browser console.** UI5 logs a warning like `Binding "/path/to/field" was not found in model` from `sap.ui.model.json.JSONModel`. Open the browser DevTools console and filter by `sap.ui.model`.
54-
- **Network tab.** Inspect the abap2UI5 response payload — the JSON model is included verbatim. If the field is absent or named differently than your binding path, you have your answer.
55-
- **ABAP side.** Nothing. The backend never learns the binding failed. Asserting "no console warnings" is the only way to catch this in tests.
56-
57-
Two-way binding (`_bind_edit`) silently drops the write-back when the path is invalid — your ABAP attribute keeps its old value after the next event. Cross-check the attribute value in the debugger if data is mysteriously not updating.
58-
59-
#### Malformed XML
60-
61-
`Z2UI5_CL_XML_VIEW` produces XML; UI5 parses it on the frontend. A typo in a control name, an unclosed tag, or an aggregation that contains an invalid child can break parsing entirely.
62-
63-
Where the error surfaces depends on what went wrong:
64-
- **Pure XML syntax errors** (unclosed tag, bad escape) — the XML parser fails and UI5 logs a `Parse error` in the browser console. The page renders blank or up to the broken element.
65-
- **Unknown UI5 controls / namespaces** — UI5 logs `failed to load 'sap.m.NotAControl'` (or similar) in the console; the surrounding view may render partially.
66-
- **Wrong aggregation / wrong child type** — see the warning on the [View Definition](/cookbook/view/definition) page. UI5 may log an `aggregation … does not contain` warning or silently drop the child. Layouts can render in unexpected ways without any error.
67-
- **ABAP side** — none of these surface as ABAP exceptions. `view_display( )` accepts any string. The response goes out, and only the browser notices.
68-
69-
When something looks wrong on screen, **always check the browser console first** before re-reading the ABAP code.
44+
For non-exception failures (binding-path mismatches, malformed XML, and other silent frontend issues), see [Common Failures](/cookbook/troubleshooting/common_failures).
7045

7146
For EML-specific failure handling (`FAILED` / `REPORTED`, transactional behavior, `cx_abap_behv`, `cx_abap_lock_failure`, defensive `TRY/CATCH` patterns), see the [EML](/cookbook/eml_cds_sql/eml) page.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
outline: [2, 4]
3+
---
4+
# Common Failures
5+
6+
Not every problem raises an ABAP exception. Many failures surface only in the browser, or fail silently. The sections below describe what to look for in three frequent cases.
7+
8+
## Binding-Path Mismatch
9+
10+
When a `_bind` / `_bind_edit` path does not resolve against the JSON model on the frontend — typically because the public attribute was renamed, the data was never sent, or the path is mistyped — UI5 does **not** raise an ABAP exception. The control simply renders empty or with a default value.
11+
12+
Where to look:
13+
- **Browser console.** UI5 logs a warning like `Binding "/path/to/field" was not found in model` from `sap.ui.model.json.JSONModel`. Open the browser DevTools console and filter by `sap.ui.model`.
14+
- **Network tab.** Inspect the abap2UI5 response payload — the JSON model is included verbatim. If the field is absent or named differently than your binding path, you have your answer.
15+
- **ABAP side.** Nothing. The backend never learns the binding failed. Asserting "no console warnings" is the only way to catch this in tests.
16+
17+
Two-way binding (`_bind_edit`) silently drops the write-back when the path is invalid — your ABAP attribute keeps its old value after the next event. Cross-check the attribute value in the debugger if data is mysteriously not updating.
18+
19+
## Malformed XML
20+
21+
`Z2UI5_CL_XML_VIEW` produces XML; UI5 parses it on the frontend. A typo in a control name, an unclosed tag, or an aggregation that contains an invalid child can break parsing entirely.
22+
23+
Where the error surfaces depends on what went wrong:
24+
- **Pure XML syntax errors** (unclosed tag, bad escape) — the XML parser fails and UI5 logs a `Parse error` in the browser console. The page renders blank or up to the broken element.
25+
- **Unknown UI5 controls / namespaces** — UI5 logs `failed to load 'sap.m.NotAControl'` (or similar) in the console; the surrounding view may render partially.
26+
- **Wrong aggregation / wrong child type** — see the warning on the [View Definition](/cookbook/view/definition) page. UI5 may log an `aggregation … does not contain` warning or silently drop the child. Layouts can render in unexpected ways without any error.
27+
- **ABAP side** — none of these surface as ABAP exceptions. `view_display( )` accepts any string. The response goes out, and only the browser notices.
28+
29+
When something looks wrong on screen, **always check the browser console first** before re-reading the ABAP code.
30+
31+
For EML-specific failure handling (`FAILED` / `REPORTED`, transactional behavior, `cx_abap_behv`, `cx_abap_lock_failure`, defensive `TRY/CATCH` patterns), see the [EML](/cookbook/eml_cds_sql/eml) page.

0 commit comments

Comments
 (0)