Showing posts with label Mani. Show all posts
Showing posts with label Mani. Show all posts

Wednesday, April 21, 2010

To put the Company logo in each APEX page



  • Go to Shared Components then click the images link and upload the image to application.
  • Click the Definition write the image name to logo text field as #WORKSPACE_IMAGES#company_logo.gif
  • Go to Page Template and add the LOGO prefix at table

Dynamically Generate the Checksum id to solve the apex vulnerability problem

Ajax(Application Process) used call the Oracle Query of APEX_ITEM.MD5_CHECKSUM
  • Java method of Math.random used to get Random no
  • Random no used to get the Attribute value from Select list
Example : thisObj = objs[rand_no];
if(thisObj){
checksumId=thisObj.getAttribute('value');
return checksumId;

--- Apex Generate the checksum id per day only one time, I have customized and generated the checksum id per each page refresh.

Here show the checksum id screenshot,




















Create Customize POPUP LOV for APEX



  • Javascript Used to Get the Tabular Form Id
Example : var eleTables = document.getElementsByTagName("table");
for (var i=1;i
var tId = eleTables[i].id;
if(tId.substring(0,7)!=''){
if(tId.substring(0,7)=='report_'){
var originalId = i;
var tableIds = eleTables[i].id;
tableId = tableIds;
return tableId;
} } }

  • Create the POPUP Image on tabular column
Example : var link = document.createElement('a');
var image = document.createElement('img');
var span = document.createElement('span');
link.setAttribute('href','javascript:genList0_f16_0("'+a1+'","'+filters+'")');
link.className="dark";
image.setAttribute('src','/i/list_gray.gif');
  • Customize the Window open
Examlpe : w = open("wwv_flow_utilities.gen_popup_list" +
"?p_filter=" +
"&p_name=" + escape(filters) + "&p_element_index=" + escape (a1) +
"&p_form_index=" + escape('0') + "&p_max_elements=" + escape('') +
"&p_escape_html=" + escape('') + "&p_ok_to_query=" + escape('YES') +
"&p_flow_id=" + escape(appId) + "&p_page_id=" + escape(pageId) +

"&p_session_id=" + escape(l_field) + "&p_eval_value=" + escape('') +
"&p_translation=" + escape('NO') + "&p_lov_checksum=Dynamicchecksum
"winLov", "Scrollbars=1,resizable=1,width=400,height=450");
if (w.opener == null) w.opener = self; w.focus();

Based on Custom POPUP(Head No Column) append the value to Select list(Product) and read only column(Description and Drawing No)
Here Return value(M2595) also customized then return to Tabular Column.
















Monday, April 19, 2010

Apex used to call the Oracle JOB scheduler and Java



  • Create the html link on apex
  • Ajax(Application Process) used to call the DBMS_SCHEDULER then generate the job name
  • Ajax(Application Process) used to call the DBMS_SCHEDULER .CREATE_JOB then Execute the job name
Example :
select DBMS_SCHEDULER.GENERATE_JOB_NAME('hariharhomes') into jobnames from dual;
dbms_scheduler.create_job( job_name=>jobnames, job_type=>'executable',
job_action=>'/u01/app/oracle/product/10.2.0/ias/Apache/Apache/images/mani.sh', enabled=>TRUE );

Append the Data Base value to Tabular Form Select List


  • Ajax(Application Process) used to Get the value from Data base Return value as node and attribute.
Example : l_Opt_Xml.firstChild.nodeValue and l_Opt_Xml.getAttribute('value').
  • Create the Element of OPTION
Example : var l_Opt = document.createElement("option");
  • Add the OPTION to Target Select List and Append the OPTION to Target Select List
Example : pSelect.options.add(l_Opt); pSelect.appendChild(l_Opt);
  • Insert the select list content to OPTION and Append the select list content to OPTION
Example : l_Opt.innerText = pContent;
l_Opt.appendChild(document.createTextNode(pContent));

Friday, April 16, 2010

Append the Data Base value to Tabular Form Read only Column


  • Get the interactive repot table id
Example : var apexform = $x{tableid};
  • Mention the rows and column
Example: var ApexTableId =filter.id; var row= ApexTableId.substring(4,8);
var newCell = ApexTableId.rows[row].cells[4];
newCell.innerHTML = Databasevalue;
  • Ajax(Application Process) used to get the value from Data Base then append into Table cell
output : In our project Product Description is Tabular Form Read only Column













Hide the Report Column based on User Condition


  • Get the interactive repot table id
Example : var apexform = $x{interactive report tableid};
  • Mention the rows and column
Example: var hidecell1= apexform.rows[4].cells[0];
  • Script used to hide the particular cell
Example: hidecell1.style.display='none';