20210916 - Interactive Grid vs Interactive Report (by John Snyders)

어떤 상황에 Interactive Grid를 써야할지, Interactive Report를 써야할지 고민이 되는데 APEX 전문가의 의견을 들어보자 (by John Snyders)


Things IG can do that IR can't

- Edit

- Single or Multiple selection and cell range selection. Selection copy to clipboard.

- Scroll pagination

- Sticky footer

- Advanced JavaScript configuration for other pagination options

- Freeze columns

- Column groups in grid view

- Column heading behaviors sort including sort multiple, resize, reorder

- Has some extra chart view capabilities

- Resizable column widths (table layout fixed)

- Master Detail

- Lazy load [hope to have this in IR for 21.1]

- Fully configurable toolbar and menus through advanced configuration [IR is limited and not documented]

- More column types than IR has

- Column configuration: Alternate label, CSS Class, use as row header

- Has more events and documented APIs


Things IR can do that IG can't

- Table layout auto

- Variable height rows [hope to have this in IG for 21.1]

- Views: pivot, group by

- Computed columns

- Complex filters

- Pagination remembers current page

- Control over pagination control location

- Select text and copy to clipboard (not table/grid aware)

- Has right of interactive report search bar button position

- More declarative control over toolbar

- When more data found message/maximum rows to process


UI differences such as in dialogs and Actions menu. Not sure about differences in download and printing. Minor differences in how Detail and Icon views are configured.


There is a big difference in the implementation architecture with IR being server rendered and IG being client rendered with model veiw separation.


Ref. https://hardlikesoftware.com/weblog/

20210916 - 플러그인 Plug-in: APEX Items with APEX Button

1. 오픈 소스 코드 다운 / 인스톨 (감사합니다)

https://github.com/RonnyWeiss/APEX-Items-with-APEX-Buttons


2. 플러그인 적용 전


3. 플러그인 설정

Page Load 시 Dynamic Action - Action - APEX Items with APEX button Plugin

Setting - Item where the button is added : P15_PRODNM

Affected Elements - Selection Type : Button

Button : FIND




4. 플러그인 적용 후


20210912 - Oracle JET Java Extension Toolkit 활용하기 - 게이지 Gauge

항상 어떻게 써볼수 있을까 고민만 하다가 드디어 APEX에 첫 JET 컴포넌트를 연결


1. JET 메인 페이지에서 활용하고자하는 컴포넌트 확인 및 데모 예제 확인 html, js, css



2. JET 사용할 수 있도록 페이지에 참조하기

Page - Javascript - File URLs

#JET_BASE_DIRECTORY#js/libs/require/require.js

#IMAGE_PREFIX#libraries/apex/requirejs.jetConfig.js


Page - Javascript - Execute when Page Loads

데모 코드의 demo.js 에 있는 것을 그대로 옮겼고 일부 수치만 수정했음

여기서 중요한 것은 Initial Code의 제일 아래 코드

document.getElementById("gauge-container")); >> 해당 리전의 static ID 지정 필요

require(["require", "exports", "knockout", "ojs/ojbootstrap", 
"ojs/ojconverter-number", "ojs/ojknockout", "ojs/ojgauge", "ojs/ojlabel", 
"ojs/ojformlayout"], function (require, exports, ko, ojbootstrap_1, 
ojconverter_number_1) {
      "use strict";
      
      class StatusMeterGaugeData {
          constructor() {
              this.value = ko.observable(20);
              this.value1 = ko.observable(20);
              this.value2 = ko.observable(40);
              this.value3 = ko.observable(40);
              this.value4 = ko.observable(60);
              this.value5 = ko.observable(80);
              this.value6 = ko.observable(80);
              this.value8 = ko.observable(80);
              this.value10 = ko.observable(80);
              this.value11 = ko.observable(80);
              this.value12 = ko.observable(80);
              this.transientValue = ko.observable();
              this.thresholdValues = [{ max: 3 }, { max: 7 }, {}];
              this.referenceLines = [
                  { value: 33, color: "red" },
                  { value: 67, color: "green" },
              ];
              this.customSvgStyle = { fill: `url(${document.URL}#pattern)` };
              this.customConverter = {
                  rendered: "on",
                  converter: new ojconverter_number_1.IntlNumberConverter({ style: "currency", currency: "USD" }),
              };
              this.customConverter1 = {
                  rendered: "on",
                  converter: new ojconverter_number_1.IntlNumberConverter({ decimalFormat:"short" }),
              };
              this.getReferenceTooltip = (data) => {
                  return {
                      insert: `Value: ${data.label}<br>Reference Lines: Low 33, Medium 67, High 100`,
                  };
              };
          }
      }
      ojbootstrap_1.whenDocumentReady().then(() => {
          ko.applyBindings(new StatusMeterGaugeData(), 
document.getElementById("gauge-container"));
      });
  });


Page - CSS - File URLs

#JET_CSS_DIRECTORY#redwood/oj-redwood-notag-min.css

#JET_CSS_DIRECTORY#alta/oj-alta-notag-min.css


Page - CSS - Inline : 데모 코드에 이미 있고 참조하여 조정


  .demo-circular-status-meter-large-custom {
    height:7.00rem;
  }

  .demo-circular-status-meter-large {
    height:6.25rem;
  }
  
  .demo-circular-status-meter-small {
    height: 3.75rem;
  }
  
  .demo-status-meter-svg-g {
    stroke:#336791;
    stroke-width:1.25
  }
  
  .demo-status-meter-svg-rect {
    fill: #ADD8E6;
  }

  .custom-font-size {
    font-size: 1.4rem;
    text-align: center;
    font-weight: bold;
  }


3. 리전 설정

Identification - Type : Static Content

Advanced - Static ID : gauge-container

Source - Text :


<div style="display: flex; justify-content: center; align-items: center;">
    <oj-form-layout max-columns="2">
        <div class="oj-sm-margin-4x-bottom">
        <oj-status-meter-gauge  
            class="demo-circular-status-meter-large-custom"
            min="0" max="10" value="3" step="1"
            labelled-by="indicatorThreshold"
            thresholds="[[thresholdValues]]"
            orientation="circular"
            metric-label="[[customConverter1]]" readonly>
        </oj-status-meter-gauge>
        <oj-label id="readOnly1" class="custom-font-size">
        <br>발주기준재고
        </oj-label>
        </div>
        <div class="oj-sm-margin-4x-bottom">
        <oj-status-meter-gauge  
            class="demo-circular-status-meter-large-custom"
            min="0" max="10" value="7" step="1"
            labelled-by="indicatorThreshold"
            thresholds="[[thresholdValues]]"
            orientation="circular"
            metric-label="[[customConverter1]]" readonly>
        </oj-status-meter-gauge>
        <oj-label id="readOnly2" class="custom-font-size">
        <br>실재고
        </oj-label>
        </div>
    </oj-form-layout>
</div>


4. 이렇게 활용하게 됩니다.




참고

1) https://www.oracle.com/webfolder/technetwork/jet/jetCookbook.html?component=statusMeterGauge&demo=statusMeterGaugeCircular

2) https://www.oracle.com/webfolder/technetwork/jet/jsdocs/oj.ojStatusMeterGauge.html

3) https://hardlikesoftware.com/weblog/2018/12/20/jet-spark-charts-in-apex-interactive-grid/

4) https://hardlikesoftware.com/weblog/2016/04/09/using-oracle-jet-from-apex/

5) https://www.doag.org/formes/pubfiles/10833102/2018-Dev-Hilary_Farrell-Extend_your_APEX_Application_with_Oracle_JET-Praesentation.pdf

6) https://community.oracle.com/tech/developers/discussion/4127557/any-idea-how-to-integrate-oracle-jet-in-oracle-apex-apart-from-built-in-jet-features

7) https://likeahouseafire.com/2018/01/05/dynamic-gauge-colors/



20210912 - IG Interactive Grid 아래 footer pagination 숨기기

1. IG - Attributes - Pagination - Show Total Row Count : Disabled

이렇게 하면 총 건수는 안 보이지만 여전히 페이지는 보이는 상황


2. IG - Attributes - Advanced - JavaScript Initialization Code


function(config) {
  config.defaultGridViewOptions = {
    footer: false
  }  
  return config;  
}


3. 적용 결과


20210907 - 일반 리전 - 히어로 템플릿 아이콘 대신 URL 링크된 이미지 불러오기

1. Static Content 리전 생성

Identification - Title : &P52_STORE_NM.

Appearance - Template : Hero

Template Options : Use Template Defaults, Featured, Circle

Icon : icon-hero-css


2. Page 속성

CSS - Inline

.icon-hero-css { 

    background-image: url("&P52_IMGPATH2!RAW.");

    background-repeat: no-repeat;

    background-size: cover;

    background-position: center top;

    background-color: transparent !important;

}


3. 조건에 따라 리전 보이기/감추기

Region - Server-side Condition - Type : Item is NOT NULL

Item : P52_IMGPATH2

이렇게 하면 Item에 값이 Null 이 아닌 경우에는 리전이 보임 (항상 헷갈림)




참고

https://community.oracle.com/tech/developers/discussion/4041356/how-to-make-icon-in-hero-template-get-db-image

20210906 - 코멘트 리포트 템플릿 Comment Report Template

1. 후기 기록 테이블

사용자 이름으로 이니셜 생성, 이니셜 색상도 임의대로 지정


select
  apex_string.get_initials(user_nm) user_icon,
  wdate comment_date,
  user_nm user_name,
  cmt comment_text,
  ' ' comment_modifiers,
  'u-color-'||ora_hash(user_nm,45) icon_modifier,
  ' '  actions,
  ' ' attribute_1,
  ' ' attribute_2,
  ' ' attribute_3,
  ' ' attribute_4
 from x21091_store_prod_cmt
where prod_id = :P56_PRODID
order by wdate desc


2. 리전 속성

Region

Type : Classic Report

Appearance - Template : Standard


Attribute 

Appearance - Template Type : Theme

Template : Comments

Template Options : Use Template Defaults, Speech Bubbles





20210905 - 플러그인 Plug-in: Progress Bar

1. 플러그인 다운로드 (감사합니다)

https://github.com/stefandobre/Progress-Bar


2. 플러그인 임포트







3. 플러그인 페이지 아이템 추가

Identification - Name : P55_PBAR

Type : Progress Bar [Plug-In]

Label : Pbar

Settings - Position : Floating on Body

Size : Large

Color : #00A02D

Style : Animated Stripes

Show Percentage : On Bar

Show Message : Under Bar

Options : Hidden by Default




























20250315 - 글로벌 변수 Global Variables

G_USER Specifies the currently logged in user. G_FLOW_ID Specifies the ID of the currently running application. G_FLOW_STEP_ID Specifi...