this.gf_ErpCheckMandatory = function(pContainer, pSetting) { var bPopupAlert = true; try { bPopupAlert = pSetting.popupAlert; } catch(e) {}; var oResult = { successYn : true, message : "정상" }; if( pContainer instanceof nexacro.Div ) { var aTargetList = document.getElementById(pContainer._unique_id).querySelectorAll(".essential"); for( var idx = 0; idx < aTargetList.length; idx++) { try{ if(this.gf_IsNull(nexacro._findComponentForId(aTargetList[idx].id).value)) { oResult.successYn = false; oResult.message = "필수값이 없습니다. ["+ aTargetList[idx].title+"]"; if(bPopupAlert){ this.gf_Alert(this,oResult.message); }; nexacro._findComponentForId(aTargetList[idx].id).setFocus(); return oResult; }; } catch(e) {}; }; } else if( pContainer instanceof nexacro.Grid ) { var aMandatoryCols = []; for( var idx = 0; idx < pContainer._formats.default._headcells.length ; idx++) { if(pContainer._formats.default._headcells[idx].cssclass._value == "essential") { var oColInfo = { col : pContainer._formats.default._headcells[idx]._col, cell : pContainer._formats.default._headcells[idx]._cellidx }; aMandatoryCols.push(oColInfo); }; }; for( var nRow = 0; nRow < pContainer.bindDS.rowcount; nRow++ ) { for( var idx = 0; idx < aMandatoryCols.length; idx++ ) { var nColIdx = aMandatoryCols[idx].col; var nCellIdx = aMandatoryCols[idx].cell; var sColId = pContainer._formats.default._bodycells[nColIdx].text._bindexpr; var sText = ""; if( !this.gf_IsNull(sColId) && this.gf_IsNull(pContainer.bindDS.getColumn(nRow,sColId)) ) { oResult.successYn = false; sText = this.gf_Nvl(pContainer._formats.default._headcells[nCellIdx].tooltiptext._value, pContainer._formats.default._headcells[nCellIdx].text._value); oResult.message = "필수값이 없습니다. ["+ sText+"("+(nRow+1)+"행)]"; if(bPopupAlert){ this.gf_Alert(this,oResult.message); }; return oResult; }; }; }; }; return oResult; };