EzValidation

EzValidation

정합성 검증 컴포넌트
생성 후 DatasetEditor에 baseXML을 붙혀 넣은 후 사용합니다.

Constructor

new EzValidation()

Author:
  • 정민석(whitn86@gmail.com)

Members

(readonly) baseXML :string

Description:
  • 기존 폼 xml

기존 폼 xml

Type:
  • string

bodyCellRequiredClass :string

Description:
  • target으로 지정된 컴포넌트가 Grid일 경우 필수값이 바인딩 된 Body Cell에 추가로 부여할 cssclass 설정

target으로 지정된 컴포넌트가 Grid일 경우 필수값이 바인딩 된 Body Cell에 추가로 부여할 cssclass 설정

Type:
  • string

cellBlinkCount :number

Description:
  • 정합성 오류시 오류가 발생한 Grid의 Cell에 반짝임 효과 횟수
    웹 접근성 모드에서는 사용하지 않는것을 권장합니다.

정합성 오류시 오류가 발생한 Grid의 Cell에 반짝임 효과 횟수
웹 접근성 모드에서는 사용하지 않는것을 권장합니다.

Type:
  • number

cellBlinkTime :number

Description:
  • 정합성 오류시 오류가 발생한 Grid의 Cell에 반짝임 효과 지속 시간(ms)

    • 웹 접근성 모드에서는 사용하지 않는것을 권장합니다.

정합성 오류시 오류가 발생한 Grid의 Cell에 반짝임 효과 지속 시간(ms)

  • 웹 접근성 모드에서는 사용하지 않는것을 권장합니다.
Type:
  • number

findAuto :boolean

Description:
  • 정합성 오류 발생시 자동으로 바인드된 컴포넌트에 포커싱할지 여부
    (Grid의 경우 해당 cell을 선택함)

정합성 오류 발생시 자동으로 바인드된 컴포넌트에 포커싱할지 여부
(Grid의 경우 해당 cell을 선택함)

Type:
  • boolean

headCellRequiredClass :string

Description:
  • target으로 지정된 컴포넌트가 Grid일 경우 필수값이 바인딩 된 Head Cell에 추가로 부여할 cssclass 설정

target으로 지정된 컴포넌트가 Grid일 경우 필수값이 바인딩 된 Head Cell에 추가로 부여할 cssclass 설정

Type:
  • string

requiredClass

Description:
  • 필수값이 바인딩 된 컴포넌트에 추가로 부여할 cssclass

필수값이 바인딩 된 컴포넌트에 추가로 부여할 cssclass

syncColumnOrder :boolean

Description:
  • EzValidation의 값 검증 순서를 target Dataset의 칼럼 순서에 맞출지 여부

    • true일경우 target 으로 설정된 Dataset ( Grid의 경우 바인딩된 Dataset) 의 칼럼 순서대로 정합성을 검증
    • false일 경우 EzValidation에 row순서대로 정합성을 검증

EzValidation의 값 검증 순서를 target Dataset의 칼럼 순서에 맞출지 여부

  • true일경우 target 으로 설정된 Dataset ( Grid의 경우 바인딩된 Dataset) 의 칼럼 순서대로 정합성을 검증
  • false일 경우 EzValidation에 row순서대로 정합성을 검증
Type:
  • boolean

(static, readonly) LOG_KEY :string

Description:
  • 로깅용 키

로깅용 키

Type:
  • string

Methods

check(doAllRowopt) → {nexacro.EzValidation.RowValidInfo}

Description:
  • 모든 행의 데이터를 validation check

Example
this.ezValidation.check();
Parameters:
Name Type Attributes Default Description
doAllRow boolean <optional>
false

편집여부 무시 플래그

  • true일경우 모든 행을 검사함
  • false일경우 신규/수정 상태인 행만 검사함
Returns:

validation 확인 결과 정보 객체

Type
nexacro.EzValidation.RowValidInfo

getRowValidInfo(row) → {nexacro.EzValidation.RowValidInfo}

Description:
  • 특정 행의 데이터를 validation check

Example
this.ezValidation.getRowValidInfo(0);
Parameters:
Name Type Description
row number

정합성 확인할 행

Returns:

validation 확인 결과 정보 객체

Type
nexacro.EzValidation.RowValidInfo

markingCells()

Description:
  • 필수값이 바인딩된 Cell에 cssclass를 설정

Example
this.ezValidation.markingCells();

markingComps()

Description:
  • 필수값이 바인딩된 컴포넌트에 cssclass를 추가

Example
this.ezValidation.markingComps();

rebuild()

Description:
  • 정합성 옵션을 재설정. 기존 검증 값은 사라짐

Example
this.ezValidation.rebuild();

setTarget(comp)

Description:
  • 검증 대상 Grid 또는 Dataset을 설정

Example
this.ezValidation.setTarget(this.Grid00);
Parameters:
Name Type Description
comp nexacro.Grid | nexacro.Dataset

검증 대상 Grid 또는 Dataset

set_bodyCellRequiredClass(bodyCellRequiredClass)

Description:
  • target으로 지정된 컴포넌트가 Grid일 경우 필수값이 바인딩 된 Body Cell에 추가로 부여할 cssclass 설정

Example
this.ezValidation.set_bodyCellRequiredClass("essential");
Parameters:
Name Type Description
bodyCellRequiredClass string

cssclass

set_cellBlinkCount(cellBlinkCount)

Description:
  • 정합성 오류시 오류가 발생한 Grid의 Cell에 반짝임 효과 횟수 설정
    웹 접근성 모드에서는 사용하지 않는것을 권장합니다.

Example
this.ezValidation.set_cellBlinkCount(5);
Parameters:
Name Type Description
cellBlinkCount number

정합성 오류시 오류가 발생한 Grid의 Cell에 반짝임 효과 횟수

set_cellBlinkTime(cellBlinkTime)

Description:
  • 정합성 오류시 오류가 발생한 Grid의 Cell에 반짝임 효과 지속 시간설정

    • 웹 접근성 모드에서는 사용하지 않는것을 권장합니다.
Example
this.ezValidation.set_cellBlinkTime(5000);
Parameters:
Name Type Description
cellBlinkTime number

정합성 오류시 오류가 발생한 Grid의 Cell에 반짝임 효과 지속 시간(ms)

set_findAuto(findAuto)

Description:
  • 정합성 오류 발생시 자동으로 바인드된 컴포넌트에 포커싱할지 여부 설정
    Grid의 경우 해당 cell을 선택합니다.

Example
this.ezValidation.set_findAuto(false);
Parameters:
Name Type Description
findAuto boolean

정합성 오류 발생시 자동으로 바인드된 컴포넌트에 포커싱할지 여부

set_headCellRequiredClass(headCellRequiredClass)

Description:
  • target으로 지정된 컴포넌트가 Grid일 경우 필수값이 바인딩 된 Head Cell에 추가로 부여할 cssclass 설정

Example
this.ezValidation.set_headCellRequiredClass("essential");
Parameters:
Name Type Description
headCellRequiredClass string

cssclass

set_requiredClass(requiredClass)

Description:
  • 필수값이 바인딩 된 컴포넌트에 추가로 부여할 cssclass 설정

Example
this.ezValidation.set_requiredClass("essential");
Parameters:
Name Type Description
requiredClass string

필수값이 바인딩 된 컴포넌트에 추가로 부여할 cssclass

set_target(target)

Description:
  • 검증 대상 Grid 또는 Dataset 설정

    • Grid나 Dataset을 직접 설정할 경우 setTarget함수를 사용하세요
Example
this.ezValidation.set_target("Grid00");
Parameters:
Name Type Description
target string

검증 대상 Grid 또는 Dataset의 경로

  • 대상 Grid를 선택한 상태로 ctrl + shift + c 를 눌러 경로를 복사할 수 있습니다.

unMarkingCells()

Description:
  • 필수값이 바인딩된 Cell에 cssclass를 해제

Example
this.ezValidation.unMarkingCells();

unMarkingComps()

Description:
  • 필수값이 바인딩된 컴포넌트에 cssclass를 해제

Example
this.ezValidation.unMarkingComps();

Type Definitions

RowValidInfo

Properties:
Name Type Description
row number

유효성 검증을 시도한 행

colNm string

유효성 검증을 시도한 column 명

rsn string

유효성 검증을 시도한 opiton명

value string | number | boolean

유효성 검증을을 위해 이용한 값

msg string

유효성 통과 실패 메시지
유효한 데이터라면 해당 값이 빈 문자열일 수 있습니다.

Type:
  • Object