Apex etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster
Apex etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster

29 Mart 2018 Perşembe

Custom CSV download with an AJAX Callback


You can find custom CSV download steps below. (Without submit)

The button to download.


Ajax Callback process in the page.




(Type Ajax Callback) Process body is ;

begin
htp.p('Content-type: text/csv');
htp.p('Content-disposition: attachment;filename=ledger.csv');
owa_util.http_header_close;

htp.p('"Emp No","Emp Name"');

for i in (
select empno, ename
  from emp)
    loop
      htp.p('"'||i.empno||'","'||i.ename||'"');
    end loop;
end;

28 Mart 2018 Çarşamba

Apex - Change a Button to a Link

Firstly, You need a copy "text" button template as "link".


And then you can use your new template on a button. 


15 Mart 2018 Perşembe

Creation of JSON object with APEX_JSON package

BEGIN
    APEX_JSON.initialize_clob_output;
    apex_json.open_object;        -- {
    apex_json.write('a', 1);    --   "a":1
    apex_json.open_array('b');  --  ,"b":[
    apex_json.open_object;    --    {
    apex_json.write('c',2); --      "c":2
    apex_json.close_object;   --    }
    apex_json.write('hello'); --   ,"hello"
    apex_json.write('world'); --   ,"world"
    apex_json.close_all;          --  ]
                          -- }
    DBMS_OUTPUT.put_line(APEX_JSON.get_clob_output);
    APEX_JSON.free_output;                     
END; 

Email validation for Apex

You can use below regexp expression for email validation in your apex applications.

^[A-Za-z_-]+[A-Za-z0-9._-]+@[A-Za-z0-9._-]+\.[A-Za-z]{2,4}$



12 Mart 2018 Pazartesi

Oracle Apex Standart Report Download Link Problem


Problem was related with download link and 
somehow download link's checksum was missing.
When I removed "Page Item to Submit" property value, it solved.
I faced with this problem at Apex Version 5.1.3.00.05.
 

26 Şubat 2018 Pazartesi

Oracle sleep func in Apex

APEX_UTIL.PAUSE(5); --sleep for 5 second

Setting Session State with PL/SQL

APEX_UTIL.set_session_state(p_name => 'PX_MY_ITEM', p_value => 'wibble');

Implement a busy modal indicator in Oracle Apex

At the start of your processing, execute (javascript):
    apex.widget.waitPopup()

And when done, just remove the elements (again, javascript): 
    $(".u-Processing,#apex_wait_overlay").remove();

11 Ağustos 2016 Perşembe

Oracle Apex - Shuttle için where clause

Shuttle nesnesi kullanırken aşağıdaki where cümleciği örneğini kullanabilirsiniz.

 select .....   
 from ......  
 where  
 ..... önceki koşullarınız.....   
 and  
 (  
   :P1_MY_SHUTTLE is not null and  
   (instr(':'||:P1_MY_SHUTTLE ||':',':'|| f.component_id||':',1) > 0 )   
 )  

Oracle Apex - Shuttle item için genişliğin değiştirilmesi

Bazı durumlarda shuttle nesnesinin genişliğini değiştirmek gerekibiliyor.
Bunu yapmak için shuttle item için edit butonuna bastıktan sonra
"HTML Form Element Attributes" özelliğini aşağıdakine benzer
şekilde değiştirebilirsiniz.


 HTML Form Element Attributes: style="width:250px"  

12 Eylül 2014 Cuma

OEL 5.5 üzerinde Apex 4.1 'den 4.2' ye upgrade

1) Apex 4.2, aşağıdaki adresten download edilir.

http://www.oracle.com/technetwork/developer-tools/apex/downloads/index.html

2) Download edilen apex4.2.5.zip istenilen bir klasöre açılır.

3) Zip dosyanın açıldığı klasörde apexins.sql dosyası çalıştırılır.

sqlplus ile sys user kullanılarak bağlanılmalıdır.
apexins.sql dışarıdan 4 parametre alır : APEX user için kullanılacak tablaspace, FLOWS_FILES user için kullanılacak tablespace,TEMP tablespace, image klasörünün ismi.

$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Thu Jan 3 11:21:39 2013
 
Copyright (c) 1982, 2011, Oracle. All rights reserved.
 
SQL> @apexins.sql APEX APEX TEMP /i/

Benim makinemde komutun tamamlanması 16 dk. sürdü.
Sonrasında “APEX_040200″ kullanıcısının oluştuğunu görebilirsiniz.

4) Upgrade sonrası kontrol

Kurulum sonrası aşağıdaki query sonucu "VALID" olmalıdır.

$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Thu Jan 3 11:21:39 2013
 
Copyright (c) 1982, 2011, Oracle. All rights reserved.
 
SQL> select status from dba_registry where comp_id='APEX';
 
STATUS
-------------------------------------------------------
VALID

5) Image klasörünün ayarlanması

Kurulum sonrası, eski apex kurulumunuzun bulunduğu klasörün ismini değiştirin ve
yeni apex klasörünüzü buraya taşıyarak aynı ismi verin.
Sonrasında eski apex/images klasörünüzde bulunan manual yüklediğiniz resim dosyalarınızı
yeni apex/images klasörünüze kopyalayın.

6) Eğer Oracle 11g kullanıyorsanız ve mail atma gibi aksiyonlarınız varsa
ilgili network yetkileri “APEX_040200″ user için verilmelidir.

Aşağıdaki sql scripti sys user ile çalıştırılmalıdır.

DECLARE
ACL_PATH VARCHAR2(4000);
BEGIN
-- Look for the ACL currently assigned to '*' and give APEX_040200
-- the "connect" privilege if APEX_040200 does not have the privilege yet.
SELECT ACL INTO ACL_PATH FROM DBA_NETWORK_ACLS
WHERE HOST = '*' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;
IF DBMS_NETWORK_ACL_ADMIN.CHECK_PRIVILEGE(ACL_PATH, 'APEX_040200',
'connect') IS NULL THEN
DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(ACL_PATH,
'APEX_040200', TRUE, 'connect');
END IF;
EXCEPTION
-- When no ACL has been assigned to '*'.
WHEN NO_DATA_FOUND THEN
DBMS_NETWORK_ACL_ADMIN.CREATE_ACL('power_users.xml',
'ACL that lets power users to connect to everywhere',
'APEX_040200', TRUE, 'connect');
DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('power_users.xml','*');
END;
/
COMMIT;

Bu blog yazısını hazırlarken gerçekleştirdiğim upgrade
deneyimi yanısıra aşağıdaki adresten yararlandım.
İncelemeniz faydalı olabilir. 

https://matthiashoys.wordpress.com/tag/apexins-sql/