379:
380: -- Call to Object Navigator to execute query and return data
381: -- as well as object and region structures
382:
383: ak_query_pkg.exec_query (
384: P_PARENT_REGION_APPL_ID => 601 ,
385: P_PARENT_REGION_CODE => 'ICX_RELATED_CATEGORIES_DISP_R',
386: P_ORDER_BY_CLAUSE => l_order_by ,
387: P_WHERE_CLAUSE => l_where ,
395:
396:
397: -- get number of total rows returned by lov to be used to
398: -- determine if we need to display the next/previous buttons
399: l_total_rows := ak_query_pkg.g_regions_table(0).total_result_count;
400:
401:
402: -- check end row value
403: if l_end_row > l_total_rows then
406:
407:
408: -- display data and CD buttons if necessary
409: j := 0;
410: for i in 1..ak_query_pkg.g_results_table.COUNT loop
411: j := j + 1;
412:
413: -- If this is the first iteration of the loop then
414: -- display next/previous set buttons if list of values returns
432:
433: -- display table header
434: htp.tableOpen('BORDER=1');
435: htp.p('
433: -- display table header
434: htp.tableOpen('BORDER=1');
435: htp.p('
434: htp.tableOpen('BORDER=1');
435: htp.p('
435: htp.p('
444: end if; -- CD Buttons and table header
445:
446:
447: -- load data for current row into temp pl/sql table
448: icx_util.transfer_Row_To_Column(ak_query_pkg.g_results_table(i-1), l_result_row_table);
449:
450:
451: -- display one row of data
452: htp.p('
449:
450:
451: -- display one row of data
452: htp.p('
450:
451: -- display one row of data
452: htp.p('
451: -- display one row of data
452: htp.p('
453: for k in ak_query_pkg.g_items_table.FIRST..ak_query_pkg.g_items_table.LAST loop
454: if ak_query_pkg.g_items_table(k).secured_column = 'F' and
455: ak_query_pkg.g_items_table(k).node_display_flag = 'Y' then
456:
457: if (ak_query_pkg.g_items_table(k).attribute_code = 'ICX_RELATED_CATEGORY' or
458: ak_query_pkg.g_items_table(k).attribute_code = 'ICX_RELATED_CATEGORY_DESC') then
459: for x in ak_query_pkg.g_items_table.FIRST..ak_query_pkg.g_items_table.LAST loop
460: if ak_query_pkg.g_items_table(x).attribute_code = 'ICX_RELATION' then
461: temp_relation_item := x;
454: if ak_query_pkg.g_items_table(k).secured_column = 'F' and
455: ak_query_pkg.g_items_table(k).node_display_flag = 'Y' then
456:
457: if (ak_query_pkg.g_items_table(k).attribute_code = 'ICX_RELATED_CATEGORY' or
458: ak_query_pkg.g_items_table(k).attribute_code = 'ICX_RELATED_CATEGORY_DESC') then
459: for x in ak_query_pkg.g_items_table.FIRST..ak_query_pkg.g_items_table.LAST loop
460: if ak_query_pkg.g_items_table(x).attribute_code = 'ICX_RELATION' then
461: temp_relation_item := x;
462: end if;
455: ak_query_pkg.g_items_table(k).node_display_flag = 'Y' then
456:
457: if (ak_query_pkg.g_items_table(k).attribute_code = 'ICX_RELATED_CATEGORY' or
458: ak_query_pkg.g_items_table(k).attribute_code = 'ICX_RELATED_CATEGORY_DESC') then
459: for x in ak_query_pkg.g_items_table.FIRST..ak_query_pkg.g_items_table.LAST loop
460: if ak_query_pkg.g_items_table(x).attribute_code = 'ICX_RELATION' then
461: temp_relation_item := x;
462: end if;
463: end loop;
456:
457: if (ak_query_pkg.g_items_table(k).attribute_code = 'ICX_RELATED_CATEGORY' or
458: ak_query_pkg.g_items_table(k).attribute_code = 'ICX_RELATED_CATEGORY_DESC') then
459: for x in ak_query_pkg.g_items_table.FIRST..ak_query_pkg.g_items_table.LAST loop
460: if ak_query_pkg.g_items_table(x).attribute_code = 'ICX_RELATION' then
461: temp_relation_item := x;
462: end if;
463: end loop;
464: -- dont display related category if relationship is TOP
461: temp_relation_item := x;
462: end if;
463: end loop;
464: -- dont display related category if relationship is TOP
465: if l_result_row_table(ak_query_pkg.g_items_table(temp_relation_item).value_id) = 'TOP' then
466: htp.tableData('
');
467: else
468: htp.p(icx_on_utilities.formatData(icx_on_utilities.formatText(l_result_row_table(ak_query_pkg.g_items_table(k).value_id),
469: 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));
464: -- dont display related category if relationship is TOP
465: if l_result_row_table(ak_query_pkg.g_items_table(temp_relation_item).value_id) = 'TOP' then
466: htp.tableData('
');
467: else
468: htp.p(icx_on_utilities.formatData(icx_on_utilities.formatText(l_result_row_table(ak_query_pkg.g_items_table(k).value_id),
469: 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));
470: end if;
471: else
472: htp.p(icx_on_utilities.formatData(icx_on_utilities.formatText(l_result_row_table(ak_query_pkg.g_items_table(k).value_id),
465: if l_result_row_table(ak_query_pkg.g_items_table(temp_relation_item).value_id) = 'TOP' then
466: htp.tableData('
');
467: else
468: htp.p(icx_on_utilities.formatData(icx_on_utilities.formatText(l_result_row_table(ak_query_pkg.g_items_table(k).value_id),
469: 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));
470: end if;
471: else
472: htp.p(icx_on_utilities.formatData(icx_on_utilities.formatText(l_result_row_table(ak_query_pkg.g_items_table(k).value_id),
473: 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));
468: htp.p(icx_on_utilities.formatData(icx_on_utilities.formatText(l_result_row_table(ak_query_pkg.g_items_table(k).value_id),
469: 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));
470: end if;
471: else
472: htp.p(icx_on_utilities.formatData(icx_on_utilities.formatText(l_result_row_table(ak_query_pkg.g_items_table(k).value_id),
473: 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));
474: end if;
475: end if;
476:
469: 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));
470: end if;
471: else
472: htp.p(icx_on_utilities.formatData(icx_on_utilities.formatText(l_result_row_table(ak_query_pkg.g_items_table(k).value_id),
473: 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));
474: end if;
475: end if;
476:
477: if ak_query_pkg.g_items_table(k).attribute_code = 'ICX_CATEGORY' then
473: 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));
474: end if;
475: end if;
476:
477: if ak_query_pkg.g_items_table(k).attribute_code = 'ICX_CATEGORY' then
478: temp_cat := l_result_row_table(ak_query_pkg.g_items_table(k).value_id);
479: end if;
480:
481: if ak_query_pkg.g_items_table(k).attribute_code = 'ICX_RELATED_CATEGORY' then
474: end if;
475: end if;
476:
477: if ak_query_pkg.g_items_table(k).attribute_code = 'ICX_CATEGORY' then
478: temp_cat := l_result_row_table(ak_query_pkg.g_items_table(k).value_id);
479: end if;
480:
481: if ak_query_pkg.g_items_table(k).attribute_code = 'ICX_RELATED_CATEGORY' then
482: temp_related_cat := l_result_row_table(ak_query_pkg.g_items_table(k).value_id);
477: if ak_query_pkg.g_items_table(k).attribute_code = 'ICX_CATEGORY' then
478: temp_cat := l_result_row_table(ak_query_pkg.g_items_table(k).value_id);
479: end if;
480:
481: if ak_query_pkg.g_items_table(k).attribute_code = 'ICX_RELATED_CATEGORY' then
482: temp_related_cat := l_result_row_table(ak_query_pkg.g_items_table(k).value_id);
483: end if;
484:
485: if ak_query_pkg.g_items_table(k).attribute_code = 'ICX_CATEGORY_SET_ID' then
478: temp_cat := l_result_row_table(ak_query_pkg.g_items_table(k).value_id);
479: end if;
480:
481: if ak_query_pkg.g_items_table(k).attribute_code = 'ICX_RELATED_CATEGORY' then
482: temp_related_cat := l_result_row_table(ak_query_pkg.g_items_table(k).value_id);
483: end if;
484:
485: if ak_query_pkg.g_items_table(k).attribute_code = 'ICX_CATEGORY_SET_ID' then
486: temp_cat_set_id := l_result_row_table(ak_query_pkg.g_items_table(k).value_id);
481: if ak_query_pkg.g_items_table(k).attribute_code = 'ICX_RELATED_CATEGORY' then
482: temp_related_cat := l_result_row_table(ak_query_pkg.g_items_table(k).value_id);
483: end if;
484:
485: if ak_query_pkg.g_items_table(k).attribute_code = 'ICX_CATEGORY_SET_ID' then
486: temp_cat_set_id := l_result_row_table(ak_query_pkg.g_items_table(k).value_id);
487: end if;
488:
489: if ak_query_pkg.g_items_table(k).attribute_code = 'ICX_CATEGORY_ID' then
482: temp_related_cat := l_result_row_table(ak_query_pkg.g_items_table(k).value_id);
483: end if;
484:
485: if ak_query_pkg.g_items_table(k).attribute_code = 'ICX_CATEGORY_SET_ID' then
486: temp_cat_set_id := l_result_row_table(ak_query_pkg.g_items_table(k).value_id);
487: end if;
488:
489: if ak_query_pkg.g_items_table(k).attribute_code = 'ICX_CATEGORY_ID' then
490: temp_cat_id := l_result_row_table(ak_query_pkg.g_items_table(k).value_id);
485: if ak_query_pkg.g_items_table(k).attribute_code = 'ICX_CATEGORY_SET_ID' then
486: temp_cat_set_id := l_result_row_table(ak_query_pkg.g_items_table(k).value_id);
487: end if;
488:
489: if ak_query_pkg.g_items_table(k).attribute_code = 'ICX_CATEGORY_ID' then
490: temp_cat_id := l_result_row_table(ak_query_pkg.g_items_table(k).value_id);
491: end if;
492:
493: if ak_query_pkg.g_items_table(k).attribute_code = 'ICX_RELATED_CATEGORY_ID' then
486: temp_cat_set_id := l_result_row_table(ak_query_pkg.g_items_table(k).value_id);
487: end if;
488:
489: if ak_query_pkg.g_items_table(k).attribute_code = 'ICX_CATEGORY_ID' then
490: temp_cat_id := l_result_row_table(ak_query_pkg.g_items_table(k).value_id);
491: end if;
492:
493: if ak_query_pkg.g_items_table(k).attribute_code = 'ICX_RELATED_CATEGORY_ID' then
494: temp_related_cat_id := l_result_row_table(ak_query_pkg.g_items_table(k).value_id);
489: if ak_query_pkg.g_items_table(k).attribute_code = 'ICX_CATEGORY_ID' then
490: temp_cat_id := l_result_row_table(ak_query_pkg.g_items_table(k).value_id);
491: end if;
492:
493: if ak_query_pkg.g_items_table(k).attribute_code = 'ICX_RELATED_CATEGORY_ID' then
494: temp_related_cat_id := l_result_row_table(ak_query_pkg.g_items_table(k).value_id);
495: end if;
496:
497: end loop;
490: temp_cat_id := l_result_row_table(ak_query_pkg.g_items_table(k).value_id);
491: end if;
492:
493: if ak_query_pkg.g_items_table(k).attribute_code = 'ICX_RELATED_CATEGORY_ID' then
494: temp_related_cat_id := l_result_row_table(ak_query_pkg.g_items_table(k).value_id);
495: end if;
496:
497: end loop;
498: htp.tableData(htf.anchor('javascript:delete_relation('''||icx_util.replace_quotes(temp_cat)||''','''||icx_util.replace_quotes(temp_related_cat)||''','''||temp_cat_set_id||''','''||temp_cat_id||''','''||temp_related_cat_id||