Posts

Switch Application from Page Designer

Image
Intro When using APEX Page designer, especially when I want to switch among different applications, I have to switch to other pages (select another app and certain page) and then back to page designer. What if I want to concentrate on page designer? Inspired by Oracle APEX Builder Plugin , I build my first APEX builder plugin: Switch Application. Demo Features Switch to another application page from page designer Application and Page status listed in select options Theme friendly by using APEX builder theme Shortcuts Support How it works Let's go through the pic above: user script embed in browser extension (here is Tempermonkey for Chrome) adds one button "app switch" in the toolbar area in page designer after inspecting url containing "/f?p=4000:4500:" which means current page is APEX page designer. Clicking button "app swicth" will open a dialog  This dialog will invoke a page from another APEX application page pre-defined

Work with Syntax Highlight

Image
I'd like to share my work with syntax highlight in APEX. Demo Please check demo from  apex.oracle.com . Sorry that currently there is no source code shared. But if you check the demo, there are detailed steps about how to integrate these libs. Review  Here is my rough review for these highlight libs, just in my opinion and based on my work with them in APEX. Welcome for any advises or comments. There are four JS libs integrated, and reviewed. Click the link below to check the corresponding demo page. CodeMirror SyntaxHighlighter PrismJS highlight.js Have a quick check from the pic below. CodeMirror SyntaxHighlighter PrismJS highlight.js Special Thanks to Markdown APEX Plugin  The tool makes my demo more like a wiki or blog post for text content. (If you had ever used powerful markdown in specific application, like Atlassian Confluence, you would definitely prefer to use them for text-like knowledge sharing rather than r

Recover a deleted APEX page or application - from Nick Buytaert

Today, Nick Buytaert's post saved my life.  I deleted an app incautiously when I was talking via cellphone and planed to save the app definition. https://apexplained.wordpress.com/2012/07/12/recover-a-deleted-apex-page-or-application Thanks Nick. Thanks for APEX with the fantastic Oracle flashback feature. Lessons learnt: never touch you App when you are on the phone... Update 20160622: I just had a interested thought, is that possible to recover the application created by other uses which just have been deleted???

Use Plugin Code Editor - Part 4/4: Retrospect

I this post, I will retrospect my work on this and share lessons learnt. Please click TOC link on right side to jump to specific section or See more Use Plugin Code Editor - Part 1/4: Demo Use Plugin Code Editor - Part 2/4: Intro Use Plugin Code Editor - Part 3/4: Custom Use Plugin Code Editor - Part 4/4: Retrospect Know Issues button title, there are 7 js errors  for each plugin in console when rendering native page, Code Editor in native demo page sometimes occupies the whole page width sql syntax check, in the pages using item binding syntax validation, can not return detailed error info like ORA-xxx message, in the pages using item binding syntax validation, can just go to inline with field or in notification area. Query Builder, can be enabled but does not work Testing No tests no bugs. If you find, please feel free to leave your comments here or in github repo . Technical Support Now Oracle APEX provides official release for these two plugins with APEX it

Use Plugin Code Editor - Part 3/4: Custom

If you are visiting this page, I suppose you have been encountering these issues I mentioned in my previous post. I am joking. May be or may be not. That's OK. In this post, I will go through these issues case by case,  illustrate what I did to fix or provide a workaround and then explain how I customize Native, Hybrid and Editor to Textarea demo pages. Click the link in TOC  to jump to the section you are interested in or See more: Use Plugin Code Editor - Part 1/4: Demo Use Plugin Code Editor - Part 2/4: Intro Use Plugin Code Editor - Part 3/4: Custom Use Plugin Code Editor - Part 4/4: Retrospect Fix Issues Button Title If you use Code Editor plugin directly, you will get lots of errors  logged in console as below for button title/name translation. And from page, you will find these button title letters are upper case. Format(CODE_EDITOR.SHORTCUT_TITLE): too many arguments. Expecting 0, got 2 In order to fix this issue or provide a workaround, I had to u

Use Plugin Code Editor - Part 2/4: Intro

I suppose you have viewed demo page and start to import one plugin in your own application.  And you might want to know more about how to use these two plugins and go further to the detail. Then this post is going to introduce the basic interfaces for Code Editor plugin, including both item and region types. Click the link in TOC  to jump to the section you are interested in or See more: Use Plugin Code Editor - Part 1/4: Demo Use Plugin Code Editor - Part 2/4: Intro Use Plugin Code Editor - Part 3/4: Custom Use Plugin Code Editor - Part 4/4: Retrospect What's Code Editor? Code Editor is the plugin for Oracle APEX internal applications that wraps CodeMirror, enables SQL and PL/SQL syntax validation, integrates to APEX item component and provides region type variation named CLOB Code Editor. See Also: APEX-5.1 Doc: 7.3 Understanding Page Designer UI Elements If you check the annotation in file widget.codeEditor.js, you will find: /*! codeEditor - a jQuery UI

Use Plugin Code Editor - Part 1/4: Demo

Image
If you want to use Code Editor plugin in Oracle APEX internal applications, you need 6 steps below to make it happen from scratch. get an application with f4000 theme (see  Use Theme: APEX 5.0 ) import f4000 to your APEX and export plugin "Code Editor" create test pages using Code Editor detect and add missed CSS and JavaScript files grant corresponding privilege to application parsing schema check issues and fix rock and roll Note: Here using internal Theme APEX5.0 is not mandatory but it's helpful from scratch. Now, you could jump over these steps,  import my demo applications and start you work with Code Editor. Demo If you find page loading without GIFs, please click HD GIFs link below (Due to the GIF size, it will take a while to load.): Native Hybrid Migrated Native Main features: theme APEX 5.0 supported all item type Code Editor plugins with 9 supported code modes with 11 items based on supported modes (PL/SQL Expression and Fun

RDS Customizable for APEX 5.1

Image
Background Is there a way to set a parent for regions that allocated or assigned to Region Display Selector, especially when there are multiple RDSes in one page? This is the first question when I used RDS in APEX 5.1. I think this is a common question after you find there is a Yes/No option for RDS without a parent node. Then I posted this question to Steven's Blog . er, Yes, I did. It's an old post but Steven still replied and re-posted my question to his twitter after checking with his team. How professional! And then I got the answer is no. No default or original way but the workaround with template or region type. Then I found the plugin RDS Customizable  (link is original design with version 1.1 ). It's for APEX 4+. I used it on APEX 5.1 and found there are some slight bugs. Now I renew it to work gracefully with 5.1 and update source code to github folder . region_type_plugin_com_blogspot_apexnotes_apex_rds_customizable_V1.2.sql : plugin v1.2 source code

Use Theme: APEX 5.0

Image
Normally, you need 5 steps to get a Theme workable from APEX internal application, such as f4000, f4550. get an empty application from apex 3.x and import to apex 5.1 import f4000 to apex 5.1 (according to Martin's post  How do they do it?  ) and export its theme import theme APEX 5.0 exported from f4000 to the empty app add missing CSS and js files in the empty app Theme Level (detect them according to my previous post Note for APEX 5.1 UI, Theme, Templates and Substitution Strings  ) test and verify Now, probably you just need 1 or 2 steps to start your work with Oracle APEX internal themes depending on your needs. I have updated all related files into github folder . Here is the list: f300.sql : the empty application from apex 3 f4000 Theme APEX 5.0 DEMO.sql : home page demo with theme from f4000 (APEX 5.1.0) f4000_theme.sql : theme APEX 5.0 exported from f4000 f4550 Theme APEX 5.0 DEMO.sql : login page demo with theme from f4550 (APEX 5.1.0) f4550_theme.sql :

Region and Region IDs

Image
What's Region and Region IDs A region is a plug or an area on a page using DIV tags as a container of other page components. There are many IDs for a region in different phases. Here below is a RDS(Region Display Selector) region with the Standard template. I would like to define them as following: -- ID is the unique ID in database referring to section 1 in the picture. -- So the ID of Region Display Selector in page 88 is 1421721788170690390. ID := to_char(apex_application_page_regions.region_id); -- cID is a fixed class for substitution string #REGION_CSS_CLASSES# in HTML div tag. -- Here in the section 3, the value of cID is lto1421721788170690390_0. cID := 'lto' || ID || '_0'; -- rID is a fixed value for substitution string #REGION_ID# in HTML div tag. -- rID here is R1421721788170690390. rID := #REGION_ID# := 'R' || ID; -- sID is generated region ID in HTML div tag. It will be either the region's Static ID if defined, -- or if not w