235: l_end_row number;
236: l_query_size number;
237: l_where varchar2(2000);
238: /* Change wrto Bug Fix to implement the Bind Vars **/
239: l_where_binds ak_query_pkg.bind_tab;
240: v_index NUMBER;
241:
242: l_order_by varchar2(2000);
243: l_count number;
323:
324: -- Call to Object Navigator to execute query and return data
325: -- as well as object and region structures
326:
327: ak_query_pkg.exec_query (
328: P_PARENT_REGION_APPL_ID => 601 ,
329: P_PARENT_REGION_CODE => 'ICX_RELATED_TEMPLATES_DISP_R',
330: P_WHERE_CLAUSE => l_where ,
331: P_ORDER_BY_CLAUSE => l_order_by ,
340:
341:
342: -- get number of total rows returned by lov to be used to
343: -- determine if we need to display the next/previous buttons
344: l_total_rows := ak_query_pkg.g_regions_table(0).total_result_count;
345:
346:
347: -- check end row value
348: if l_end_row > l_total_rows then
351:
352:
353: -- display data and CD buttons if necessary
354: j := 0;
355: for i in 1..ak_query_pkg.g_results_table.COUNT loop
356: j := j + 1;
357:
358: -- If this is the first iteration of the loop then
359: -- display next/previous set buttons if list of values returns
377:
378: -- display table header
379: htp.tableOpen('BORDER=1');
380: htp.p('
378: -- display table header
379: htp.tableOpen('BORDER=1');
380: htp.p('
379: htp.tableOpen('BORDER=1');
380: htp.p('
380: htp.p('
389: end if; -- CD Buttons and table header
390:
391:
392: -- load data for current row into temp pl/sql table
393: icx_util.transfer_Row_To_Column(ak_query_pkg.g_results_table(i-1), l_result_row_table);
394:
395:
396: -- display one row of data
397: htp.p('
394:
395:
396: -- display one row of data
397: htp.p('
395:
396: -- display one row of data
397: htp.p('
396: -- display one row of data
397: htp.p('
398: for k in ak_query_pkg.g_items_table.FIRST..ak_query_pkg.g_items_table.LAST loop
399: if ak_query_pkg.g_items_table(k).secured_column = 'F' and
400: ak_query_pkg.g_items_table(k).node_display_flag = 'Y' then
401:
402: if (ak_query_pkg.g_items_table(k).attribute_code = 'ICX_RELATED_TEMPLATE' or
403: ak_query_pkg.g_items_table(k).attribute_code = 'ICX_RELATED_TEMPLATE_DESC') then
404: for x in ak_query_pkg.g_items_table.FIRST..ak_query_pkg.g_items_table.LAST loop
405: if ak_query_pkg.g_items_table(x).attribute_code = 'ICX_RELATION' then
406: temp_relation_item := x;
399: if ak_query_pkg.g_items_table(k).secured_column = 'F' and
400: ak_query_pkg.g_items_table(k).node_display_flag = 'Y' then
401:
402: if (ak_query_pkg.g_items_table(k).attribute_code = 'ICX_RELATED_TEMPLATE' or
403: ak_query_pkg.g_items_table(k).attribute_code = 'ICX_RELATED_TEMPLATE_DESC') then
404: for x in ak_query_pkg.g_items_table.FIRST..ak_query_pkg.g_items_table.LAST loop
405: if ak_query_pkg.g_items_table(x).attribute_code = 'ICX_RELATION' then
406: temp_relation_item := x;
407: end if;
400: ak_query_pkg.g_items_table(k).node_display_flag = 'Y' then
401:
402: if (ak_query_pkg.g_items_table(k).attribute_code = 'ICX_RELATED_TEMPLATE' or
403: ak_query_pkg.g_items_table(k).attribute_code = 'ICX_RELATED_TEMPLATE_DESC') then
404: for x in ak_query_pkg.g_items_table.FIRST..ak_query_pkg.g_items_table.LAST loop
405: if ak_query_pkg.g_items_table(x).attribute_code = 'ICX_RELATION' then
406: temp_relation_item := x;
407: end if;
408: end loop;
401:
402: if (ak_query_pkg.g_items_table(k).attribute_code = 'ICX_RELATED_TEMPLATE' or
403: ak_query_pkg.g_items_table(k).attribute_code = 'ICX_RELATED_TEMPLATE_DESC') then
404: for x in ak_query_pkg.g_items_table.FIRST..ak_query_pkg.g_items_table.LAST loop
405: if ak_query_pkg.g_items_table(x).attribute_code = 'ICX_RELATION' then
406: temp_relation_item := x;
407: end if;
408: end loop;
409: -- dont display related category if relationship is TOP
406: temp_relation_item := x;
407: end if;
408: end loop;
409: -- dont display related category if relationship is TOP
410: if l_result_row_table(ak_query_pkg.g_items_table(temp_relation_item).value_id) = 'TOP' then
411: htp.tableData('
');
412: else
413: htp.p(icx_on_utilities.formatData(icx_on_utilities.formatText(l_result_row_table(ak_query_pkg.g_items_table(k).value_id),
414: ak_query_pkg.g_items_table(k).bold,ak_query_pkg.g_items_table(k).italic),ak_query_pkg.g_items_table(k).horizontal_alignment,ak_query_pkg.g_items_table(k).vertical_alignment));
409: -- dont display related category if relationship is TOP
410: if l_result_row_table(ak_query_pkg.g_items_table(temp_relation_item).value_id) = 'TOP' then
411: htp.tableData('
');
412: else
413: htp.p(icx_on_utilities.formatData(icx_on_utilities.formatText(l_result_row_table(ak_query_pkg.g_items_table(k).value_id),
414: ak_query_pkg.g_items_table(k).bold,ak_query_pkg.g_items_table(k).italic),ak_query_pkg.g_items_table(k).horizontal_alignment,ak_query_pkg.g_items_table(k).vertical_alignment));
415: end if;
416: else
417: htp.p(icx_on_utilities.formatData(icx_on_utilities.formatText(l_result_row_table(ak_query_pkg.g_items_table(k).value_id),
410: if l_result_row_table(ak_query_pkg.g_items_table(temp_relation_item).value_id) = 'TOP' then
411: htp.tableData('
');
412: else
413: htp.p(icx_on_utilities.formatData(icx_on_utilities.formatText(l_result_row_table(ak_query_pkg.g_items_table(k).value_id),
414: ak_query_pkg.g_items_table(k).bold,ak_query_pkg.g_items_table(k).italic),ak_query_pkg.g_items_table(k).horizontal_alignment,ak_query_pkg.g_items_table(k).vertical_alignment));
415: end if;
416: else
417: htp.p(icx_on_utilities.formatData(icx_on_utilities.formatText(l_result_row_table(ak_query_pkg.g_items_table(k).value_id),
418: ak_query_pkg.g_items_table(k).bold,ak_query_pkg.g_items_table(k).italic),ak_query_pkg.g_items_table(k).horizontal_alignment,ak_query_pkg.g_items_table(k).vertical_alignment));
413: htp.p(icx_on_utilities.formatData(icx_on_utilities.formatText(l_result_row_table(ak_query_pkg.g_items_table(k).value_id),
414: ak_query_pkg.g_items_table(k).bold,ak_query_pkg.g_items_table(k).italic),ak_query_pkg.g_items_table(k).horizontal_alignment,ak_query_pkg.g_items_table(k).vertical_alignment));
415: end if;
416: else
417: htp.p(icx_on_utilities.formatData(icx_on_utilities.formatText(l_result_row_table(ak_query_pkg.g_items_table(k).value_id),
418: ak_query_pkg.g_items_table(k).bold,ak_query_pkg.g_items_table(k).italic),ak_query_pkg.g_items_table(k).horizontal_alignment,ak_query_pkg.g_items_table(k).vertical_alignment));
419: end if;
420: end if;
421:
414: ak_query_pkg.g_items_table(k).bold,ak_query_pkg.g_items_table(k).italic),ak_query_pkg.g_items_table(k).horizontal_alignment,ak_query_pkg.g_items_table(k).vertical_alignment));
415: end if;
416: else
417: htp.p(icx_on_utilities.formatData(icx_on_utilities.formatText(l_result_row_table(ak_query_pkg.g_items_table(k).value_id),
418: ak_query_pkg.g_items_table(k).bold,ak_query_pkg.g_items_table(k).italic),ak_query_pkg.g_items_table(k).horizontal_alignment,ak_query_pkg.g_items_table(k).vertical_alignment));
419: end if;
420: end if;
421:
422: if ak_query_pkg.g_items_table(k).attribute_code = 'ICX_TEMPLATE1' then
418: ak_query_pkg.g_items_table(k).bold,ak_query_pkg.g_items_table(k).italic),ak_query_pkg.g_items_table(k).horizontal_alignment,ak_query_pkg.g_items_table(k).vertical_alignment));
419: end if;
420: end if;
421:
422: if ak_query_pkg.g_items_table(k).attribute_code = 'ICX_TEMPLATE1' then
423: temp_template := l_result_row_table(ak_query_pkg.g_items_table(k).value_id);
424: end if;
425:
426: if ak_query_pkg.g_items_table(k).attribute_code = 'ICX_RELATED_TEMPLATE' then
419: end if;
420: end if;
421:
422: if ak_query_pkg.g_items_table(k).attribute_code = 'ICX_TEMPLATE1' then
423: temp_template := l_result_row_table(ak_query_pkg.g_items_table(k).value_id);
424: end if;
425:
426: if ak_query_pkg.g_items_table(k).attribute_code = 'ICX_RELATED_TEMPLATE' then
427: temp_related_template := l_result_row_table(ak_query_pkg.g_items_table(k).value_id);
422: if ak_query_pkg.g_items_table(k).attribute_code = 'ICX_TEMPLATE1' then
423: temp_template := l_result_row_table(ak_query_pkg.g_items_table(k).value_id);
424: end if;
425:
426: if ak_query_pkg.g_items_table(k).attribute_code = 'ICX_RELATED_TEMPLATE' then
427: temp_related_template := l_result_row_table(ak_query_pkg.g_items_table(k).value_id);
428: end if;
429:
430: end loop;
423: temp_template := l_result_row_table(ak_query_pkg.g_items_table(k).value_id);
424: end if;
425:
426: if ak_query_pkg.g_items_table(k).attribute_code = 'ICX_RELATED_TEMPLATE' then
427: temp_related_template := l_result_row_table(ak_query_pkg.g_items_table(k).value_id);
428: end if;
429:
430: end loop;
431: