Posts

Showing posts from May, 2017

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

Another Way to Change the definition of the default Theme42 template

As default, the templates of newly created desktop application which subscribes default Theme42 will be locked.  If we open a certain template from shared components \ templates, we will find the description below from subscription section. This template is subscribed to the corresponding template in the master theme. To modify this template, edit the master template and then refresh the theme. Alternatively you can create a local, unsubscribed copy of this template. Unsubscribed templates are editable and will not get overwritten by a theme refresh. So there are two recommended ways to modify a template definition. However, there is another scenario. I want to change the definition of the Standard region template frequently but I don't want to copy out, rename and reassign previous regions to the new template. Here is a quick solution for this case. Just execute sql below to unlock the subscription. -- give correct application id in line 3 update apex_050100.wwv_flow_pag

Locate Substitution String in clob Template column using regexp

Last time I wanted to locate the substitution strings in clob template column. I suppose there is no handy code for this. After searching asktom, I got some idea from this anwser  and I composed three functions to get what I wanted. Today I updated them and it's available as a package in my github folder:  UTL_APEX_SUBSTITUTIONSTR.sql . There are three functions in this package. -------------------------------------------------------------------------------------- -- locate all substitution strings from template HTML source -- input: p_clob, HTML source of template -- output: return all substitution string in HTML source function locate_all_substitutionstr(p_clob in clob) return t_locate_tab pipelined; -------------------------------------------------------------------------------------- -- locate specified substitution string or keywords in attribute peer from template HTML source -- (e.g. id="#REGION_STATIC_ID#_heading", onclick="htmldb_ToggleWith

Note for APEX 5.1 UI, Theme, Templates and Substitution Strings

Image
From application shared components, User Interface section, we can get the hierarchy diagram as below.  Source SVG There are three levels, User Interface, Theme, and Template. UI attributes specify user interface options, including application level logo, favicon, user interface detection (especially application level CSS files for screen auto-detection ) and current theme Theme as a collection of templates, include theme level JavaScript, CSS, icons, image, skin style, and other static files serving current theme, component default template assignment, region default template assignment, and global template options (references between CSS classes and global style options, i.e. Button type option: tiny, Small or large) Template:  Major template types include page, region, report, button, breadcrumb, list and label (with yellow background color) Theme42 also includes templates for Legacy Calendar and Popup LOV as default but I don't draw in the diagram Note:  Na