...
Here we use the engine "entity-auto" for updateguest as a simple way to create the required methods and use auto-attributes to generate the fields on our screen. We do not need to define a service script when we select "entity-auto". However, when we delete the record, we also have to remove the relations to the hobbies of the guest. Therefore we have to add the following Minilang script (engine=“simple“) to the OIServices.xml
file, which removes the relations to the hobbies too:
...
The performFind service fetches the data from the HelloPerson entity using the parameters in the FindGuestCtx
context which was defined in the screen definition. This data is put into the listIt
list. As long as you have only one list, you can use the value „parameters“ for the field-name input-fields directly. However, if you have multiple lists, pagination will only work when different contexts are used. The field-name orderBy allows to specify the sort order of the list. Here it is used when the list is sorted by clicking on the column headings. Using the viewSize
attribute field which is defined in the screen definition you can specify how many lines shall be displayed on a page. When there are more lines available, a bar will be displayed which lets you scroll through forward and backwards through the list. You e.g. set the value for viewSize
to two and then you will see this bar with just a few guests entered in your database. The attribute field viewIndex
specifies the first page to be displayed on the screen if this shall not be the first one.
...
In the FindGuestsList form, in the hyperlink, the “description” attribute defines the text displayed as the hyperlink. The term ${helloPersonId}inserts the “helloPersonId” variable. The “target” attribute defines the request map in the controller file for the hyperlink. The “parameter” attribute element passes helloPersonId as a parameter to the Updateguest2 screen.
For the firstname and lastname fields the attribute sort-field="true" is specified. Therefore the list can be sorted by clicking on the column heading for these names.
...
In the controller.xml file we have defined the request-maps with this attributetag: <security https="true" auth="true"/>
This defines that the application can only be accessed using the HTTPS protocol and you need to login to use the requested application. The controller.xml file includes the component://common/webcommon/WEB-INF/common-controller.xml
file. This file contains definitions for the request-maps uri="checkLogin", "login", "logout", "forgotPassword", and "passwordChange" to handle these processes.
...