Skip to content

Commit d554850

Browse files
Yarloy037matz3
andauthored
fix: Add dot prefix to event handlers in application templates (#142)
- Add dot prefix to 'sayHello' event handlers in both TS and JS templates - Fixes UI5 Linter warning: no-ambiguous-event-handler - Ensures generated apps follow UI5 best practices --------- Co-authored-by: Matthias Osswald <mat.osswald@sap.com>
1 parent a4e228c commit d554850

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

resources/template-js/webapp/view/Main.view.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<Button
2525
id="helloButton"
2626
text="{formatter: 'formatter.formatValue', path: 'i18n>btnText'}"
27-
press="sayHello" />
27+
press=".sayHello" />
2828
</additionalContent>
2929
</IllustratedMessage>
3030
</content>
@@ -40,7 +40,7 @@
4040
<Button
4141
id="helloButton"
4242
text="{formatter: 'formatter.formatValue', path: 'i18n>btnText'}"
43-
press="sayHello" />
43+
press=".sayHello" />
4444
</buttons>
4545
</MessagePage>
4646
<% } %><% } else { %>

resources/template-ts/webapp/view/Main.view.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<Button
2525
id="helloButton"
2626
text="{formatter: 'formatter.formatValue', path: 'i18n>btnText'}"
27-
press="sayHello" />
27+
press=".sayHello" />
2828
</additionalContent>
2929
</IllustratedMessage>
3030
</content>
@@ -40,7 +40,7 @@
4040
<Button
4141
id="helloButton"
4242
text="{formatter: 'formatter.formatValue', path: 'i18n>btnText'}"
43-
press="sayHello" />
43+
press=".sayHello" />
4444
</buttons>
4545
</MessagePage>
4646
<% } %><% } else { %>

test/expected/create_ui5_app/com.test.apiapp/webapp/view/Main.view.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<Button
2222
id="helloButton"
2323
text="{formatter: 'formatter.formatValue', path: 'i18n>btnText'}"
24-
press="sayHello" />
24+
press=".sayHello" />
2525
</additionalContent>
2626
</IllustratedMessage>
2727
</content>

0 commit comments

Comments
 (0)