Forum Replies Created
-
5 years, 4 months ago in reply to: Change function of Handy back button in the App #19489::
Ok, this Script works,
document.addEventListener("backbutton", onBackKeyDown, false); function onBackKeyDown() { var curr_page = sap.ui.getCore().byId("Application").getCurrentPage(); console.info(curr_page.getId()); if (curr_page.getId() === "PAGE1") { console.info('close pressed'); window.navigator.app.exitApp(); // OK } else { console.info('back pressed'); // window.navigator.app.backHistory(); // <no action this.navBack(); // Uncaught TypeError this.navBack is not a function // window.navigator.app.navBack(); // Uncaught TypeError window.navigator.app.navBack is not a function } }
but this.navBack(); and the other variations doesn´t.
Any Idea why?5 years, 4 months ago in reply to: Change function of Handy back button in the App #194435 years, 4 months ago in reply to: Change function of Handy back button in the App #19467::document.addEventListener("backbutton", onBackKeyDown, false); function onBackKeyDown() { // Handle the back button //alert('Back Button is Pressed!'); if ("{actual Screen}"=== "Main") { console.info('close pressed'); // Backbutton -> close App } else { console.info('back pressed'); // NavTo history.back or backtoMain } }
This works, but i don´t know how to handle the if-command and Backbutton in SAPUI…
Need help how i ask for actual Screen and the commands how i go history (window) back and close app
5 years, 4 months ago in reply to: Change function of Handy back button in the App #195205 years, 4 months ago in reply to: MenuItem, Logout function not working #195714 years, 4 months ago in reply to: Checkbox with string output #25404::Thx Vitali,
but that’s the other direction.
I want the X in the key field without any process logic. i have more than 20 checkboxes to fill and every condition to select makes it more lowly
{= ${variableHolder>/USER_STRUCT/allowed} ? 'X' : ''}
<– this is the way i want to go (see checkbox-key)But this one is looking for the state of /USER_STRUCT/allowed and i want to look for state of ‘this.checkbox.id.selected’ to set key as ‘X’ or ”.
the key of checkbox used in the process ui action to fill a variable or do anything else (see ui-action-key)
i don’t want to create a boolean variable to save the checkbox selected, because i don’t need this value. i only need the key value X or not
I don´t know how the syntax is in the Simplifier UI field?
Attachments:
You must be logged in to view attached files.4 years, 4 months ago in reply to: Checkbox with string output #25447::Ich habe das ganze jetzt in einem Script gelöst, da ich es mit dem Binding im Moment nicht hinbekommen habe…
Das ganze sieht dann so aus:
if ((this.getItemValue('Meldung', 'CheckBox_User_allow', 'selected') == true)) { this.getGlobals().setVar('USER_STRUCT','j', 'allowed'); } else {this.getGlobals().setVar('USER_STRUCT','n', 'allowed');}
So kann ich das ganze mehrfach untereinander kopieren, die Felder der Checkbox (CheckBox_User_allow) und der Variable (USER_STRUCT.allowed) anpassen. Bei Button Press fülle ich die Struktur und schiebe sie ins PDF.
Vorteil ist dabei ist die freie Wahl was im String steht, da ich in der Struktur gleich String und keine Boolean mehr habe.
mfg Ralf