Skip to Main Content
Feature Request FR-2069
Product Area Application Builder
Status CLOSED

24 Voters

Allow javascript, css, pre-rendering processes, submit processes and branches on global page 0

gabriel.diaz.arias Public
· Oct 14 2021

Idea Summary
Allow javascript, css, pre-rendering processes, submit processes and branches on global page 0. Now those options are disabled and would be very useful to be able to specify global javascript, css or processes for all pages. If we can define regions and buttons for all pages, why not processes javascript and css? This limits quite a lot the possibilites of the global page 0.

There is also a bug with this, because the copy feature of page designer allows you to copy processes to page 0, but you cannot see them.

Use Case
Allow better reusability between common components that must be placed in all pages.

Preferred Solution (Optional)
Activate missing options on global page that are available on normal pages.

We reviewed this idea carefully, and while it was interesting, we concluded that it is unlikely to make its way into APEX in the foreseeable future.

Known Duplicates

Known duplicates

FR-3100
FR-3100 Application level branching

Comments

Comments

  • john.snyders APEX Team OP 4.5 years ago

    Not sure about the others but I have often wanted to put JavaScript or CSS on the global page. Then again I know that what I should really be doing is putting the code into application or workspace files.

  • gabriel.diaz.arias OP 4.5 years ago

    Yeah, I understand that the best approach is using files at template, app or theme level and global plsql code as application processes but for just debugging or tests is useful. Now we have a mix of places where you can put common code or resources for your pages and is a bit confusing all together:

    • Regions, items and buttons → page 0
    • Dynamic actions → page 0
    • Processes → Application processes in shared components.
    • Branches → You cannot define a shared app branch, you would have to write a custom redirect as an application process.
    • CSS → At template, theme or app level, as you cannot define css files at page 0 level. The best way here would be just defining a specific template with specific css for certain pages.
    • JS → Similar to css, at app or theme level but not at page 0 level (as files).

    Maybe the thing is that just using page 0 is a bad programming practice? But then you don't have any way of defining global dynamic actions or regions and items. Now it's difficult to have a centered place to view all common resources for all pages.

    Current limitations:

    • Impossible to define a global button in a global region with an associated process in page 0. You could do it by conditioning the request in an application process. Or with a dynamic action in page 0 with plsql process action.
  • john.snyders APEX Team OP 4.4 years ago

    The point about debugging/tests (i.e. prototyping) is a good one. Also consistency with the other cases that work on page 0. Related should be a way to refactor your code so once you have it working you can click to refactor and APEX moves it to a file and replaces the code with a call to it. Could apply for JavaScript or PL/SQL.

  • ino.laurensse OP 4.4 years ago

    Editing static files in 21.2 now makes it a lot easier to debug and quickly change JS and CSS files.

    However, JS, CSS, branches and processes on page 0, if implemented like the rest on page 0, makes it possible to include it conditionally (e.g. only on certain pages).

  • jortega OP 4.4 years ago

    APEX is great to create individual pages, but when you have a lot of pages and want to run some initial code in all of them, or a lot of applications that should behave similarly, there should be a way to do it, in page 0 or wherever.