Skip to main content


Showing posts from November, 2023

Global page in APEX (page zero)

T There are plenty of things you can do on global page. Not everything is a great idea. Typical usage would be: Regions used on multiple pages Page items used through multiple pages JavaScript and CSS styles Dynamic actions Footer with some extra info Regions Typically it is some sort of navigations or filtering and that is perfectly fine. You should be aware that you can also create same region with source as "Function Body returning SQL Query" or by using "Dynamic Content" region (and ofc. having content in package, not on page). For complex components you could also create your own plugin. This is useful to know specially if you want the same content on different places on page. JavaScript and CSS styles It might be ok to have scripts and styles on global page, but unless you need them just on specific pages (or you want to apply server side conditions to them), I would rather store them in application files. Or even better in worksp

Remove active tabs on demand

I I wanted to keep selected tabs saved for the user, but reset them on some event. Typical use case is that user open page for specific record, the page has multiple tabs and he switch to not default tab. Here starts the issue. When he switch to a different record, it is better to start on default tab, but if he submits the page, it is better to preserve selected tabs. I have figured out that it is stored in session storage and I have come up with this solution. When the page is loaded with clear flag, then I also remove all tabs on page, otherwise I don't touch it. const reset_tabs = function() { if ('&clear=')) { $('div.t-TabsRegion.js-useLocalStorage').each(function() { var region_id = $(this).attr('id'); var key = 'ORA_WWV_apex.apexTabs.' + apex.env.APP_ID + '.' + apex.env.APP_PAGE_ID + '.' + region_id + '.activeTab'; var v

APEX & multicolumn navigation (custom mega menu)

W When the mega menu came out, I was very pleased. Then I tried to use it and quickly abandon it. Now I wanted to cleanup my menus so I build my own. What I wanted was to have the several multicolumn menus, not just one. With icons, badges, different levels. I also wanted to manage where exactly it will split to the new column... And without any JavaScript. So I can create something like this: Check the article about custom navigation for some basics. How I achieved this? changed template for navigation created view to feed the template add a column value to the navigation table The template is basically just concatenating the arguments from the list, something like: #A08#<li #A10#>#A01##A02##A03##A04##A05##A06##A07#</li>#A09# The view (source for the list is returning these #A0?# fields: SELECT n.lvl, n.attribute01, -- content <li>...</li> n.attribute02, n.attribute03, n.attribute04, n.attribute0