Blog PostsStatistics Feedback About Login  


Go

Blog Selection


Historical gallery of Teradata machines
4
Wei Zheng 03-AUG-2010 13:50


Source: http://archive.computerhistory.org/resources/still-image/Teradata/
Show Comments (0)

APEX 4.0 - Do you want to know more?
4
Anthony Rayner 03-AUG-2010 13:32

Do you want to ask the Vice President of Database Tools at Oracle and original developer of Application Express a question about Oracle Application Express 4.0?

Mike Hichwa is going to be interviewed by Oracle Profit Magazine on APEX, so if you have something you want to ask, questions are being collected for consideration via Twitter. Tweet your questions to @OracleProfit, with the hash tag #askprofit. Selected submissions will receive a 1GB flash drive — and be printed in the November issue of Profit Magazine.
Show Comments (0)

Römische Zahlen mit der Datenbank ...
4
Carston Czarski 03-AUG-2010 10:25

English title: Roman Numbers with TO_CHAR

Vor kurzem ist mir nochmals was "kurioses" aufgefallen. Wusstet Ihr schon, dass Ihr römische Zahlen mit der Datenbank generieren könnt ...?
Shortly I found another nice feature of the Oracle database. You can generate roman numbers with just the TO_CHAR function.
SQL> select to_char(1997, 'RN') roemisch from dual;

ROEMISCH
---------------
       MCMXCVII

1 Zeile wurde ausgewählt.
Es funktioniert leider nur mit Zahlen zwischen 1 und 3999 - also für Jahres- oder Monatszahlen. Aber für was anderes braucht man sie ja auch normalerweise nicht ...
It only works for numbers between 1 and 3999 - so its usable for years and months ... but this should be sufficient for most cases.
SQL> select to_char(4001, 'RN')  roemisch from dual;

ROEMISCH
---------------
###############

1 Zeile wurde ausgewählt.

Show Comments (0)

More on Modal Pop Ups
4
Håvard Kristiansen 02-AUG-2010 23:46

I previously wrote a post on how to use the new APEX 4.0 native features to conjure modal inline dialogs. It was followed by a brief (very brief on my part, to say the least) discussion on how to achieve the same functionality for a create button. In this post I will elaborate a bit on how to do exactly that.
The solution sketched out below definitely has potential for improvement, but can serve as a diving board for the interested.

Demo Application
If you are curious, or just down right bored with long posts, then I have a running copy of the demo application here: http://apex.oracle.com/pls/apex/f?p=45420:3. The demo application can be downloaded here: http://apex.oracle.com/pls/apex/f?p=45410:DOWNLOAD. To keep the examples as clean as possible, I have created a new page with the Create-button, so you have both alternatives available.

The Quick Solution
And what is wrong with a quick solution? Personally I feel the we programmers (me definitely included) are very good at complicating things. The rest of this post is dedicated to a more generic approach, but in my original comment I suggested this:
  • Create an anchor-tag (link) anywhere on the page
  • Set href attribute to the URL of your edit form page, let primary key item values remain blank (but be sure to pass them)
  • Set the id attribute to callModalDialog
In my sample application that would be: <a id="callModalDialog" href="f?p=&APP_ID.:4:&SESSION.::NO::P4_EMPNO:">Create Employee</a>.

This would work just like the edit links in my original example, but ready to insert a new employee. Like magic :-)

The Elaborate Solution
The elaborate solution uses more Dynamic Actions, a bit more javascripting and a couple of dirty tricks to accomplish the same as the quick solution. The goal is to make a normal create button to have the same behavior with inline modal dialog, as the edit links does.

The explanation below is based on the original modal dialog page in my sample application. To follow the example and repeat the steps, you need to start off with a copy of page 2 in my sample application.

To follow the example, start by creating a region button with the following values (mostly just accept defaults):
Button name: CREATE

The button should take you to the create/edit page, but without the fancy modal dialog.

A Note for Later
If you name your button to something else than Create (or Text Label/ALT-property for the page button in APEX), you must adjust the following JQuery selectors accordingly for it to work. You may also expect some issues when using an image button (the javascript onclick function extraction may fail).

Removing the Original onclick-Event
APEX uses a javascript function to redirect the browser (also when using anchor button template). There are two things that needs to be done when the page loads; store the original create link, and remove the original button onclick event. I use JQuery and javascript native regexp capabilities to achieve this.

To create a Dynamic Action which fires when the page has finished loading, do the following:
Create a new Dynamic Action at the page level

Choose Advanced

Give it a sensible name ("On Page Load")

Choose Event Page Load

Choose Action Execute Javascript Code, and paste in the javascript code below:

/* get original onclick event */
var origAction = $('button[value=Create]').attr('onclick').toString();
/* get link from original onclick event using regular expression */
var link = origAction.match(/(redirect\((\'|\"))([^\'\)|\"\)]*)/)[3];
/* Remove original onclick event */
$('button[value=Create]').removeAttr('onclick');
/* store link as title attribute of button */
$('button[value=Create]').attr('title', link);
Looks a bit Greek? Even if I have actually included comments? If you are not familiar with JQuery, it definitely will. If you are not familiar with regular expressions, even more so. If you are not familiar with javascript at all, you are allowed to test the code, but not use it in production unless you have truly understood what it means :-) There are very good sources on the web for all the knowledge required.

And why, oh, why store the link value in an element attribute definitely not meant to hold a link value!?! It will overwrite any existing title-values, and makes both setting and retrieving code hard to read. On the other hand, it will keep the value with it's element, and support more than one create button on any given page. There are more than one alternate way of doing this, but hey, feel free to bring suggestions :-)

Anyway, click Create and you are done.

If you run your page now, clicking the Create button will not do anything (the onclick event was removed, but not replaced).

That was the hard part!

Calling the Dialog
The edit dialog Dynamic Action is already in place, all that has to be done is to adapt the existing Dynamic Action to include the new create button.
Edit the Modal Dialog Dynamic Action
Include: button[value=Create] as the JQuery Selector expression (total expression will now be: a[id^=callModalDialog],button[value=Create])

Edit the True Action Javascript Expression to be:
/* prevent default behaviour on click */
var e = this.browserEvent;
e.preventDefault();
/* Find page link */
var link;
if (this.triggeringElement.tagName=='A') {
link = this.triggeringElement.href;
} else if (this.triggeringElement.tagName=='BUTTON') {
link = this.triggeringElement.title;
}
/* Trigger JQuery UI dialog */
var horizontalPadding = 30;
var verticalPadding = 30;
$('<iframe id="modalDialog" src="' + link + '" />').dialog({
title: "Edit Employee",
autoOpen: true,
width: 700,
height: 300,
modal: true,
close: function(event, ui) {apex.event.trigger('#P3_AFTER_MODAL','select',''); $(this).remove();},
overlay: {
opacity: 0.5,
background: "black"}
}).width(700 - horizontalPadding).height(300 - verticalPadding);
return false;
The difference from the original javascript code is the extra bit extracting the link to use, which differs from a normal anchor element, and our button with the special id attribute.
Click Apply and you are done.

The Rest?
Is the same as detailed in my last post. I have updated the dialog page in the sample application to include Create and Delete buttons, but that is it.

Quick or Slow?
Quick sound promising! Simplicity rules! There are some draw-backs, of course. Like where to put the link to find it later (a Display Only item properly named perhaps?)? Like the need to style a link as a button? Like the need to place the link in a region template position? It all adds up.

The generic (more elaborate) approach will work with any create button (well, not with the anchor template). Drop the Dynamic Actions onto the page, and it will work. On the other hand, the generic approach involves more code, more code is harder to maintain and more prone to breaking. Generic code requires a delicate hand (ie takes time), and is generally harder to read than code created for a specific task. This is all in the eye of the beholder, but on more than one occasion I have had the pleasure of revisiting my own old code and though: I didn't need to do that... I digress, I know. Besides, that is too great a topic to just be delegated to a digression :-)

So, should you use the quick link (pun intended :-))? My answer (being a consultant) is a definitive: It depends!

Enjoy :-)
Show Comments (0)

Known Problems in Version 4.0
4
Iloon Ellen 30-JUL-2010 04:19
Show Comments (0)

Oracle Apex 4.0 Training: New Features
4
Denes Kubicek 29-JUL-2010 17:51

Because of overlapping with the OOW agenda, we decided to reschedule our training to 4th and 5th of October 2010.

Wir (Dietmar und ich) haben den Termin für unsere Schulung um zwei Wochen verschoben. Die Schulung findet nun am 04.10 bzw. 05.10.2010. Der Grund war die Überschneidung mit dem OOW Termin. In diesem Training möchten wir folgende Punkte ansprechen:

- Überblick der neuen Features, was ist alles neu
- Der Umgang mit Websheets, wie kann man die neuen Wiki-ähnliche Funktionalitäten sinnvoll nutzen
- Dynamic Actions, wie man AJAX Funktionalität deklarativ (ohne zu programmieren) in seinen Applikationen einsetzt
- Erweiterbarkeit von APEX über Plug-Ins, benutzerdefinierten Elementtypen und Regionen
- Verbesserungen der Tabular Forms, insbesondere die Validierungen und die Unterstützung zusätzlicher Elementtypen
- Die Verwendung der neuen Elementtypen
- Verbesserungen der mächtigen interaktiven Berichte mit komplexeren Filtern, Gruppierungen und das Abonnement von Benachrichtigungen
- Team Development, das Projekt direkt mit APEX managen
- Verbesserungen im Application Builder
- Neue Möglichkeiten der Chart-Engine sowie neue Diagrammtypen (GANTT und Kartendarstellungen)
- Web Services, deklarative Unterstützung von REST-Webservices
- Administration, Vereinfachungen in der Administration sowie im Deployment von Applikationen
- Umgang mit dem neuen APEX Listener

Alle Details findet ihr hier:

http://www.opal-consulting.de


Show Comments (0)

Upcoming Conferences/Events 2010
4
Peter Raganitsch 27-JUL-2010 14:02

There is a lot going on this year, many interesting things happen. Conferences, Events, Workshops, …. Just a couple of months ago i founded my company click-click IT Solutions, which is an old dream come true. Besides building up my company, earning money and growing my network there are some interesting conferences in good old Europe i’m going
Show Comments (0)

RUSZA Polskie Forum Użytkowników Oracle APEX
4
Apex dbe pl 26-JUL-2010 16:27

Z małą obsuwą wreszcie rusza Polskie Forum Oracle APEX.



Forum w pełni zrobione jest w APEX 4.0, póki co stoi na Oracle XE. Jako, że było mało czasu na testowanie to proszę o wyrozumiałość, wszelkie problemy prosimy zgłaszać poprzez przycisk Feedback.

Bezpośredni link do forum:
http://forumapex.dbe.pl/

Show Comments (0)

Skróty klawiaturowe do APEX 4.0
4
Apex dbe pl 23-JUL-2010 18:39

Skróty klawiaturowe w Oracle APEX Builder ?? Czemu nie : )

Aby zaimplentować podstawowe skróty klawiaturowe potrzebujemy Dodatku Greasemonkey do ściągnięcia tutaj - jest to dodatek do Firefoxa (podobno jest też do Google Chrome), który interpretuje odpowiednie skrypty. Czyli po zainstalowaniu Greasemonkey potrzebujemy jeszcze do niego "nabój", czyli odpowiedni skrypt który będzie działał na stronach APEX Buildera, do ściągnięcia tutaj. Wszystko instaluje się gładko i bez problemu (przynajmniej ja tak miałem).



Po restarcie Firefoxa możemy przejść do Apex Buildera i spróbować jak to działa. Do dyzpozycji mamy pięć skrótów klawiaturowych.

* F8 - "Run page"
* F9 - "Apply Changes"
* Alt + F9 - Kliknięcie w pomrańczowy (aktualny) przycisk
* Alt + PageUp - Kliknięcie w przycisk "<" lub "< Previous"
* Alt + PageDown - Kliknięcie w przycisk ">" lub "Next >"

Podoba się ??

Show Comments (0)

 1 2 3 4 5 6 7 8 9 10 








 
 
Blog Roll
  • APEXtras
  • Ahcene Bourouis
  • Andy Tulley
  • Anja Hildebrandt
  • Anthony Rayner
  • Anton Nielsen
  • Apex Blog
  • Apex dbe pl
  • Ben Burrell (Munky)
  • Bernard Fischer-Wasels
  • Bradley Brown
  • Carl Backstrom
  • Carsten Cerny
  • Carston Czarski
  • Christian Rokitta
  • Christopher Beck
  • Dan Durbaca
  • Dan Mcghan
  • David Njoku
  • David Peake
  • Denes Kubicek
  • Dietmar Aust
  • Dimitri Gielis
  • Dirk McComsey
  • Doug Gault
  • Douwe Pieter van den Bos
  • Duncan Mein
  • E-Dba
  • Eric Boissonneault
  • Evgeny Timoshinin
  • German APEX Community
  • Håvard Kristiansen
  • IAdvise
  • Ilmar Kerm
  • Iloon Ellen
  • Insum
  • Jason Aughenbaugh
  • Jason M.
  • Jason Straub
  • Jean-Phillipe Pinte
  • Jeff Holoman
  • Jeffrey Kemp
  • Joel Kallman
  • John Scott
  • Jon Trostheim
  • Jornica
  • João Oliveira
  • Kristian Jones
  • Learco Brizzi
  • Louis-Guillaume Carrier-Bédard
  • Marc Sewtz
  • Mark Lancaster
  • Martin B. Nielsen
  • Martin Giffy D'Souza
  • Matt Ball
  • Matt Nolan
  • Niels de Bruijn
  • Niels de Bruijn
  • Noel Portugal
  • Oracle Nerd
  • Oracle Quirks
  • Oradude
  • PL/GMaps
  • Patrick Wolf
  • Paul Brookes
  • Paulo Vale
  • Pawel Barut
  • Peter De Boer
  • Peter Manchev
  • Peter Raganitsch
  • Przemek Staniszewski
  • RCI
  • Roel Hartman
  • Rutger de Ruiter
  • Sara Blair
  • Sathish Kumar
  • Scott Spendolini
  • Scott Wesley
  • Stew Stryker
  • Sujay Dutta
  • Sumnertech Blog
  • Tobias Arnhold
  • Tyler Muth
  • Unknown APEX
  • Wei Zheng

    © Created and Hosted by Apex Evangelists