CJS_Result CJX_Field::execInitialize( CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (!params.empty()) return CJS_Result::Failure(JSMessage::kParamError); CXFA_FFNotify* pNotify = GetDocument()->GetNotify(); if (pNotify) { pNotify->ExecEventByDeepFirst(GetXFANode(), XFA_EVENT_Initialize, false, false); } return CJS_Result::Success(); }
CJS_Result CJX_Field::execValidate( CFX_V8* runtime, const std::vector<v8::Local<v8::Value>>& params) { if (!params.empty()) return CJS_Result::Failure(JSMessage::kParamError); CXFA_FFNotify* pNotify = GetDocument()->GetNotify(); if (!pNotify) return CJS_Result::Success(runtime->NewBoolean(false)); int32_t iRet = pNotify->ExecEventByDeepFirst(GetXFANode(), XFA_EVENT_Validate, false, false); return CJS_Result::Success(runtime->NewBoolean(iRet != XFA_EVENTERROR_Error)); }