Monday, April 25, 2016

Oracle Apex Tabular Form delete new rows without submitting

A very good way from:

http://techxploration.blogspot.com/2013/08/oracle-apex-tabular-form-delete-unsaved.html


1. Put this in the Global Function:


function delete_rows(){
    var need_submit = 0;
    $("[name='f01']").each(function(){
    if($(this).attr("checked")) {
       if(this.value == 0) // new rows {
           $(this).closest("tr").remove();
       }
       else  {  //existing rows, need to be removed via page submission.
           need_submit = need_submit + 1;  
       }
     });   
     if(need_submit > 0)    // require submission?
        apex.confirm('Are you sure you want to delete it?','DELETE');
        apex.submit('APPLY_CHANGES_MRD'); 
    };

2. in the Button, put "redirect URL" and put this as target:

    javascript:delete_rows();

Wednesday, April 13, 2016

Sending email from sqlplus(pl/sql) using Apex_mail

declare
  wspace_id number;
begin

  select max(workspace_id) into wspace_id from apex_applications ;
  wwv_flow_api.set_security_group_id(wspace_id);

  apex_mail.send (
    p_from => 'me@test.com'
    , p_to => 'me@test.com'
    , p_subj => 'Send email from Pl/Sql using Apex_mail'
    , p_body => 'test test'
   );

  apex_mail.push_queue('mail.url.com', 25);
end;

Friday, April 1, 2016

Apex 5 Universal Theme Navigation menu color and background color

In Apex 5, we can use the List based Navigation Menu and submenu, sometime you want to change the color or background color of the menu/submenu you choose, I know some is using the Theme Roller to get this done but for me, I always have some difficulties to choose the color I wanted through the Roller,

Here is another way I am doing:

In the Custom css part, put this in:


.a-MenuBar-label:hover {
  background-color: red}

.a-Menu-inner:hover {
  background-color: red}


That's it!!, you can change it to any color you want!