diff --git a/frameworks/bridge/declarative_frontend/jsview/js_form.cpp b/frameworks/bridge/declarative_frontend/jsview/js_form.cpp index 0d7c7d08166..5ee3c576e8c 100644 --- a/frameworks/bridge/declarative_frontend/jsview/js_form.cpp +++ b/frameworks/bridge/declarative_frontend/jsview/js_form.cpp @@ -80,10 +80,10 @@ void JSForm::Create(const JSCallbackInfo& info) return; } formInfo.id = inputFormId; - } - if (id->IsNumber()) { + } else if (id->IsNumber()) { formInfo.id = id->ToNumber(); } + LOGI("JSForm Create, info.id: %{public}" PRId64, formInfo.id); formInfo.cardName = name->ToString(); formInfo.bundleName = bundle->ToString(); formInfo.abilityName = ability->ToString(); diff --git a/frameworks/core/components/form/resource/form_manager_delegate.cpp b/frameworks/core/components/form/resource/form_manager_delegate.cpp index 77c12a513ec..ed3b42bdfad 100644 --- a/frameworks/core/components/form/resource/form_manager_delegate.cpp +++ b/frameworks/core/components/form/resource/form_manager_delegate.cpp @@ -126,6 +126,7 @@ void FormManagerDelegate::AddForm(const WeakPtr& context, const Re SetParamForWant(info, formInfo); OHOS::AppExecFwk::FormJsInfo formJsInfo; auto clientInstance = OHOS::AppExecFwk::FormHostClient::GetInstance(); + TAG_LOGI(AceLogTag::ACE_FORM, "Before FormMgr adding form, info.id: %{public}" PRId64, info.id); auto ret = OHOS::AppExecFwk::FormMgr::GetInstance().AddForm(info.id, wantCache_, clientInstance, formJsInfo); if (ret != 0) { auto errorMsg = OHOS::AppExecFwk::FormMgr::GetInstance().GetErrorMessage(ret); @@ -956,7 +957,7 @@ void FormManagerDelegate::ProcessFormUpdate(const AppExecFwk::FormJsInfo& formJs void FormManagerDelegate::ReleaseRenderer() { - TAG_LOGI(AceLogTag::ACE_FORM, "FormManagerDelegate releaseForm. formId: %{public}" PRId64 ", %{public}s", + TAG_LOGI(AceLogTag::ACE_FORM, "FormManagerDelegate releaseRenderer. formId: %{public}" PRId64 ", %{public}s", runningCardId_, runningCompId_.c_str()); if (runningCardId_ <= 0) { return; diff --git a/frameworks/core/components_ng/pattern/form/form_pattern.cpp b/frameworks/core/components_ng/pattern/form/form_pattern.cpp index 0e0fcbcab4d..45d1effe407 100644 --- a/frameworks/core/components_ng/pattern/form/form_pattern.cpp +++ b/frameworks/core/components_ng/pattern/form/form_pattern.cpp @@ -138,6 +138,7 @@ void FormPattern::OnAttachToFrameNode() auto uiTaskExecutor = SingleTaskExecutor::Make(context->GetTaskExecutor(), TaskExecutor::TaskType::UI); auto id = subContainer->GetRunningCardId(); + TAG_LOGI(AceLogTag::ACE_FORM, "FormPattern::OnAttachToFrameNode, cardId: %{public}" PRId64, id); FormManager::GetInstance().AddSubContainer(id, subContainer); uiTaskExecutor.PostDelayedTask( [id, nodeId = subContainer->GetNodeId()] { @@ -608,6 +609,7 @@ void FormPattern::OnModifyDone() } // Convert DimensionUnit to DimensionUnit::PX auto info = layoutProperty->GetRequestFormInfo().value_or(RequestFormInfo()); + TAG_LOGI(AceLogTag::ACE_FORM, "FormPattern::OnModifyDone, info.id: %{public}" PRId64, info.id); info.width = Dimension(width.ConvertToPx()); info.height = Dimension(height.ConvertToPx()); auto &&borderWidthProperty = layoutProperty->GetBorderWidthProperty();