Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to display success message and refresh region using apex.server.process

Soukaina IDRISSIMar 4 2018 — edited Mar 5 2018

Hi everyone,
I using JS to delete row from IR,

I did this code below, as DA when item P1_DELETE_FILE_ID change:

var confirmDialog = confirm('Are you sure you want to delete this file?');

if (confirmDialog == true) {

apex.server.process('DELETE_FILE',

                    { x01: $v('P1_DELETE_FILE_ID') },

                    { success: function( pData )

                               apex_application.g_print_success_message := '<span style="color:green">File deleted</span>';

                               /*apex_application.g_print_success_message := '<span style="color:green">pData</span>';*/

                     }    } );

}

else {

  $s('P1_DELETE_FILE_ID', '');

}

Nothing is happening, i didnt see any confirm box, but the P1_DELETE_FILE_ID is filled.(here is something wrong with this code)

Briefly, my need is:

When i click on delete icon i get confirm message ;
if the return is true {

  • Delete row
  • Get auto hide message notification
  • refresh IR region

}

else {nothing}

You can see demo on apex.oracle.com with this credentials:

Workspace: ws_formation

Username: asoukaina

Password: s@boulah1013

Application 144039 - Delete row

Thank you for help.

This post has been answered by Pavel_p on Mar 5 2018
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 2 2018
Added on Mar 4 2018
6 comments
1,464 views