What is an Object?
- An Object or DataSource is the metadata definition of a Database Table or View or a PL/SQL Package. All the DML statements are generated using the Object metadata. Objects are bound to the UI Controls like Grid, Panels, Charts, Calendar, Maps etc.
How to Query an Object Definition?
- Navigation →Developer →Data Source List.
- Search for the Object on the Object Search region.
How to create a new Object Definition?
- First enter the table name, then enter the data source name and enable the Active check box.
- Save the data.
- Now enable the Sync check box and click on save.
- Then all the columns in the table/view get populated in the data source.
|Datasource Name||A unique name given to the Object. This is the value that will be used while binding the Datasource with the UI component.|
|Active||Indicates whether Object is active or inactive. Once inactivated any UI component that is bound to the Object will throw an error while trying to access the Object|
|Email On Insert||If this property is enabled, then a mail will be sent every time when an insert action takes place on this data source.|
|Email On Update||If this property is enabled, then a mail will be sent every time when an update action takes place on this data source.|
|Table Name||This is the data base table name or view name .|
|Sync||To Synchronize the datasource metadata with that of the database object|
|Use API||If you want your package to be accessed by the platform then you need to enable the Use Api check box.|
|Call Post Query||If you want to write business logic in you package which returns a value after the data is commited in the data base, then check the Call post query property.|
|Confirmation Enabled||If you wish to have any confirmation message to shown in the Ui, then check the confirmation Property .|
|API Name||This is the package name through which the platform can access when Use Api property is checked.|
|Object Handler Class||If the user wants to execute his own processes then he can come up with a Object Handler Class.So specify the Class name ove here.|
Specify the debug log level, the log level is set on the Database. You can use the slider as shown below to specify log level.Maximum level is 20.
How to update objects?
- Objects which are already created and being used in the application can be updated with new attributes by using the sync option.
Assumption: As each object is associated with a Table/View and object attributes are associated with columns in the table, the user is assumed to have already created the new columns in the corresponding database table/view.
- Go to Navigation → Developer →Data Source List.
- Choose the Data source object that needs to be updated among the list displayed
- Click on the Object Name to navigate to the Datasource details page
- Check the Sync Checkbox and click on Save Button
Object Details Tabs
- When the User clicks on any of the Datasource Object, a Tab appears with the following tabitems.
- Server side validation script
- Pre Query Script
- Post Query
- The attribute tab contains all the attributes of the respective datasource object in the first column and its respective properties in the following columns.
While Updating the attribute type and max length of an attribute for an underlying Table/View which are not maintained by RapApp follow the below steps.
- Make the datasource object inactive and click on save.
- Update the attribute and click on save.
- Then make the datasouce object active again and click on save.
Server side validation script
- The server side validations are done in this particular tab.
- Email actions on the datasource are done in this tab.
- for more details refer to Email actions.
Pre Query Script
Custom Search code can be specified as part of Pre Query Script for a object