Activities of "EngincanV"

Hi @mukremin, what is the ABP version of your application?

I've shared the solution with you via mail and it should fix your problem. So, I close the question, if you encounter a problem please feel free to re-open the question.

Best regards.

So you mean you are not using the dynamic form tag anymore ?

Yes, if the model has ExtraProperties property then dynamic-form try to create inputs for this property and therefore it duplicates input tags.

The problem will be fixed in the next release, you can either wait for the next release and upgrade or try to override the CreateModal and UpdateModal as mentioned above comment.

Hi @learnabp, as you've mentioned problem was related with dynamic-form creating 3 form-group for ExtraProperties. To be able to solve this problem, we've changed it as a form tag.

You can override the CreateModal and UpdateModal razor pages for Plan as below to fix this problem:

  • CreateModal.cs(Pages/Payment/Plans/CreateModal.cshtml)
@page

@using Microsoft.Extensions.Localization
@using Volo.Abp.Data
@using Volo.Payment.Admin.Web.Pages.Payment.Plans
@using Volo.Payment.Admin.Web.Pages
@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal
@using Volo.Abp.Localization
@using Volo.Abp.ObjectExtending
@inherits PaymentAdminPageBase
@model CreateModalModel
@inject IStringLocalizerFactory StringLocalizerFactory

@{
    Layout = null;
}

<form asp-page="/Payment/Plans/CreateModal">
    <abp-modal>
        <abp-modal-header title="@L["NewPlan"].Value"></abp-modal-header>
        <abp-modal-body>
            <abp-input asp-for="ViewModel.Name" />

            @foreach (var propertyInfo in ObjectExtensionManager.Instance.GetProperties<CreateModalModel.PlanCreateViewModel>())
            {
                if (!propertyInfo.Name.EndsWith("_Text"))
                {
                    if (propertyInfo.Type.IsEnum || !propertyInfo.Lookup.Url.IsNullOrEmpty())
                    {
                        if (propertyInfo.Type.IsEnum)
                        {
                            Model.ViewModel.ExtraProperties.ToEnum(propertyInfo.Name, propertyInfo.Type);
                        }

                        <abp-select asp-for="ViewModel.ExtraProperties[propertyInfo.Name]"
                                    label="@propertyInfo.GetLocalizedDisplayName(StringLocalizerFactory)"
                                    autocomplete-api-url="@propertyInfo.Lookup.Url"
                                    autocomplete-selected-item-name="@Model.ViewModel.GetProperty(propertyInfo.Name + "_Text")"
                                    autocomplete-selected-item-value="@Model.ViewModel.GetProperty(propertyInfo.Name)"
                                    autocomplete-filter-param-name="@propertyInfo.Lookup.FilterParamName"
                                    autocomplete-items-property-name="@propertyInfo.Lookup.ResultListPropertyName"
                                    autocomplete-display-property-name="@propertyInfo.Lookup.DisplayPropertyName"
                                    autocomplete-value-property-name="@propertyInfo.Lookup.ValuePropertyName">
                        </abp-select>
                    }
                    else
                    {
                        <abp-input type="@propertyInfo.GetInputType()"
                                   asp-for="ViewModel.ExtraProperties[propertyInfo.Name]"
                                   label="@propertyInfo.GetLocalizedDisplayName(StringLocalizerFactory)"
                                   asp-format="@propertyInfo.GetInputFormatOrNull()"
                                   value="@propertyInfo.GetInputValueOrNull(Model.ViewModel.GetProperty(propertyInfo.Name))"/>
                    }
                }
            }
        </abp-modal-body>
        <abp-modal-footer buttons="@(AbpModalButtons.Cancel | AbpModalButtons.Save)"></abp-modal-footer>
    </abp-modal>
</form>
  • UpdateModal.cshtml (Pages/Payment/Plans/UpdateModal.cshtml)
@page

@using Microsoft.Extensions.Localization
@using Volo.Abp.Data
@using Volo.Payment.Admin.Web.Pages.Payment.Plans
@using Volo.Payment.Admin.Web.Pages
@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal
@using Volo.Abp.Localization
@using Volo.Abp.ObjectExtending
@inherits PaymentAdminPageBase
@model UpdateModalModel
@inject IStringLocalizerFactory StringLocalizerFactory

@{
    Layout = null;
}

<form asp-page="/Payment/Plans/UpdateModal">
    <abp-modal>
        <abp-modal-header title="@L["Edit"].Value"></abp-modal-header>
        <abp-modal-body>
            <abp-input asp-for="Id"/>
            <abp-input asp-for="ViewModel.Name" />
            <abp-input asp-for="ViewModel.ConcurrencyStamp" />

            @foreach (var propertyInfo in ObjectExtensionManager.Instance.GetProperties<UpdateModalModel.PlanUpdateViewModel>())
            {
                if (!propertyInfo.Name.EndsWith("_Text"))
                {
                    if (propertyInfo.Type.IsEnum || !propertyInfo.Lookup.Url.IsNullOrEmpty())
                    {
                        if (propertyInfo.Type.IsEnum)
                        {
                            Model.ViewModel.ExtraProperties.ToEnum(propertyInfo.Name, propertyInfo.Type);
                        }

                        <abp-select asp-for="ViewModel.ExtraProperties[propertyInfo.Name]"
                                    label="@propertyInfo.GetLocalizedDisplayName(StringLocalizerFactory)"
                                    autocomplete-api-url="@propertyInfo.Lookup.Url"
                                    autocomplete-selected-item-name="@Model.ViewModel.GetProperty(propertyInfo.Name + "_Text")"
                                    autocomplete-selected-item-value="@Model.ViewModel.GetProperty(propertyInfo.Name)"
                                    autocomplete-filter-param-name="@propertyInfo.Lookup.FilterParamName"
                                    autocomplete-items-property-name="@propertyInfo.Lookup.ResultListPropertyName"
                                    autocomplete-display-property-name="@propertyInfo.Lookup.DisplayPropertyName"
                                    autocomplete-value-property-name="@propertyInfo.Lookup.ValuePropertyName">
                        </abp-select>
                    }
                    else
                    {
                        <abp-input type="@propertyInfo.GetInputType()"
                                   asp-for="ViewModel.ExtraProperties[propertyInfo.Name]"
                                   label="@propertyInfo.GetLocalizedDisplayName(StringLocalizerFactory)"
                                   asp-format="@propertyInfo.GetInputFormatOrNull()"
                                   value="@propertyInfo.GetInputValueOrNull(Model.ViewModel.GetProperty(propertyInfo.Name))"/>
                    }
                }
            }
        </abp-modal-body>
        <abp-modal-footer buttons="@(AbpModalButtons.Cancel | AbpModalButtons.Save)"></abp-modal-footer>
    </abp-modal>
</form>

Thanks @oshabani, I'll examine it and inform you asap.

I've tested just before and there is a problem indeed. Thanks for reporting the problem, it'll be fixed in the next release. FYI @learnabp

Can you send your application to engin.veske@volosoft.com?

Did you add DependsOn[typeof(ProjectControlDapperModule)] to your web module class as below:

//other depends on statements...
[DependsOn(typeof(ProjectControlDapperModule))]
public class MyWebModule : AbpModule 
{
    //...
}

But where can I get the update?

After we've updated the EasyCrm application, we'll inform you.

Can you create a new question and explain it in detail?

I posted a new ticket here https://support.abp.io/QA/Questions/2749/Getting-json-errors-while-deploying-code-on-testing-server

Thanks @safi, I close this issue since it's resolved.

Showing 271 to 280 of 456 entries
Made with ❤️ on ABP v9.2.0-preview. Updated on January 20, 2025, 10:27