Products Downloads


French version


 

CANCEL event cancellation block

 

Note: This paragraph is only available for Interactive WADELIA programs created with browser Previous / Next buttons support enabled.

 

The CANCELLATION paragraph is used to cancel the process associated with an Adelia event. Only reversible events can be canceled.

 

This paragraph is executed when the user clicks on the browser's Previous button. In this execution context, the program is in the state it was in before triggering the event to be cancelled. This block is therefore used to update data out of the program's scope (such as data stored in a database for example) so that it remains in a consistent state.

 

Example: If an Adelia Web program handles a Table list object used to display a DB table and an Adelia event creates a new line in the Table list and adds its content to the DB, the CANCEL block must be able to delete the created lined from the DB. It is not necessary to delete the line from the Table list object list as the Table list object state has been saved by the system.

 

As this paragraph is linked to a PAGE context, it can be used to cancel the events defined in the page only.

 

The developer must use the reserved words *OBJ_ORIGIN and *EVT_ORIGIN to distinguish the action to cancel. These reserved words indicate the name of the object having triggered the event and the name of the event to cancel respectively.

The developer must use the GET_FORM_VALUE instruction to retrieve the values of the graphical objects input by the user before processing the action to cancel.

 

Remember that it is not necessary in this block to process the process cancellation linked to an irreversible or dummy event.

 

Important: In this block, leaving the current page is not permitted so the associated processes must not use PROCESS_XXX instructions.

 

Example of process in the CANCEL block:

 

if *OBJ_ORIGINE = 'BTN_CREATE'

   * Cancel creation

else_if *OBJ_ORIGIN = 'ENT_NAME'

   if *EVT_ORIGIN 'ONCHANGE'

      * Cancel the new name input

   else_if *EVT_ORIGIN = 'ONFOCUS'

      * Cancel process on name field focus setting

   end

else_if *OBJ_ORIGIN = 'ENT_COUNTRY' et *EVT_ORIGIN = *P_SFTKY

   * Cancel processing carried out in the SFTKY paragraph

end

 

Go to source

Positions the cursor at the start of the corresponding block in the source.

 

Delete

Deletes the source in the paragraph.

 

 

↑ Top of page


  • Aucune étiquette