$comp

Namespace

$comp

Description:
  • 컴포넌트 유틸리티

Author:
  • 이승갑 (dltmdrkq2@gmail.com)
  • 정민석 (whitn86@gmail.com)

Methods

(static) getBorderWidth(comp) → {Object}

Description:
  • 해당 컴포넌트의 Border 넓이

Example
var arrWidth = $comp.getBorderWidth(this);
Parameters:
Name Type Description
comp nexacro.Components

컴포넌트

Returns:

넓이 { top, right, bottom, left }

Type
Object

(static) getComponent(root, path) → {nexacro.Component}

Description:
  • 특정 경로의 Object 가져오기

Example
$comp.getComponent(this, "grd_list._headcells[0]");
Parameters:
Name Type Description
root Object

최상위 부모

path string

아이템 경로

Returns:

해당 경로의 컴포넌트

Type
nexacro.Component

(static) getEllipsisText(comp, text) → {string}

Description:
  • 해당 컴포넌트에 표시가능한 만큼 문자열을 말줄임 처리한 문자열을 가져온다.

Example
var text = '다람쥐 쳇바퀴 타고파';
var result = $comp.getEllipsisText(comp, text);
Parameters:
Name Type Description
comp nexacro.Components

컴포넌트

text string

문자열

Returns:

말줄임처리된 문자열

Type
string

(static) getFirstFocusable(root) → {nexacro.Components}

Description:
  • 해당 컴포넌트 내부 가장 처음 포커싱 가능한 컴포넌트 찾음

Example
$comp.getFirstFocusable(this.Div00) 
Parameters:
Name Type Description
root nexacro.Components

최상위 부모

Returns:

처음 포커싱 가능한 컴포넌트

Type
nexacro.Components

(static) getFont(comp) → {nexacro.FontObject}

Description:
  • 해당 컴포넌트의 폰트를 가져온다.

Example
var font = $comp.getFont(comp);		
Parameters:
Name Type Description
comp nexacro.Components

컴포넌트

Returns:

폰트객체

Type
nexacro.FontObject

(static) getFormPath(comp, form) → {string}

Description:
  • 특정 컴포넌트의 특정 form으로 부터의 경로를 가져옵니다.

Example
var path = $comp.getFormPath(this.Button00, this);
Parameters:
Name Type Description
comp nexacro._EventSinkObject

컴포넌트

form nexacro.FormBase

경로를 가져오기 시작할 form

Returns:

컴포넌트 경로

Type
string

(static) getFullPath(comp) → {string}

Description:
  • 특정 컴포넌트의 Section Form까지의 완전경로를 가져옵니다.

Example
var path = $comp.getFullPath(this.Button00);
Parameters:
Name Type Description
comp nexacro._EventSinkObject

컴포넌트

Returns:

컴포넌트 경로

Type
string

(static) getLastFocusable(root) → {nexacro.Components}

Description:
  • 해당 컴포넌트 내부 가장 마지막 포커싱 가능한 컴포넌트 찾음

Example
$comp.getLastFocusable(this.Div00) 
Parameters:
Name Type Description
root nexacro.Components

최상위 부모

Returns:

마지막 포커싱 가능한 컴포넌트

Type
nexacro.Components

(static) getMainTitle(comp) → {nexacro.EzTitlebar}

Description:
  • 해당 컴포넌트가 속한 화면의 공통타이틀바를 가져옵니다.

Example
var tit = $comp.getMainTitle(this);
Parameters:
Name Type Description
comp nexacro.Components

컴포넌트

Returns:

메인타이틀바

Type
nexacro.EzTitlebar

(static) getMenuId(comp) → {string}

Description:
  • 해당 컴포넌트의 속한 화면의 menuId

Example
var menuId = $comp.getMenuId(this);
Parameters:
Name Type Description
comp nexacro.Components

컴포넌트

Returns:

해당 컴포넌트의 속한 화면의 menuId

Type
string

(static) getMenuNm(comp) → {string}

Description:
  • 해당 컴포넌트의 속한 화면의 menuId

Example
var menuNm = $comp.getMenuNm(this);
Parameters:
Name Type Description
comp nexacro.Components

컴포넌트

Returns:

해당 컴포넌트의 속한 화면의 menuId

Type
string

(static) getParam(comp) → {nexacro.Dataset}

Description:
  • 해당 컴포넌트가 속한 화면의 프로그램 파라미터를 가져온다
    프로그램 파라미터는 프로그램 등록 화면에서 등록한 파라미터를 의미합니다

Example
this.param = $comp.getParam(this);
Parameters:
Name Type Description
comp nexacro.Components

컴포넌트

Returns:

파라미터 정보

Type
nexacro.Dataset

(static) getParamStr(comp) → {string}

Description:
  • 해당 컴포넌트가 속한 화면의 프로그램 파라미터를 가져온다
    프로그램 파라미터는 프로그램 등록 화면에서 등록한 파라미터를 의미합니다

Example
var paramStr = $comp.getParamStr(this);
Parameters:
Name Type Description
comp nexacro.Components

컴포넌트

Returns:

파라미터 정보 xml

Type
string

(static) getPgmPath(comp) → {string}

Description:
  • 해당 컴포넌트의 Form프로그램의 경로

Example
var param = $comp.getPgmPath(this);
Parameters:
Name Type Description
comp nexacro.Components

컴포넌트

Returns:

해당 컴포넌트의 속한 화면의 프로그램 경로

Type
string

(static) getPgmTreePath(comp) → {Array.<string>}

Description:
  • 해당 컴포넌트의 Form프로그램의 경로 트리(팝업포함)

Example
var param = $comp.getPgmPath(this);
Parameters:
Name Type Description
comp nexacro.Components

컴포넌트

Returns:

해당 컴포넌트의 속한 화면의 프로그램 경로 트리

Type
Array.<string>

(static) getUserParam(comp) → {Object}

Description:
  • 해당 컴포넌트가 속한 화면의 사용자 파라미터를 읽어온다.
    사용자 파라미터는 특정 화면에서 다른 화면을 호출 할 때 보내는 파라미터를 의미합니다
    ex) popup호출시 arg 옵션

Example
var param = $comp.getUserParam(this);
Parameters:
Name Type Description
comp nexacro.Components

컴포넌트

Returns:

파라미터 정보

Type
Object

(static) getWorkForm(comp) → {nexacro.FormBase}

Description:
  • 특정 컴포넌트를 표현중인 Section Form을 가져온다. 주로 업무화면 root에 해당된다.

Example
var a = $comp.getWorkForm(this.Button00);
Parameters:
Name Type Description
comp nexacro._EventSinkObject

컴포넌트

Returns:
Type
nexacro.FormBase

(static) getWorkInfoDataset(comp) → {nexacro.Dataset}

Description:
  • 해당 컴포넌트가 속한 Form프로그램의 프로그램 정보 데이터셋

Example
var ds = $comp.getWorkInfoDataset(this);
Parameters:
Name Type Description
comp nexacro.Components

컴포넌트

Returns:

work화면의 정보를 담은 Dataset

Type
nexacro.Dataset

(static) getWrapElem(comp) → {string}

Description:
  • 특정 컴포넌트의 프레임 레벨의 컴포넌트 찾기

Example
var root = $comp.getWrapElem(this.Button00);
Parameters:
Name Type Description
comp nexacro._EventSinkObject

컴포넌트

Returns:

컴포넌트 경로

Type
string

(static) makeParamStr(comp) → {string}

Description:
  • Div 내부의 value값을 가진 Component들을 이용해 transaction용 파라미터 문자열을 만든다.

Example
var param = $comp.makeParamStr(this.Div00);
Parameters:
Name Type Description
comp nexacro.Div

내부에 form이 있는 컴포넌트

Returns:

파라미터 문자열

Type
string

(static) setDetail(comp, ds, formopt)

Description:
  • Component하위의 value를 지정 가능한 컴포넌트들에 Dataset을 일괄 바인딩 한다.

    바인딩은 Dataset의 칼럼명과 컴포넌트의 id를 비교해 자동 바인딩 합니다.
    컴포넌트의 id를 컴포넌트유형_칼럼명(camel) 형태로 기입하였을 때에 만 정상적으로 바인딩 됩니다.

    ex) 컴포넌트 id 별 바인딩 결과 :
    Calendar00 -> 아무것도 바인딩 하지 않습니다.
    cal_hireDate -> 칼럼 [ HIRE_DATE ]가 바인딩 됩니다.
    calHireDate -> 아무것도 바인딩 하지 않습니다.
    cal_hire_date -> 칼럼 [ HIRE ]이 바인딩 됩니다.

    value값을 지정할 수 없는 컴포넌트(Static, Div 등)의 경우 바인딩 대상에서 제외됩니다.

Example
$comp.setDetail(this.div_detail, this.ds_list, this);
Parameters:
Name Type Attributes Description
comp nexacro.Div | nexacro.Tab

최상위 부모

ds nexacro.Dataset

바인딩할 데이터셋

form nexacro.FormBase <optional>

생성된 bind item을 등록할 form 생략시, 현재 Div가 속한 form에 등록한다.

(static) setLabel(comp)

Description:
  • Component하위의 value를 지정 가능한 컴포넌트들에 Label에 해당하는 static을 일괄 매핑한다

    컴포넌트의 id를 비교해 라벨 Static을 설정 합니다.
    컴포넌트의 id를 컴포넌트유형_칼럼명(camel) 형태로 기입하였을 때에 만 정상적으로 매핑 됩니다.

    ex) 컴포넌트 id 별 매핑 결과 :
    Calendar00 -> 아무것도 매핑 하지 않습니다.
    cal_hireDate -> label로 stt_hireDate가 매핑 됩니다.
    calHireDate -> 아무것도 매핑 하지 않습니다.
    cal_hire_date -> label로 stt_hire가 매핑 됩니다.

    value값을 지정할 수 없는 컴포넌트(Static, Div 등)의 경우 대상에서 제외됩니다.
    라벨에 해당하는 컴포넌트와 입력창 컴포넌트는 동일한 부모에 속해 있어야 합니다.

Example
$comp.setLabel(this.div_detail);
Parameters:
Name Type Description
comp nexacro.Components

내부에 form이 있는 컴포넌트