/*----------------------------------------------------------------------------------------------
* 설명 : dataset과 bind된 component의 max length 설정.
* 파라미터 : pForm : (필수) form object. 보통 this를 넘기면 됨.
* 리턴값 : N/A
-----------------------------------------------------------------------------------------------*/
this.gf_ErpSetBindCompMaxLength = function(pForm) {
var sColId = "";
var aBindList = pForm.binds;
for( var nIdx = 0; nIdx < aBindList.length; nIdx++ ){
sColId = aBindList[nIdx].columnid;
try {
if( !this.gf_IsNull(aBindList[nIdx]._dataset) && !this.gf_IsNull(aBindList[nIdx]._comp.maxlength) ) {
for( var nCol = 0; nCol < aBindList[nIdx]._dataset.colinfos.length; nCol++ ) {
if( sColId == aBindList[nIdx]._dataset.colinfos[nCol].id ) {
aBindList[nIdx]._comp.set_maxlength(aBindList[nIdx]._dataset.colinfos[nCol].size);
};
};
};
} catch(e) {
this.gf_Trace("["+sColId+"] : " + e.message);
};
};
};
사용예)
this.gf_ErpSetBindCompMaxLength(this);