I had the pleasure to find either an APEX bug or to find out that I'm unable to create packed applications! :O
After I installed my example application from http://apex.oracle.com/ on my local machine. I got a strange error after I edited an automatic installed javascript file:
The resource from this URL is not text: http://#SERVER_NAME#:8080/apex/wwv_flow_file_mgr.get_file?p_security_group_id=4257722764435732&p_flow_id=12000&p_fname=json.js
I checked the file again and found out that the "mime type" changed to: text/x-c
Normally it is: text/x-js
I uploaded/replaced a couple of installed javascript files to show you the difference:
All installed javascript files got this new mime type and they all worked properly until I changed something inside these files (in APEX).
As you see html and sql files got the right mime type even after the import.
Is this a known issue? Did I export and import something wrong?
I use the newest version of APEX 3.2 inside a XE database.
APEX example apps
Blogs about APEX/ExtJS
Apps around the Oracle DB
JS compress/decompress
Blog aggregators
Labels
- APEX examples (25)
- Browser issues (4)
- DBMS_SCHEDULER (1)
- Development tools (2)
- EXTJS (6)
- ORA- (4)
- Personal stuff (3)
- TREE (3)
10 July, 2009
Issue with packed app and javascript files (text/x-c)
02 July, 2009
Getting started with ExtJS Grids in APEX
I fumbled a bit around with ExtJS Grids and found a fantastic forum link where Ben really well described how to build an Ext Grid inside an APEX report template.
oracle apex and extjs grid table
25 June, 2009
DBMS_SCHEDULER examples
May be interesting to some of you which haven't had the time testing and working with the DBMS_SCHEDULER. I collected some examples to show what is possible with that amazing tool.
DBMS_SCHEDULER is an internal Oracle package (since Version 10g) which provides database driven jobs.
It's divided into 3 parts:
- Time schedule part - dbms_scheduler.create_schedule
- Program declaration part - dbms_scheduler.create_program
- Job (conflation) part -dbms_scheduler.create_job
begin
-- daily from Monday to Sunday at 22:00 (10:00 p.m.)
dbms_scheduler.create_schedule
(schedule_name => 'INTERVAL_DAILY_2200',
start_date=> trunc(sysdate)+18/24, -- start today 18:00 (06:00 p.m.)
repeat_interval=> 'FREQ=DAILY; BYDAY=MON,TUE,WED,THU,FRI,SAT,SUN; BYHOUR=22;',
comments=>'Runtime: Every day (Mon-Sun) at 22:00 o'clock');
-- run every 5 minute, every day
dbms_scheduler.create_schedule(
schedule_name => 'INTERVAL_EVERY_5_MINUTES',
start_date => trunc(sysdate)+18/24,
repeat_interval => 'freq=MINUTELY;interval=5',
comments => 'Runtime: Every day all 5 minutes');
-- run every minute, every day
dbms_scheduler.create_schedule(
schedule_name => 'INTERVAL_EVERY_MINUTE',
start_date => trunc(sysdate)+18/24,
repeat_interval => 'freq=MINUTELY;interval=1',
comments => 'Runtime: Every day every minute');
-- run every Sunday at 18:00 (06:00 p.m.)
dbms_scheduler.create_schedule
(schedule_name => 'INTERVAL_EVERY_SUN_1800',
start_date=> trunc(sysdate)+18/24,
repeat_interval=> 'FREQ=DAILY; BYDAY=SUN; BYHOUR=18;',
comments=>'Runtime: Run at 6pm every Sunday');
end;
Example of the dbms_scheduler.create_program part:
begin
-- Call a procedure of a database package
dbms_scheduler.create_program
(program_name=> 'PROG_COLLECT_SESS_DATA',
program_type=> 'STORED_PROCEDURE',
program_action=> 'pkg_collect_data.prc_session_data',
enabled=>true,
comments=>'Procedure to collect session information'
);
end;
Example of the dbms_scheduler.create_job part:
begin
-- Connect both dbms_scheduler parts by creating the final job
dbms_scheduler.create_job
(job_name => 'JOB_COLLECT_SESS_DATA',
program_name=> 'PROG_COLLECT_SESS_DATA',
schedule_name=>'INTERVAL_EVERY_5_MINUTES',
enabled=>true,
auto_drop=>false,
comments=>'Job to collect data about session values every 5 minutes');
end;
Examples to change dbms_scheduler settings:
begin
-- change start time
DBMS_SCHEDULER.SET_ATTRIBUTE(
name => 'INTERVAL_EVERY_5_MINUTES',
attribute => 'start_date',
value => to_date('22.06.2009 12:15','dd.mm.yyyy hh24:mi')
);
-- change repeat interval
DBMS_SCHEDULER.SET_ATTRIBUTE(
name => 'INTERVAL_EVERY_MINUTE',
attribute => 'repeat_interval',
value => 'freq=MINUTELY;interval=2'
);
end;
Example to run job immediate:
begin
dbms_scheduler.run_job('JOB_COLLECT_SESS_DATA',TRUE);
end;
Select job status:
-- All jobs
select * from user_scheduler_jobs;
-- Get information to my job
select * from user_scheduler_job_log where job_name='JOB_COLLECT_SESS_DATA';
Further information about the DBMS_SCHEDULER:
http://psoug.org/reference/OLD/dbms_scheduler.html
Oracle documentation about the DBMS_SCHEDULER
These scripts are tested in an Oracle XE environment (10.2.0.1).
I will extend this post whenever I need new scripts. Read More »»
19 June, 2009
ExtJS navigation tree
Hi folks,
I added an ExtJS navigation tree to my example application. To get the JSON data out of the database I created a small package which is dynamically creating this data string on every page load.
Take a look at the updated source code: AAW - ExtJS navigation tree
I got some request about the application installation file (application source code). So I decided to publish it to everybody how asks for it via email: tobias-arnhold@hotmail.de
I would use the same procedure as Denes does. You get an developer account and can download the current version yourself.
PS, feedback is always welcome! :D
17 June, 2009
ExtJS theme switcher for APEX
I integrated an ExtJS theme switcher in my example app.
How to?
ExtJS theme switcher for APEX (includes example + description)
I fixed a bug when you accessed a page (!= 1) the APEX tree area was empty.
I just changed the startup script to an application process.
About Me
- Tobias Arnhold
- Dresden, Saxony, Germany
- I'm database administrator for Oracle 10g databases and develop applications in Oracle Application Express and Oracle Forms&Reports. In the time when I started working with Oracle products somewhere in 2005. I came along with Oracle APEX 1.6 and since then I started developing professional applications with it. The biggest success I had with APEX was the second place at the ORACLE-APEX-AWARD 2008. I made my eduction in Germany, Dresden as an IT specialist 2005 and 2009 I enhanced it to a professional studies for informatics. All I express are my own views on APEX and other third party software and it doesn't have necessarily to do with the views of other companies or persons.
