[ Nexacro.Component - 전체컴포넌트 검색 ]
/****************************************************************************************** @desc 상태별 콤보넌트 처리
@호출예 : gfn_EnableComponentMain(this.components, bEnable); gfn_EnableComponentMain(tab.pageSpec.divSpec.components, bEnable); *****************************************************************************************/
function gfn_EnableComponentMain(objComp, bEnable){ // 1. root components for(var i=0; i<objComp.length; i++){ var sType = gfn_GetCompType(objComp[i]); if (sType == 'Div' || sType=='Tab'){ gfn_EnableComponentMain(objComp[i].components, bEnable); }else if (sType=='Tabpage' || sType=='Grid' || sType=='Static'){ //skip }else{ var sDefaultEnable = objComp[i].DefaultEnable; if (sDefaultEnable == "false") objComp[i].enable = false; else if (sDefaultEnable == "true") objComp[i].enable = true; else objComp[i].enable = bEnable; } } } |
function cfn_GetCompType(objComp){
return ((objComp+"").substr(8)).replace("]", "");
} |
☞ |
| |
-- 아래는 위 function에서 필요한 공통함수들 임 --
/*++
@desc 각 컴포넌트 type return
@name gfn_GetCompType
@param objComp - component name
@return componet type
*/
function gfn_GetCompType(objComp){
return ((objComp+"").substr(8)).replace("]", "");
}