Blog PostsStatistics Feedback About Login  


Quick Message: Reorganizing data, some data might be unavailable...


Go

Blog Selection


Change is Coming....
#BLG_RATING#
Joel Kallman 21-NOV-2008 09:38

Change is coming...and no, I'm not referring to the forthcoming change in Washington. I'm referring to Oracle Application Express.

Since the first supported release of Application Express (Oracle HTML DB 1.5), Application Express has been delivered as a supported feature of the Oracle Database, supporting database releases 9.2.0.3 and higher. So even though Oracle HTML DB 1.5 was delivered as a feature of the Oracle Database Release 10gR1, a customer could actually download it from the Oracle Technology Network, install it in their Oracle Database 9iR2 9.2.0.3, and be in a supported configuration.

For the forthcoming release of Oracle Application Express 3.2, which introduces Oracle Forms Conversion, the minimum database version will continue to be 9.2.0.3. But for Oracle Application Express 4.0, the minimum database version will be Oracle Database 10gR2 10.2.0.x - possibly even 10.2.0.4.
Show Comments (0)

Group Headings in an Interactive Report (APEX)
#BLG_RATING#
Dimitri Gielis 21-NOV-2008 08:53

Did you ever wanted a group heading above your column headings in an Interactive Report in APEX? I wondered why that wasn't already included in APEX, as all components are there to get it to work. Let's create a little example to show what I mean.

Create an Interactive Report on the emp table (for ex. select * from emp).

In your Interactive Report details there's a section Column Groups where you can define groups.
But it also says: "Column Groups are used to group columns together on the single row view."
In my example I created two groups.


Next we need to edit the group to say which columns belong to which group.
In my example I specified that the columns Empno and Ename belong to Group 1. I specified some other columns for my Group 2.


If you run the page you'll see this IR (without group headings)


But when you select the single row view (the Edit icon in front of the row) you'll see this:


So you can see the groups nicely in the single row view but it's not there in the normal report...

So I thought, as APEX is completely dictionary driven, we should be able to find all the pieces and with some javascript we should be able to change the DOM element to include the group headings in the normal report too. The result:

You can see this example live here, the source code is also there, so you can see how I did things.

On the page I open the "Select Columns" automatically, so you can see the available columns and the groups in () and you can dynamically play with showing and hiding columns.

In short the way it works:
1) Query the APEX dictionary to see which columns and groups there are defined and return a string that can be parsed into a json object.
2) Create a javascript function to add the group headings above the column headers. I put some notes in the javascript and added a lot of console.log's. If you remove the // you'll see in Firebug a full trace what is happening.
3) To attach it to the Interactive Report and call it from your page you need to do some more. At OOW I had a chat with Carl about it, at the moment you can't call your own function at the end when the interactive report is called (but he was going to change that in future releases). Carl told me I was forced to put a little timeout there to make sure the Interactive Report was drawn before my javascript ran.

Feel free to try it in your own environment and give some feedback. The code is generic so you should be able to plug it into your environment without that much effort. I didn't use jquery as I wanted a generic solution for a "normal" APEX environment. Another thing I didn't do is looking if you defined a link (edit icon) before the row or not. So these might be enhancements for the next release...
Show Comments (0)

A Great Success
#BLG_RATING#
Louis-Guillaume Carrier-Bédard 20-NOV-2008 12:16

The official release of Insum's jQuery Demo Application was a week ago.
What can I say? Thanks to the APEX community for making this project a real success!
Using Google Analytics, I was able to track your every move MUHAHAA! :) We received over 300 unique visitors during this period.

Thanks again.

Now, back to work!
Show Comments (0)

Oracle Apex: Boost performance with a CDN
#BLG_RATING#
Mark Lancaster 20-NOV-2008 02:47

Ext has recently partnered with CacheFly, a global content network, to provide free CDN hosting for the Ext JS framework. See more details on the announcement.

A content delivery network (CDN) is a collection of web servers distributed across multiple locations to deliver content more efficiently to users. The server selected for delivering content to a specific user is typically based on a measure of network proximity. For example, the server with the fewest network hops or the server with the quickest response time is chosen.

i.e. using a CDN to deliver static content, such as Ext javascript, css and images will result in your pages downloading significantly faster.

I've modified my demo site on apex.oracle.com to see the performance difference.
Previously I was pulling the Ext content from extjs.com - using the CDN gave a significant performance boost, making the demo site load much faster and give it a much snappier feel.

To implement was a snap, just referencing the Ext content in my Oracle Apex page templates from the CacheFly site:

 <script type="text/javascript" src="http://extjs.cachefly.net/ext-2.2/ext-all.js"> </script>
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-2.2/resources/css/ext-all.css">

And if that isn't sweet enough, using the Ext’s Build It! tool will automatically install your custom version of the Ext library on the CacheFly website.

So after implementing, I wanted to see how much better my YSlow score was now I was using a CDN.
Bugger - no difference - it wasn't detecting the CDN, so a quick check on why, and how to fix.

Something to think about...
Show Comments (0)

CSS Specificity
#BLG_RATING#
Martin Giffy D'Souza 19-NOV-2008 22:18

Hi,

Most APEX developers will eventually get asked to brand their application or "make it look nice". If you are like myself, and are not a graphic artist, this can be quite a challenge since it is an art to make a web pages look really good.

I've had to do read up on it over the past few months. I finally read an article on CSS specificity (try say that 5 times in a row :-). CSS Specificity is like putting a score or weight on each CSS definition so you know which ones will "override" other definitions.

Here's the article: http://www.smashingmagazine.com/2007/07/27/css-specificity-things-you-should-know/

There's also a link to the CSS specificity calculator: http://www.rebelinblue.com/specificity.php
Show Comments (0)

Flashback table data prevented by a constraint
#BLG_RATING#
Dimitri Gielis 19-NOV-2008 14:51

When I was reorganizing some tables I deleted some data which at the end I wanted to reuse.
I was pretty confident that with the flashback technology in the Oracle database I could get my data again. So I was surprised when I got the message "ORA-01466: unable to read data - table definition has changed".


I thought I had done something wrong so I build a small test case to see what was happening.

-- Create table with one record
create table t (b varchar2(100));
insert into t values ('hello world - works');
commit;
-- Look at the data
select * from t;
-- What timestamp did I still see my data -19-NOV-08 02.09.23.478019000 PM +00:00
SELECT SYSTIMESTAMP FROM dual;
-- Create an index
create index t_idx on t (b);
-- Delete all the data from my table and commit
delete from t;
commit;
-- There's no data anymore, nice
select * from t;
-- And with the flashback technology I see my data
select * from t as of timestamp to_timestamp('19-NOV-08 02.09.23.478 PM');
-- Insert another record
insert into t values ('hello world - no go');
commit;
-- Do some DDL on the table now, add a constraint
alter table t add constraint t_pk primary key (b)
select * from t;
-- I still see my data at this stage, but now we drop the constraint and delete the records
alter table t drop constraint t_pk;
delete from t;
commit;
-- Use flashback again
select * from t as of timestamp to_timestamp('19-NOV-08 02.09.23.478 PM');
-- I can't get to my data anymore

When reading through the documentation this made it clear: "Oracle Database cannot restore a table to an earlier state across any DDL operations that change the structure of the table".

Oracle does have limits ;-) and time for me to read through the documentation again...
Show Comments (0)

Integrate Oracle Forms with APEX
#BLG_RATING#
Roel Hartman 19-NOV-2008 14:14

APEX 3.2 will contain functionality to migrate Oracle Forms to APEX. I am one of the (about) 10 lucky people that take part in testing the Limited Early Adopter release, so I know what it can and cannot do (I will blog about that later).
In 2007 Wilfred van der Deijl did a presentation at ODTUG about the integration of Oracle Forms with JSF, JSP and ADF Faces. This eventually resulted in a product OraFormsFaces. The technique he used is elaboratly described in this Step-by-step guide.
So I thought: Why not try to copy this technique and do this also in APEX?

So first I created a simple form showing Orders (all is based on the HR scheme). The second step is to incorporate this Form in an APEX region. So I created a page and within that page a PL/SQL region. The region source is a call to a database procedure APEX$CALL_FORM. This procedure has a couple of arguments, like formname, username and password. This procedure simply uses htp.p to put out the same tags that are used to show a form the regular way (I used Firebug to grab that code) and uses the parameters to replace the formname etc.

The results is:

This is showing a Form within an APEX region. The form is embedded in two DIV's: An 'innerdiv' and an 'outerdiv'.
Next was to apply some style attributes to the div's and the applet itself to keep the menu, buttons and scrollbar out of sight. I used the width and height settings to eliminate the scrollbars and negative margin settings to clip all unwanted content.

The result of that excercise look like this:
You can hardly tell that this is an Oracle Form (especially because I used similar visual attributes as the APEX theme).

The next step was to use this form as a master for a (detail) APEX region: Order Items. Just above the Order Items region I created a dummy region that contains the Order Id for which the Order Items should appear in the report. In the HTML Form Elements Attributes of the Order Id I entered a piece of javascript (onchange="javascript:refresh_region(this);") that would refresh the Order Item region on a change of the Order Id (therefore the function refresh_region does a call to html_PPR_Report_Page).

So far so good. When navigating through the form the Order Id should be updated (and automagically the Order Items get updated as well). So I added a WHEN-NEW-RECORD-INSTANCE to the Order Block in the form with just one simple call: web.show_document('javascript:$s("P1_ORDER_ID",'||:DEMO_ORDERS.ORDER_ID ||')', '_self');
This sets the (APEX) P1_ORDER_ID to the current Order Id in the form. And this works magnificent!
The final step is to use the Oracle Form as a detail to an APEX region as well (so a master-detail-detail page). Therefore I copied the 'CommunicatorBean' java code from Wilfred's guide and deployed that on my Forms Server (it took somewhat longer than just these two lines, but I won't go in to that ;-) ). I also added a CommunicatorBean-item to my form and added the following code in the WHEN-CUSTOM-ITEM-EVENT triger on that item.

declare
BeanEventDetails ParamList;
ParamType number := text_parameter;
Event varchar2(1000);
Payload varchar2(1000);
begin
BeanEventDetails := get_parameter_list(:system.custom_item_event_parameters
);
get_parameter_attr(BeanEventDetails, 'Event', ParamType, Event);
get_parameter_attr(BeanEventDetails, 'Payload', ParamTyp
e, Payload);
if event='do_key'
then
message('About to '||payload);
do_key(payload);
end if;
if event='execute_query'
then

set_block_property('DEMO_ORDERS', DEFAULT_WHERE, 'WHERE CUSTOMER_ID = '||payload );
execute_query;
end if;
end;

Then I created a master region (Interactive Report on Customers) and on the column Customer ID a link: javascript:setFormItem(#CUSTOMER_ID#); and this function does nothing more than : document.formsapplet.raiseEvent('execute_query', pCustId );.
And now, when I click on a Customer Id, the Form immediately shows the Orders for that customer and the Order Items are synchronized with the Order in the Form.
So it is possible to integrate your existing Forms with an APEX application, making a smooth transition possible.
I have submitted an abstract for ODTUG on this subject, so if it is selected I can show you this (and more!) live...
Last but certainly not least, many thanks to Wilfred for sharing his knowledge on the web!
Show Comments (0)

Tabs to choose which region to display
#BLG_RATING#
Louis-Guillaume Carrier-Bédard 19-NOV-2008 12:00

It's possible to reduce the space required by regions on a page. How? Use tabs to dynamically choose which region to display. jQuery UI Tabs makes it easy for us to do so.

You can try a working example of my jQuery UI Tabs in APEX demo.

1.
For this example, I need 4 regions.

The first region called "TABS" is an HTML Region with template "No Template".




The Region Source is:

<ul>
<li><a href="#my_form"><span>My Form</span></a></li>
<li><a href="#my_report"><span>My Report</span></a></li>
<li><a href="#my_calendar"><span>My Calendar</span></a></li>
</ul>


This list holds 3 tabs. One tab for each of the region I want to display. Notice the "ahref" values. Each value correspond to a region static ID.

2.
Now, I create the 3 regions I want to display using the tabs.
First, create "My Form" Region and set his static ID to "my_form".
Second, create "My Report" Region and set his static ID to "my_report".
Third, create "My Calendar" Region and set his static ID to "my_calendar".

3.
Add the jQuery code to my page HTML header.


<script src="http://www.google.com/jsapi"></script>
<script>
// Load jQuery
google.load("jquery", "1.2.6");
</script>
<link rel="stylesheet" href="wwv_flow_file_mgr.get_file?p_security_group_id=54352117549007872&p_fname=my_tabs_01.css" type="text/css" media="screen" title="Flora (Default)">
<script src="wwv_flow_file_mgr.get_file?p_security_group_id=54352117549007872&p_fname=jquery.ui.all.js"></script>
<script src="wwv_flow_file_mgr.get_file?p_security_group_id=54352117549007872&p_fname=jquery.cookie.js"></script>
<script>
$().ready(function() {
$(document).ready(function(){
//set ID value for column containing "My Form", "My Report" and "My Calendar"
$("#my_form").parent().attr("id","my_tabs");

//create the Tabs
$("#my_tabs > ul").tabs(
{cookie: {expires: 1}
}
);

//set the Tabs width
$("ul.ui-tabs-nav").css({width:"420px"});
});
});
</script>


N.B.
1) I had to set manually the Tabs width because displaying "My Report" had the effect of displaying the tabs on 2 lines.
2) I need to use the jQuery Cookie Plugin to remember the last selected tabs. This is useful when displaying "My Calendar" and switching mode (or any action causing the page to submit).
3) A CSS file is required to display the tabs. I modified the CSS file used by the official demo for jQuery UI Tabs.


I'll be working on a similar demo. The tabs content will be requested using AJAX.
Show Comments (0)

Anychart 5 integration kit for APEX
#BLG_RATING#
Dimitri Gielis 18-NOV-2008 14:44

A few days ago we released our Anychart 5 integration kit for Oracle Application Express (APEX).

Background

APEX has the ability to create (flash) charts. They are based on an older version of Anychart, version 3.3. Although these charts are already nice, there are some problems with it. You can't do everything you want with it, you can't print for ex, in short they look fine but not great.
Anychart released a while ago Anychart 5 which not only looks a lot nicer, but it resolved the problems and it has a lot more possibilities and features! Below, on the left, a chart created in APEX by using one of the predefined examples and on the right, the chart in Anychart 5 format.

I hope the charts speak for themselves ;-)

Installation

You can install this integration kit in a couple of different ways. If you prefer to keep the original APEX installation intact, you can do that and copy the integration kit in another folder. That means you can use the Anychart 3.3 and Anychart 5 charts together (like on the site of us).
You can also overwrite the files that came with APEX (take a backup first!) and that should change all your charts (also existing ones) in Anychart 5 format.

In both cases you can still use the wizards in APEX to create the charts, but if you decided to not overwrite the files, you need to make a small change in the chart region to point to the right path where you installed your files. The integration kit was tested on APEX 3.x (0, 1) and database 10g, 11g and XE with both the http server and the Embedded PLSQL Gateway. However if you do find a problem, please let us now or write a mail to apex@anychart.com.

Under the hood

So what's happening? The Anychart 5 file format is in a very different format, so what we did is creating a translation file which converts the Anychart 3 xml into Anychart 5 xml. You'll see the 2DColumn.swf of the integration chart are really small, that's because only the translation is done there and then sent to the anychart.swf file in the format it recognizes.


Using the integration kit

You can keep using the wizards in APEX to create your chart. This integration kit is meant as a first step towards the full kit we are working on. All the current types of charts in APEX are already supported by this kit and more, like for ex the combined charts - like on the screenshot above-, but Anychart 5 can do a lot more. For the Dashboards and Gauges for ex, which are currently not yet a type in APEX, you would need to write some more code yourself.
The followup kit will also provide you with the possibility to create these types of charts (Dashboards, Gauges, Maps, Gantts) through a wizard or at least with writing as less code as possible. In the meanwhile we (Apex Evangelists) can provide you with consulting to create other types of charts.


Examples

A full set of examples can be found on this site. All types of charts are shown in the standard APEX format (without changing or making it nicer), in the middle (if you enable the checkbox) you'll find the exact same chart but using the integration kit (so no changes made there) and on the right you find the same chart but with a few changes that shows the potential of Anychart 5.
You can also view the source of the region, the chart and the series that are used.

Purchase

The integration kit comes with a trial version of the Anychart 5 .swf file. You can see it by the watermark. If you buy the full version from the Anychart website and replace the anychart.swf file that comes with the integration kit, the watermark will disappear.
The integration kit itself doesn't cost you any money, you only need to pay for the Anychart license. APEX users get a 15% discount by using the code: APEX15

Final thoughts

This integration kit came together by the partnership of Apex Evangelists and Anychart. I would like to thank the people at Anychart for their help in working on this.
Show Comments (0)

Anychart 5 (Flash) Integration
#BLG_RATING#
Bernard Fischer-Wasels 18-NOV-2008 10:01

Dimitri Gielis (Apex Evangelist) hat eine super Demo mit Skriptbeispielen und "Integraton Kit" erstellt für noch mehr Flash charts...:
der Highlight ist dieses "Dashboard", wo sich sogar die "Gauges" wie Windgeschwindigkeit, Windrichtung, Niederschlag, usw. bewegen...


Einige der "Anychart" Flash Grafiken/Reports werden ja schon in APEX 3.0 (und höher) genutzt. Oracle hat diese dafür bei Anychart lizensiert.
Die "Anychart 5 Version" bietet nun doch noch einiges mehr.
Wie auf der Anychart.apex-evangelist Seite zu lesen ist, muß man diese "Anychart 5" Lizenzen erwerben bei Anychart, bekommt jedoch als APEX Entwickler 15 % Rabatt.
Eine Investition, die sich sicherlich lohnt.
Das APEX / ANYCHART 5 Integration Kit wird kostenlos von APEX-EVANGELISTS zur Verfügung gestellt.
Hinter APEX EVANGELIST verbergen sich übrigens JES (John Scott), Dimitri Gielis, Patric Wolf.
Show Comments (0)

 1 2 3 4 5 6 7 8 9 10  Next »








 
 

© Created and Hosted by Apex Evangelists