Browser and Session value in APEX

For those of us who have been developing in APEX for a while will understand that the value of an item in APEX is not always what it seems. That’s right; an item has two values in APEX. The first value is the session value that we can store in the database (server side), the second value is the value the end user sees on his screen in the browser (client side). On some occasions these values are the same. On others they are not. The difference in value can lead to some confusion, especially for the new APEX developers.

Let’s start with an example so we understand the problem. This is actually based on a real use case. I changed the item names and queries to make it more universal, but the principle remains the same. The developer in question had a page with two Select lists containing the following queries:


SELECT 1 d, 1 r
FROM dual

And

SELECT 1 d, 1 r
FROM DUAL
UNION
SELECT 2 d, 2 r
FROM DUAL

The second select list (called P55_SELECT_LIST_2), also had a default value of 2.

When the user selects a different value on the select list then the second select list had to change values accordingly.

In order to achieve this the developer had created a Dynamic Action. As event he had a change Event of the P55_SELECT_LIST item. The first action was a set value containing the following query (again made simple for the example):

SELECT 1
FROM dual
WHERE  1 = :P55_SELECT_LIST

And page items to submit he had selected the item P55_SELECT_LIST, and affected items he put P55_SELECT_LIST_2

The last action he set was a refresh action of our P55_SELECT_LIST_2 item.

Our page setup now looks like this:

1pagesettup

The developer tried his application, and when he changed the first select list he saw the second select list being refreshed. Yet, instead of displaying the correct value (1), it displayed the default value.

2items

So what went wrong?

Let’s see what exactly happened to figure that out:

  1. The page was loaded. The first select list had nothing selected, the second select list had “2” selected in the browser. Both items were empty in the session3session
  2. The value of the first select list was changed by the end user
  3. This triggered the change event defined in the dynamic action
  4. The first action “Set value” was executed. The value in the browser was changed. The session value of the item P55_SELECT_LIST  was set to one, because it was set with items to submit. An AJAX request was made to set this value. The value item P55_SELECT_LIST_2 remains NULL.4session
  5. The refresh action was executed; an AJAX request was made to get new values for the select list. Since the SELECT_LIST_2 item has no value in the session, the default value is taken, which is 2!                                                                                                                          5network

The solution was simple. Just remove the refresh action. Then the value is set in the browser correctly.  This is handled by APEX with JavaScript/jQuery. The session value of the item will remain NULL until we submit the item to the database by a page submit, a dynamic action, or by changing the value in an AJAX Callback process.

Are You The Smartest Contest (AYTS) 2013

This battle for all the Oracle Partners in Belgium and the Netherlands is organized by Oracle (Yves Van Looy(BE) and Charles Billar(NL)). All employees of these Oracle Partner companies can compete to be the Oracle smartest of their company for that year. Just like last year, the contest was also aiming to provide an in-depth architectural knowledge about seven different technology tracks.
Like previous editions of AYTS, iAdvise joined this year’s  AYTS contest.

ayts
This year, 17 people represented iAdvise, and tried to win the prestigious price: a business travel to the Oracle HQ in San Francisco and Las Vegas.
Six out of seven tracks were covered by the iAdvise team: Security, Data Integration, BI & Applications, HW & Software combination, Service Integration and Database & options.

This year, iAdvise also improved the oraevents site which is used for this contest. Many new features and functionalities were added to improve the user experience of this tool.  The usability and new functionalities were clearly appreciated by all the contenders, all credits goes to the iAdvise apex team who really made this a very nice tool to work with!

Of course we also had a top 3 for iAdvise: Tuur made it as ‘nummero uno’ for the security track, second place went to David for the BI track and on the third place Kristof who also followed the security tracks. Congratulations to all three!

So we had some high scores on different tracks, which ones again proves that iAdvise is very proficient in several technologies.
But even more important was that Tuur got a gigantic high score of 39/40, something that nobody ever achieved before in the AYTS history and it will likely take some time before someone will achieve an equal or higher score.
He is without question the very convincing winner of this edition, and will enjoy his trip to the States! Congratulations Tuur!

Next year will be without question very exciting, since there are a whole lot of new technologies coming up our way and of course iAdvise will be one of the participating companies!

Mobile Business Development seminar in Belgium and The Netherlands(4 and 6 June)

iAdvise organises a free seminar about Mobile Business Development on 4(Antwerp, Belgium) and 6(Breda, The Netherlands) June.

In this seminar we will discuss Mobile Development and Usability(UX – User Experience) in Mobile Development.
But we also compare different solutions, give pros and cons about: APEX Mobile, ADF Mobile and Tabris.

Of course we will also show you best practices, problems and solutions,…

More information(Dutch): http://www.iadvise.eu/seminars

APEX & mobile seminar

On May 12 iAdvise hosted the “APEX and mobile seminar”.
With a turnout of more than 50 customers and interested developers, it indicates that mobile development is a real hype and the demand for mobile applications is rising.

This was the starting point for Stijn who started with an overview of the current situation and evolution of mobile applications.
It became clear that as a developer you can’t ignore mobile devices in the future.
He continued with explaining the challenges in mobile development and which guidelines and strategies could help in choosing the right technology for mobile applications.

Bart took the word and focused on developing web application for mobile devices using APEX.
By combining APEX with JQuery Mobile, HTML5 and CSS3, one could develop a mobile web application rather fast and simple.
Also implementing specific mobile behaviour(eg. “swiping”) and generating extra content on a tablet are rather simple using APEX.

After Bart, Jan showed a demo about the opportunities on offering APEX applications to users as a native app.
This sounds rather strange, but is possible. He had worked out a demo using PhoneGap, a javascript library which create the communication between a web application and the API of the mobile device.
The demo showed how the APEX application from the other demos was wrapped in a native app.
This makes it possible to add a new contact in the contact list of Jan’s IPhone.

After the demos, they gaves us a look at the future of mobile development with APEX, what we could expect in APEX 4.2 and how PhoneGap will take its place in this future.

At the end Johan Byl of Hestia showed us some points which had to be taken in mind when using mobile devices in a company.
This was also very interesting for application developers.
When developing applications, they’re not always keeping in mind that there will be a maintenance phase.
Eg. The support for the application will be allright, but what about the devices itself?
How will we get the application on all the mobile devices of our company?
Can everybody connect to the company network with his or her device?
Or should we prepare a different infrastructure/security?
These and a lot of other questions were explained and answered by Johan and showed us there are a lot of things we have to think over again before putting a mobile application in production.

At the end, a lucky attendee won an IPad3.
For him, iAdvise and regarding the positive feedback for others as well, it was a succesful seminar.

If you missed this seminar, there will another one at the office of our dutch colleagues in Breda, The Netherlands on May 24 2012.

Click here to subscribe.

Oracle Forms Modernization seminar

iAdvise organises a seminar on Forms modernization.

During this seminar we will show you how you can modernize your Oracle Forms applications, give it a rich look and feel, and adopt the latest technologies without throwing away years of investment in Oracle Forms.
We will show you how you can combine the power of an Oracle Forms application with functionality from external application (javabeans, pluggable java components, webservices,…) and how you can give a Forms application a modern “look and feel”.

Also part of this seminar is an overview of the new features in the latest Oracle Forms release(11g)

When: June 1, 2010
Where: iAdvise office, Kontich
Language: Dutch

View invitation

Apex Seminarie: Bouw professionele toepassingen met Oracle APEX (Dutch Only)

iAdvise organiseert naar jaarlijkse gewoonte een (gratis) Seminarie over Oracle Application Express.

De uitnodiging is als volgt:

“Stap voor stap zullen we aantonen hoe je op een snelle en eenvoudige manier veilige en mooi ogende data-driven webtoepassingen bouwt en uitrolt, en dit allemaal zonder zware architectuur en zonder lange leertrajecten. Om dit alles te staven, kan je tijdens het seminarie live de installatie van Oracle Apex volgen, bouwen we een volledig nieuwe applicatie met Apex, en plaatsen we deze webtoepassing ook nog eens in productie.

Na het seminarie beschik je over de nodige informatie om zelf onmiddellijk aan de slag te gaan. ‘Express’ in de productnaam is geen ijdele marketing kreet. Laat je enkele uren op sleeptouw nemen en laat je overtuigen!”

Wanneer: 8 December vanaf 13:30
Waar: kantoren te Kontich

Inschrijven kan via deze weg.

Apex Course – a Bit Different

I’m one of the iAdvise Apex-trainers, a small group of Oracle Consultants that besides their daily job, also give an apex course from time to time.

I’ll get this question every few months, but last time was rather unusual. Would you mind giving this course in Suriname? This country in South America is located over 7000 km from iAdvise. Suriname used to be a colony of The Netherlands, and one of the few places with Dutch as the mother of tongue… which is why they preferred to work with us. It was starting to get colder here, so I didn’t mind a little trip to a tropical country. A few weeks later the deal was made and I was ready to go.

This wasn’t going to be our average 3-day basic course. Going through all this trouble of getting me there, they wanted to know everything about it, so we added 2 days filled with advanced topics.

It was a challenge, because of the diverse group. Some had experience with Apex, others had years of experience with Forms but most of them where access developers. Before I left I had send some training material for them to study so we could move though the basics a bit faster.
For the 2 days of advanced topics most time was spend on my 2 favourite subjects: security and performance. While it’s not that difficult to create an application, it’s very easy to create one full of security flaws. You shouldn’t call yourself an Apex developer if you don’t know all about SSP, sql injection and all of those other treats.
The time that was left, we used to set up their first projects. Designing your application is probably the most important step.

I’m sure they’ll be excellent Apex developers in no time.