Products Downloads


French version


 

SAVE program state save block.

 

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

 

The SAVE paragraph allows the developer to manually save the data making up a program state. Manual backup makes it possible to optimize the backup process by selecting the relevant data making up the program state.

 

Optimization may, for example, consist in:

  • not saving temporary variables which are only used in one stage of a calculation,
  • only saving data from the current Web page if the program handles several pages.

 

This paragraph is executed after processing each reversible or irreversible Adelia event linked to the page.

 

To differentiate the processes to carry out according to each processed event, it is necessary to use the reserved words *OBJ_ORIGIN and *EVT_ORIGIN. These reserved words indicate the name of the object having triggered the event and the name of the event that has just been executed respectively.

 

Moreover, it is necessary to use the instruction SAVE_PGM_STATE to save data making up the program state.

 

Note: To disable manual save mode and enable automatic save, all the program's SAVE paragraphs must be deleted.

 

Special cases:

  • When executing a SFTKY/END_SFTKY block, *OBJ_ORIGIN has the Adelia name of the current page as a value and *EVT_ORIGIN has the reserved word *P_SFTKY as a value.
  • When executing a BACK block associated with a page, *OBJ_ORIGIN has the Adelia name of the current page as a value and *EVT_ORIGIN has the reserved word *P_BACK as a value.
  • When executing only the PROCESS instruction in a page, *OBJ_ORIGIN has the Adelia name of the current page as a value and *EVT_ORIGIN has the reserved word *P_PROCESS as a value.
  • When executing a only the INITIALIZE instruction in a page, *OBJ_ORIGIN has the Adelia name of the current page as a value and *EVT_ORIGIN has the reserved word *P_INIT as a value.
  • When executing the INITIALIZE and PROCESS instructions jointly in a page, *OBJ_ORIGIN has the Adelia name of the current page as a value and *EVT_ORIGIN has the reserved word *P_INIT_PROCESS as a value.

 

Example of process in the SAVE block of the page called Adelia WPAGE1:ID:

 

if *OBJ_ORIGIN = 'WPAGE1_ID'

   if *EVT_ORIGIN = *P_PROCESS

      * Save the program variables after the call to PROCESS WPAGE1_ID

   else_if *EVT_ORIGIN = *P_BACK

      * Save the program variables after executing the RETURN block of the WPAGE1_ID page

   end

else_if *OBJ_ORIGIN = 'BTN_CREATE'

   * Save the program variables following creation

else_if *OBJ_ORIGIN = 'ENT_NAME'

   if *EVT_ORIGIN = 'ONCHANGE'

      * Save the program variables after new name input

   else_if *EVT_ORIGIN = 'ONFOCUS'

      * Save the program variables after name field focus setting

   else_if *EVT_ORIGIN = *P_GUIDE

      * Save the program variables after executing the softkey in the ENT_NAME field

   end

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