Starts in:
2 DAYS
3 HRS
16 MIN
39 SEC
Starts in:
2 D
3 H
16 M
39 S

Activities of "cbogner85"

  • ABP Framework version: v6.0.0-rc.4
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no

Hello,

I extended IdentityUser with some properties. Since 6.0.0-rc.3, users can edit these properties themselves by navigating to My Account > Personal Information. While this might be helpful in some situations, in my setup it is critical that the user may NOT edit the properties (e.g. I use them to set special discount conditions).

Is this a bug or was this intentionally added? If the latter, it would have been great if this had been announced before, as this might be a critical change for some users like me. I only discovered it by accident.

We can hide properties by setting: options.UI.OnTable.IsVisible = false; options.UI.OnEditForm.IsVisible = false; options.UI.OnCreateForm.IsVisible = false;

However this hides the properties in administrative User Management UI as well. I want the properties to be set only by administrative users. What can I do? It would be the best if we could set for every property whether the user can edit it himself.

Thanks and best Claus

Hi,

sorry for my late response. Of course I can share the steps to reproduce. It's very easy to reproduce:

  1. create new MVC commercial project (abp 5.3 rc.3) without public website:

  2. add cmskit pro via abp cli:

  3. an empty migration is created:

Best regards Claus

Hi @liangshiwei,

thanks for your blazing-fast reply! After some additional testing, I found out that it works as expected (and as the documentation states). It is just as easy as manually adding the CmsKit.Pro module to my single application. However, it doesn't create the required tables. The created migration is empty. I could also reproduce this behavior by creating a single dummy application with 5.3.0 rc-3 and adding the cmskit. It also creates an empty migration. hat's why I assumed CmsKit would expect a public website.

After adding the required tables manually (by creating the sql script from other database) it works as I expected.

Thanks for your support and maybe the empty migration error will be fixed in a future version. :)

Best regards Claus

Hello,

in one of my applications, all users have to be registered and logged in to use the app. Now I'd like to implement some CMS features, such as Blogs, Ratings,... how can I accomplish it, since CMS kit seems to be related only to public website? I added a "dummy" public website, because without the public web, abp cli it didn't create the necessary database migrations. Now I have the required tables, however I can't add e.g. the rating component since the ViewComponents namespace is Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Rating and thereforce I can't access it from the "non-public" website.

What can I do to use CMS kit in non-public website?

Thanks and best Claus

Thank you liangshiwei,

it works!

Best regards Claus

  • ABP Framework version: v4.3.3
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no

Hello,

when I consume an AppService via REST, JsonProperty names are not applied. It always returns C# name in camelCase. I found the following issues, stating that it should have been fixed in 4.3: GitHub abp Support

However, the phenomenon still exists in 4.3.3:

Also tried to create a new test project with abp suite in 4.3.3, same result:

What am I missing?

Thanks an best regards Claus

Answer

Earlier versions suite was generating AppService names singular. With version 4.3 we realised suite started to generate new service names plural.

Sample:
Old: ProductAppService
New: ProductsAppService

Is this a new approach for naming convention? Or is this a bug in the templates? The generated .cs class file name is also still singular.

Hi ABP team,

I'd also like to know whether this was accidently implemented or it's a design change. Please let us know :)

Thanks, Claus

Hi there; Sorry I don't have an answer to your question. But Im also a DevExtreme user and have found it difficult to integrate DevExtreme with ABP.IO (and aspnetzero).

Do you have problems with the .Key("id") part? i've found that since ABP uses inherited ID numbers, DevExtreme has a hard time finding the ID. i've had limited success working with the JSON configuration (camel case vs pascal case).

Sorry, didn't mean to hijack your post, Im looking forward to their response as well.

Best, --Dave

Hi Dave,

No problem :-)

With ASP.NET Zero, I used DevExtreme jQuery version instead of the HTML wrappers as suggested by ABP developers. It worked great, however I couldn't use benefits of the wrappers such as syntax highlighting etc.

With abp.io Commercial I started to use DevExtreme ASP.NET Core Controls/ wrappers as described in the following community article: Using DevExtreme Components with the ABP Framework.

I think the most important part is to create specific AppService methods for DevExtreme. E.g. I create a GetDxListAsync method that mirrors standard GetListAsync behaviour but uses DataSourceLoadOptions as input paramter and returns LoadResult instead of PagedResultDto. If you use standard ABP methods, it works as well, however DevExtreme pagers won't work and you'd have to use nested json field names, e.g. items.id as id parameter.

Regarding PascalCase/ camelCase: The community article suggests to use JsonProperty attributes to change ABP's behaviour of converting names to camelCase. I don't do this as I prefer camelCase in json objects. If you don't set JsonProperty, you can just use id or productName as field names (as in my snippet above) instead of Id or ProductName. However, if you want to use columns.AddFor(m => m.ProductName); it won't work with pascalCase. Therefore I created an extension method AddCamelCaseFor as suggested by DevExpress Support (How to enable camel case for DevExtreme MVC Controls / MVC Controls - How to allow CamelCase for AddFor methods.

Let me know if I can assist further.

Best Claus

Hi liangshiwei,

I'm using non tiered architecture.

Therefore, this snippet:

private void ConfigureAutoApiControllers() 
{ 
    Configure<AbpAspNetCoreMvcOptions>(options => 
    { 
        options.ConventionalControllers.Create(typeof(MyProjectNameApplicationModule).Assembly); 
    }); 
} 

worked like a charm, thank you! I was hoping for such a simple solution but couldn't find it myself :-) Thanks!

Hello,

I'm currently developing a webshop. Therefore I thought of having the product list and order process in public website, while admin tasks should be in the backend interface.

My problem is that I can't get access to the entities from web public. I noticed that I can inject e.g. the IProductAppService in Controllers, however, I can't access JavaScript API Controllers. Something like

var productService = window.myWebShop.products.products;
...

doesn't work (of course in backend app it works).

Additionally, I use DevExtreme for ASP.net Core and here I also can't access API Controllers (since the backend has a different port, it creates a wrong Controller URL). So, this:

Html.DevExtreme().DataGrid<Product>()
            .DataSource(d => d.Mvc()
                .Controller("Product") // Application Service Name without 'AppService'
                .LoadAction("GetList") // Method Name without 'Async'
                .Key("id")
            )

doesn't work, too.

I also tried to set RemoteServices of public website's appsettings.json to the location of the backend, but it didn't work either:

  "RemoteServices": {
    "Default": {
      "BaseUrl": "https://localhost:44309"
    }
  },

Could you please point me into the right direction? I think I might have to register AbpServiceProxies somewhere?

Thanks and best regards Claus

Showing 21 to 30 of 41 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06