Function | Starts a modal dialog with the given HTML page | ||||||||||||||||||||||||
Example |
myresult = s10dialog( "change_order" ). |
||||||||||||||||||||||||
Format |
data: myscreenid type string, myanchor type string, myheight type i, myleft type i, mytop type i, mywidth type i, myresult type string. myresult = s10dialog( exporting screenid = myscreenid   anchor = myanchor   height = myheight   left = myleft   top = mytop   width = mywidth ). |
||||||||||||||||||||||||
Parameters |
|
||||||||||||||||||||||||
Description |
A modal dialog is started by s10dialog(). After ending the modal dialog with
s10exitdialog() the processing is continued behind the statement s10dialog().
Example In an address display, a pushbutton is offered for changing the address. In
the corresponding ABAP method a modal dialog is started by s10dialog():
The modal dialog is displayed as "fullscreen" by default. You can specify a width and height to display the dialog as a popup instead; optionally, the upper left corner of the popup dialog can also be specified.
* show dialog to change address
In this case, it is helpful to provide the dialog HTML page with a narrow margin: <body style="border: 2px solid gray;" onload='init();'> On small screens (smartphone size) popups often look cluttered, so a fullscreen display of dialogs is better. You can use the values s10session->devicewidth s10session->deviceheight if you want to choose a fullscreen or a popup display depending on the screen size. If the coordinates of the upper left corner, i.e. the parameters "top" and "left", are not specified, the position of the popup is determined automatically. The position of the popup can also be specified relative to an HTML-Element. To do this, use the "anchor" parameter to specify the value set in the HTML page for the desired element with id= or name=. The path of the dialog HTML file is formed as follows: The value of the parameter "screenid" is combined with the name of the S10 class to form a file name, in the format "classname.screenid.html". Any namespace in the class name is omitted for the time being. For example, with screenid = "address_change_dialog" and class name "/s10/customer" the file name "customer.address_change_dialog.html" is formed. This file is now saved in the project path under classes/[classname]/views.[XX]/[filename] where the namespace in the class name is separated by a dot and XX is the two-character language key. In the example above and language German this would be classes/s10.customer/views.de/customer.address_change_dialog.html If the file is not found in this way within the project, a second access is made in the MIME repository in the path sap/bc/bsp/[namespace]/public/classes/[classname]/views.[XX]/[filename]. In our example: sap/bc/bsp/s10/public/classes/customer/views.en/ customer.address_change_dialog.html This allows dialogs for global classes to be stored independently of the project. The result value of s10dialog() is the string passed in s10exitdialog(). |
||||||||||||||||||||||||
Components | S10 Framework |