Oracle APEX Builder Plugin version 1.7 is now available! Not heard about this plugin yet? It's a Firefox/Internet Explorer extension to enhance the usability/productivity of the Oracle APEX Builder IDE. It adds So what's new?Do you also have a screen which is bigger than 800x600 for your Oracle APEX development? Have you ever noticed that it looks like that the textareas on the Oracle APEX Builder pages where we enter our SQL statements, PL/SQL code,... are designed to fit for this resolution? A lot of space is unused next to the textareas. It would be much better if the textarea would use it so that we can put a little bit more code into a line.
 That's exactly what the new version of the plugin does. It adjusts the width of the textareas to use this unused space!
 Another new feature is the "Repad sequence numbers" configuration for the "Set" feature of the plugin, which you can use to renumber the sequence numbers of your page items, ... in the bulk edit pages. Thanks again Anthony Rayner for providing the configuration!
Note: With this release I have also upgraded the internally used jQuery library to the newest release. Unfortunately a few features have been removed in the newest version. Please check the "Upgrading the Plugin" section in the HowToInstall file for details. It was also necessary to update the configuration files for the ApexLib integration, please get the new set from the ApexLib download page. And don't forget to clear the browser cache when to have replaced the config files!
Get it now!
Download it from the Oracle APEX Builder Plugin homepage and check the HowToInstall file for all the necessary steps to install it.
What is planned for the next release?
I'm currently playing with the integration of an editor which offers syntax highlighting, auto indent, search/replace, bracket matching, full window editor, ... instead of the boring textareas.
I'm currently looking for beta testers to test and to give input. The following is a screen capture of the integration. So if you are interested, send me a mail. You can find it in my blog profile.

Labels: APEX, APEX builder plugin, APEX hacks, Oracle, productivity
« ... Read full posting ... »
 During the DOAG SIG workshop I was asked how to create a treeview in Oracle APEX where the current selected tree node is highlighted. After a quick thought about the problem, it turned out that there is a quite simple solution for it if you combine the treeview query with some HTML code. - Create a regular tree region
- Create a form region which gets synchronized with your tree
- Change the tree query to contain the following CASE statement
SELECT EMPLOYEE_ID AS ID , MANAGER_ID AS PID , CASE WHEN EMPLOYEE_ID = :P4_EMPLOYEE_ID THEN '<span style="color:white;background-color:blue;">'|| LAST_NAME|| '</span>' ELSE LAST_NAME END AS NAME , 'f?p=&APP_ID.:4:'||:SESSION||'::NO::P4_EMPLOYEE_ID:'||EMPLOYEE_ID AS LINK , NULL AS A1 , NULL AS A2 FROM #OWNER#.EMPLOYEES What does it do?
When the tree is rendered the CASE compares the currently processed node (EMPLOYEE_ID) with the current active record (P4_EMPLOYEE_ID) which is displayed in the form. If the IDs match, it wraps the LAST_NAME column with a SPAN which contains some styling information.
Quite simple, isn't it? :-)
View a working demo of the example.
Labels: APEX, Oracle, tips, Tree
« ... Read full posting ... »
Did you know that you can use the keyboard shortcut Ctrl+Return in the SQL Commands textarea of the Oracle APEX SQL Workshop application to execute the current SQL statement? That's really nice, especially if you are used to it from PL/SQL Developer/TOAD. Labels: APEX, Oracle, tips
« ... Read full posting ... »
I have finally translated the presentation I have done at the DOAG SIG APEX workshop into English. Just read a blog posting by Jan from iAdvice, who had the same idea about using the dictionary views for QA checks as I also describe it in my presentation. But there are also a lot of other examples for which you can use them. Download the presentation from Sourceforge in the Misc / Presentation section. Hope you like it! PS: If you have other good examples for the usage of the views, let me know. Labels: APEX, Dictionary Views, Oracle
« ... Read full posting ... »
Just read on Donal Daly's blog that the Oracle Migration Workbench team has released a step by step migration tutorial about " How to migrate MS Access to Oracle APEX". They migrated the MS Access Northwind Traders example application and published it as a running example on apex.oracle.com. The new name of the APEX application is now Southwind Wholesalers. Check out Donal Daly's posting for more information. Labels: APEX, migration, MS Access, Oracle
« ... Read full posting ... »
Are you looking for some Advanced Oracle APEX Training and do you live in Europe? Then you should check out the European APEX Training Days of the APEX Evangelists. John and Dimitri have announced a 3-day training in September, which covers some advanced Oracle APEX topics like AJAX, SOA Integration, Securing your Application, Customizing Themes and Templates, ... That's your chance in Europe to benefit from the knowledge of John and Dimitri! John has been " Oracle APEX developer of the year 2006" (by Oracle Magazine) and is the author of the book " Pro Oracle Application Express". Dimitri is a well known contributor on the OTN Oracle APEX forum and speaker at Collab'07 and ODTUG Kaleidoscope. Labels: APEX, Oracle, training
« ... Read full posting ... »
Lewis Cunningham from ITToolbox has done an Oracle APEX podcast with David Peak (Oracle APEX Product Manager) and Peter Martin (APEX user). Check it out at " The Buzz about Oracle APEX" Update: Just saw that Dimitri has published a summary of the podcast. Labels: APEX, Oracle, podcast
« ... Read full posting ... »
The Oracle APEX Builder Plugin is now also available for Internet Explorer! For a long time I was looking for a Greasemonkey like add-on for Internet Explorer. I found several of them, like Greasemonkey for IE, Trixie or Turnabout. But the drawback of all of them is that they are not maintained anymore. In most cases development stopped already more than a year ago and the homepages do not mention if they work with Internet Explorer 7 or not. On Saturday I finally found IE7Pro, which supports IE 6/7. And the good news is that it's actively developed. It has some other features too, but I was just interested in the scripting feature.
After adapting my Greasemonkey APEX Builder Plugin script yesterday, I'm proud to announce Oracle APEX Builder Plugin release 1.6 with support for Internet Explorer and Firefox!
Internet Explorer users can now gain the same productivity enhancements in there Oracle APEX Builder as Firefox users. Like Download the new version and follow the HowTo Install file for the necessary installation and configuration steps.
Labels: APEX, APEX builder plugin, APEX hacks, Oracle, productivity
« ... Read full posting ... »
The Oracle APEX blog community is growing and growing. In the last few weeks 7 new APEX related blogs have been started. Check out the blogs of Welcome on board! Labels: APEX, Oracle, Other blogs
« ... Read full posting ... »
Lately a few Oracle APEX related articles have been published which you should read. Labels: APEX, Oracle, Other blogs, security
« ... Read full posting ... »
The disadvantage of the new "Web-World" is that most web pages/applications are not really usable with the keyboard. There are no keyboard shortcuts to trigger different actions like saving the changes, ... You always have to use the mouse for that, from a usability point of view that's not good :-( The Oracle APEX development environment is also written in APEX and runs therefor in the browser. By default there are no keyboard shortcuts to "Apply Changes", "Run the page", ... But here comes the rescue of you productivity and usability! :-) I thought it's time for a new version of the APEX Builder Plugin, especially because it now has it's own Sourceforge project.
So what's new in this version?
First of all, you have the possibility to define keyboard shortcuts for buttons, links, tabs or items. I have already creates some general keyboard shortcuts, but it's up to you to change them.- F8 to run the page
- F10 for "Apply Changes". Note: You have to change the value for other languages!
- Ctrl+cursor-left to go to the previous page/page item/column
- Ctrl+cursor-right to go to the next page/page item/column
- On the report definition pages use Alt+1, Alt+2, Alt+3 to activate the different tabs
See the HowTo Install document for details how to define your own shortcuts.
Another enhancement is also related to the usage of the keyboard. On tabular forms, like the "Bulk update page items" page, you are now able to use cursor up/down to scroll through the rows.
The third enhancement allows you to display a background image or change the background color of your APEX Builder if you are running on a production environment. See the example screenshot I have done based on the provided example in the distribution.
You don't want to have such a background? Just remove it from the config\apex_builder_plugin.js configuration file.
Never used the Oracle APEX Builder Plugin?
Have a look at all the other features.
Download the Plugin and follow the installation and configuration steps in the HowTo Install document!
Change Log of the new version - CR# 1699530: Plugin should also support checkbox fields
- CR# 1717258: Change Background color/Image of APEX Builder IDE
- CR# 1717896: Allow keyboard shortcuts for buttons and links
- CR# 1717798: Add cursor up/down support for tabular forms
Labels: APEX, APEX builder plugin
« ... Read full posting ... »
You want to create a button or a navigation list entry where you want to open an URL in a new browser window? With plain HTML you would normally just write <a href="http://url/" target="_blank"> but how to specify the target="_blank" in Oracle APEX, where you just have the property "URL Target" which just allows you to enter the URL? Sure you could use some Javascript code to open a new window or something similar. Sounds a little bit complicated, or? There must be an easier way!
There is!
You can use the same technique as for SQL injection. Just writehttp://url/" target="_blank into the "URL Target" property. APEX will add the closing quote after _blank for you, because it thinks the URL ends there. That way APEX generates a valid a href with a target for you.
For buttons where APEX generates a javascript:redirect('yoururl') you have to use.javascript:window.document.location.href='http://yoururl/'" target="_blank
Labels: APEX, Oracle, tips
« ... Read full posting ... »
Today I read an article on Grant Rolands blog about sending a SMS from Oracle Forms through a Web-Service. I thought it would be nice to have the same in APEX and PL/SQL, too. For example if you have a system failure or get a new order in your shop... Grant is using a Web-Service provided by Esendex, but I'm sure there are others service providers available too. First I thought using the offered Web-Service and create a PL/SQL wrapper for it our use the Web-Service feature of APEX.
But I decided to go with the simple POST version which is also offered by them. Because why invoke all the Java stuff when there is also a simple version available. The APEX web-service couldn't be used, because then you would not be able to call it from PL/SQL.
The code is quite straight forward. Get a free account, replace the constant values in the example procedure and you are ready to go!
Note: If you have a proxy then you have to uncomment the proxy line. There is also a secure version available which uses HTTPS, but that requires a wallet, ... and I just wanted to demonstrate that it works. The error handling of the procedure could also be improved, but hey, it's just a demonstration. :-)
Have fun waking up your operators/DBAs in the night! :-)
To send a SMS just call the procedure withBEGIN sendSMS('+436991812345','this is a test'); END;
Here comes the example procedure:
CREATE OR REPLACE PROCEDURE sendSMS ( pRecipient IN VARCHAR2 , pBody IN VARCHAR2 ) IS ESENDEX_USERNAME CONSTANT VARCHAR2(40) := 'your_username'; ESENDEX_PASSWORD CONSTANT VARCHAR2(40) := 'your_password'; ESENDEX_ACCOUNT CONSTANT VARCHAR2(40) := 'your_account'; -- vRequest Utl_Http.req; vPostText VARCHAR2(500); vResponse Utl_Http.resp; vResponseText VARCHAR2(2000); vErrorText VARCHAR2(200); BEGIN ---------------------------------------------------------------------------- -- Build text for the post action. -- For a field description, see -- http://www.esendex.com/secure/messenger/formpost/SendSMS.aspx ---------------------------------------------------------------------------- vPostText := 'EsendexPlainText=YES' ||CHR(38)|| 'EsendexUsername=' ||Utl_Url.escape(ESENDEX_USERNAME, TRUE)||CHR(38)|| 'EsendexPassword=' ||Utl_Url.escape(ESENDEX_PASSWORD, TRUE)||CHR(38)|| 'EsendexAccount=' ||Utl_Url.escape(ESENDEX_ACCOUNT, TRUE)||CHR(38)|| 'EsendexRecipient='||Utl_Url.escape(pRecipient, TRUE)||CHR(38)|| 'EsendexBody=' ||Utl_Url.escape(pBody, TRUE); ---------------------------------------------------------------------------- -- if you need to set a proxy, uncomment next line. ---------------------------------------------------------------------------- /* Utl_Http.set_proxy('proxy.it.my-company.com', 'my-company.com'); */ ---------------------------------------------------------------------------- -- Send SMS through the Esendex SMS service. ---------------------------------------------------------------------------- vRequest := Utl_Http.begin_request ( url => 'http://www.esendex.com/secure/messenger/formpost/SendSMS.aspx' , method => 'POST' ); Utl_Http.set_header ( r => vRequest , name => 'Content-Type' , value => 'application/x-www-form-urlencoded' ); Utl_Http.set_header ( r => vRequest , name => 'Content-Length' , value => LENGTH(vPostText) ); Utl_Http.write_text ( r => vRequest , data => vPostText ); vResponse := Utl_Http.get_response(vRequest); IF vResponse.status_code = '200' THEN Utl_Http.read_text(vResponse, vResponseText); -- IF vResponseText NOT LIKE 'Result=OK%' THEN vErrorText := vResponseText; END IF; ELSE vErrorText := 'HTTP status: '||vResponse.status_code||'-'||vResponse.reason_phrase; END IF; -- Utl_Http.end_response(vResponse); -- IF vErrorText IS NOT NULL THEN RAISE_APPLICATION_ERROR(-20001, 'Sending SMS failed with '||vErrorText); END IF; END sendSMS;
Labels: APEX, Oracle, pl/sql, SMS, tips
« ... Read full posting ... »
Oracle APEX 3.0 contains a nice new feature you should be aware of. There is a new substitution variable APEX_DML_LOCK_WAIT_TIME which you can use to define how the behavior of the "Automatic Row Processing (DML)" and ApplyMRU/D processes should be in case if the processed row is locked. With the current setting APEX will wait forever until the row gets unlocked. The bad think about that is that users don't really wait long, they will press the stop button of the browser and submit the changes again and again. And everytime a new database connection from the connection pool is consumed and never released. Probably that would be an interesting denial of service attack vector, but that's a different story.
When can such a locking situation occur?
For example if you have a database where you also have an Oracle Forms application to access the same data, or any other client/server application. Because it's quite common for such applications, that they have a pessimistic locking strategy which means that they lock the row as soon as the users starts to change something. APEX and most web applications use an optimistic locking strategy.
Locks can also exist for a longer time if you have long running batch jobs or something similar which are not immediately committing there changes.
What setting should I use?
I would suggest to set the new substitution value to 0 in every application you create. Independent if you have the above scenario. A setting of 0 will immediately raise an error if the row is locked.
Other options can be found in the online documentation in the chapter About DML Lockings. More background information can be found in the related OTN thread.
Labels: APEX, caution, locks, Oracle
« ... Read full posting ... »
Maybe you have already wondered why I didn't post anything the last week, but I was out of town. Sphinx IT Consulting, the company I'm working for participated as partner at the Oracle Roadshow "Innovations & Experiences" which toured through some cities (Linz, Graz, Vienna) of Austria. The motto of our company was to show people who want to go the Web 2.0 way, that there also other technologies than Java/.Net to do it.
Especially if you have an Oracle-Forms, PL/SQL and SQL background and your application business logic is stored as PL/SQL packages in the database, you may are looking for other possibilities to leverage your existing code and your skills to get it Web ready.
That's why we demonstrated two tools:
- WebMagic4DB, a tools which we have build for one of our customers to leverage the existing PL/SQL infrastructure and knowledge of there developers. It consists of a flexible Echo 2 based runtime framework which is driven by a repository and messages from PL/SQL packages. This allows a very flexible and fast development, where you are still able to do all the business logic in PL/SQL and do a smooth transition to Java.
- Oracle APEX as a good and powerful alternative to JDeveloper/ADF for Web development.
I was "choosen" by our sales department to be responsible for the technical part, so that the people not just hear the marketing "bla bla" ;-)
It was quite interesting and it gave me the possibility to talk with people out there and convince them that there are other ways to web-enable an application than with Java.
Beside of that I also got some infos from customers who are already using APEX. For example the Austrian military is considering APEX to get rid of 22.000 MS Access/Excel applications which are used all over the country. There problem is, that in the past a lot of small applications have been created in the different military stations/deparments/... by recruits during there service time (we have to go to the army) to help them with administrative jobs. But this data is hard to backup, secure, forces duplicate data entry, and so on and that's why they are thinking to centralize that. Sounds interesting.Labels: APEX, Oracle
« ... Read full posting ... »
Have you already used the new Flash Charts in Oracle APEX 3.0? As for SVG charts you can set them to Auto Refresh after x seconds. But it looks like that a small nice feature of the SVG charts is missing for the Flash charts. It doesn't automatically show when the last refresh occurred. But how can we add that?At the first look it doesn't seem to be that easy, because no full page refresh occurs, just the Flash chart is updated with an AJAX call. But at the second look it isn't that complicated if you know the dynamic features of JavaScript. Oracle APEX creates a JavaScript timer which calls the APEX JavaScript library function apex_RefreshChart every x seconds.
<script type="text/javascript" language="javascript"> function chart_r1258481816185669517_InitRefresh(pNow) { setTimeout("chart_r1258481816185669517_InitRefresh(true)",5000); if (pNow){apex_RefreshChart (1, '1258481816185669517', 'en-us');} }
apex_SWFFormFix('c1258481816185669517'); addLoadEvent(chart_r1258481816185669517_InitRefresh(false)) </script> But how can we intercept the apex_RefreshChart so that we can update a "Last Refresh" timestamp on the page?
It's quite easy if you know how! :-)
In JavaScript a function can be accessed and created like a variable. For example withvar vOldFunction = apex_RefreshChart; you get a reference to the function apex_RefreshChart which you now can also call with vOldFunction. Nice, isn't it? But what has this to do with the above problem?
It allows us replace the existing apex_RefreshChart with a new version where we do our additional stuff, but which also calls the original function to get the original functionality APEX provides to refresh the chart.
- Open the Region Definition of your Flash chart.
- Go to Region Source and add the following JavaScript code in front of the existing <object classid=...
<script type="text/javascript"> var vOriginal_apex_RefreshChart = apex_RefreshChart;
apex_RefreshChart = function(page_id,region_id,browser_lang) { document.getElementById("last_refresh").innerHTML = Date(); vOriginal_apex_RefreshChart(page_id, region_id, browser_lang); }; </script> - Go to the Region Footer and add the following HTML code which will be a placeholder for "Last Refresh" timestamp.
<br> <center> Chart will refresh every 5 sec.<br> Last refresh: <span id="last_refresh"></span> </center> What does it do?
It will overwrite the existing APEX library function apex_RefreshChart with a new version which also sets the current timestamp in the span element identified by "last_refresh". BTW, if you don't like the default output of Date(), check out the different JavaScript resources on the Internet to get other formating options.
The above code is also a good example which demonstrates how you can extend/replace the existing JavaScript functions of APEX to add your own behavior.
Want to see an example? Visit my example page.
Labels: APEX, chart, Oracle, tips
« ... Read full posting ... »
|