Browsing "Older Posts"

Set APEX application name for Dev, Test and Prod environment in the same database

Von Tobias Arnhold → 7.18.2018
In case you have a small application where development, test and maybe also production environment are on the same database and your applications in this environment distinguish only by the application IDs. To setup a custom application name based on the ID you could do like this:


We assume our application name is "Training room app" defined in the "Shared Components" > "User Interface Attributes"


To differentiate the environments I add a dynamic action "Page Load" on Page 0.
This dynamic action is executing custom Javascript code:

if ('&APP_ID.' == '200') {
  $('.t-Header-logo').find('span').html('Training room app - <b style="color:#008A34">Test Environment</b>');
}
else if ('&APP_ID.' == '300') {
  $('.t-Header-logo').find('span').html('Training room app - <b style="color:#9366a5">Development Environment</b>');
}


The code is changing the name of the logo area.

 

Copy and Paste to clipboard

Von Tobias Arnhold → 7.17.2018
Well I had the requirement to copy the content of a textarea into the clipboard. There are two ways to do that:

1. Build a dynamic action with custom Javascript code:
Copy Text to Clipboard

Code example - with dynamic action on "Click" and "Execute Javascript Code":
/* Select the text field */
$('#P1_APEX_ITEM').select();

/* Copy the text inside the text field */
document.execCommand("copy");



2. Use an APEX plugin:
Copy to Clipboard (v1.1) - build by Dick Dral



Icons made by Vitaly Gorbachev from www.flaticon.com is licensed by CC 3.0 BY