{"id":5468,"date":"2023-09-14T09:52:33","date_gmt":"2023-09-14T07:52:33","guid":{"rendered":"https:\/\/gpmfactory.com\/?p=5468"},"modified":"2023-09-14T10:06:42","modified_gmt":"2023-09-14T08:06:42","slug":"initialization-javascript-function-for-popup-item-in-oracle-apex","status":"publish","type":"post","link":"https:\/\/gpmfactory.com\/index.php\/2023\/09\/14\/initialization-javascript-function-for-popup-item-in-oracle-apex\/","title":{"rendered":"Initialization JavaScript Function for popup item in Oracle APEX"},"content":{"rendered":"\n<p>This is a snippet code which generates a code snippet for a popup lov item generates the \u00ab\u00a0Initialization JavaScript Function\u00a0\u00bb attribute for a popup lov item in an Oracle APEX application <\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Installation: <\/h4>\n\n\n\n<p>Download code from <a href=\"https:\/\/github.com\/patrickmonaco\/gpmfactory\">https:\/\/github.com\/patrickmonaco\/gpmfactory<\/a><\/p>\n\n\n\n<p>import and run gen_initjs.sql script Optionnaly: import rest module from ORDS_REST_DEMO_ujs_2023_09_13.sql<\/p>\n\n\n\n<p>This tool relies on <a href=\"https:\/\/docs.oracle.com\/en\/database\/oracle\/application-express\/20.1\/aexjs\/grid.html#columns\" data-type=\"link\" data-id=\"https:\/\/docs.oracle.com\/en\/database\/oracle\/application-express\/20.1\/aexjs\/grid.html#columns\">Oracle JQuery UI dialog features<\/a>.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Usage: <\/h4>\n\n\n\n<p>Either from sql editor as: <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>select gen_initjs(&lt;APPLICATION_ID&gt;,&lt;LOV_NAME&gt;) from dual <\/code><\/pre>\n\n\n\n<p>or by calling the rest module as:&nbsp;<\/p>\n\n\n\n<p><a href=\"https:\/\/xxxxxxxx.oraclecloudapps.com\/ords\/demo\/ujs\/lov\/\">https:\/\/xxxxxxxx.oraclecloudapps.com\/ords\/demo\/ujs\/lov\/<\/a>&lt;APPLICATION_ID>\/&lt;LOV_NAME><br><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Samples<\/h4>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><img loading=\"lazy\" decoding=\"async\" width=\"299\" height=\"251\" src=\"https:\/\/gpmfactory.com\/wp-content\/uploads\/2023\/09\/image-7-1024x860.png\" alt=\"\"><br><br>Without initialization code<\/td><td><img loading=\"lazy\" decoding=\"async\" width=\"298\" height=\"251\" src=\"https:\/\/gpmfactory.com\/wp-content\/uploads\/2023\/09\/image-8-1024x866.png\" alt=\"\"><br><br>With initialization code<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Generated JS code<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function(options) {\n     options.defaultGridOptions = {\n         columns: &#91;{\n             TABLE_NAME: {\n                     heading: \"Table or view Name\",\n                     width: 300,\n                     alignment: \"start\",\n                     headingAlignment: \"start\",\n                     sortIndex: 1,\n                     sortDirection: \"desc\",\n                     canSort: true,\n                     noStretch: true\n                     },\n             T: {\n                     heading: \"Type\",\n                     width: 100,\n                     alignment: \"center\",\n                     headingAlignment: \"start\",\n                     canSort: true,\n                     noStretch: true\n                     }\n         }]\n     };\nreturn options;\n}<\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is a snippet code which generates a code snippet for a popup lov item generates the \u00ab\u00a0Initialization JavaScript Function\u00a0\u00bb attribute for a popup&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"ppma_author":[150],"class_list":["post-5468","post","type-post","status-publish","format-standard","hentry","category-non-classe"],"authors":[{"term_id":150,"user_id":1,"is_guest":0,"slug":"admin8700","display_name":"Patrick","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/209d5ed69b74d288390621ab4c1d3773?s=96&d=mm&r=g","0":null,"1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":""}],"_links":{"self":[{"href":"https:\/\/gpmfactory.com\/index.php\/wp-json\/wp\/v2\/posts\/5468","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gpmfactory.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gpmfactory.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gpmfactory.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gpmfactory.com\/index.php\/wp-json\/wp\/v2\/comments?post=5468"}],"version-history":[{"count":9,"href":"https:\/\/gpmfactory.com\/index.php\/wp-json\/wp\/v2\/posts\/5468\/revisions"}],"predecessor-version":[{"id":5481,"href":"https:\/\/gpmfactory.com\/index.php\/wp-json\/wp\/v2\/posts\/5468\/revisions\/5481"}],"wp:attachment":[{"href":"https:\/\/gpmfactory.com\/index.php\/wp-json\/wp\/v2\/media?parent=5468"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gpmfactory.com\/index.php\/wp-json\/wp\/v2\/categories?post=5468"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gpmfactory.com\/index.php\/wp-json\/wp\/v2\/tags?post=5468"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/gpmfactory.com\/index.php\/wp-json\/wp\/v2\/ppma_author?post=5468"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}