Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "ipservant"

Hello,

I'm struggling on a thing that looks fairly simple at first sight, but I didn't find the right hint yet... We have the situation in an AppService where we need to call another web service (a document converter) and provide him with a callback URL of one of our host controllers.

Now the question is, how do I get the equivalent to AppConsts.remoteServiceBaseUrl in the host AppService? To me the value of the appsettings.json ServerRootAddress would make sense to use, but how can I get that in an AppService?

Thanks for your help!

Hello,

We are trying to translate the "Choose" label in p-fileupload with the l() function, can you please advise how to do that properly? Thanks in advance!

<div class="uploadArea">
                            <!--<img src="{{iDfamilyImage}}" width="200" height="200" class="img-thumbnail img-rounded" />-->
                            <p-fileUpload multiple="true"
                                          id="DefaultFileUploadFileInput"
                                          name="DefaultFileUploadFileInput[]"
                                          [url]="uploadUrl"
                                          accept=".tiff,.jpeg,.jpg,.tif,.png"
                                          showUploadButton="false"
                                          showCancelButton="false"
                                          maxFileSize="16000000"
                                          (onUpload)="onUpload($event)"
                                          (onError)="onError($event)"
                                          (onBeforeUpload)="onBeforeUpload($event)"
                                          (onBeforeSend)="onBeforeSend($event)"
                                          dragDropSupport="true"
                                          auto="true">
                            </p-fileUpload>
                        </div>
                        
                        ```

Hi,

We're using Angular in the front-end and need to create a new view that collects data from different AppServices. What we want to achieve:

  • Views should be draggable (already found a solution with ngDraggable here) and non-modal
  • Views should be multi-instance (user can open as many of them as he wants and maybe minimize them)
  • Views persist while the user navigates pages in the main application
  • Views get created when the user clicks on "Actions->View" from several RAD-generated tables or other places, so we need a 'global' function like openNewView(someID) to initiate a new view instance.

I've done a lots of research but am still not sure which way to go (and also still learning Angular). Shall we append this to the app.compoment.ts? Using ViewChildren maybe?

I'd be very thankful for some advice and even more for a few lines of code as hint on how to correctly implement/declare this view 'skeleton' in general so that it fits Zero best.

Thanks, AD

Hi,

I'd like to use sortMode="multiple" (see here https://primefaces.org/primeng/#/table/sort), where you can select multiple columns to sort by when you CTRL+Click them.

I added sortMode here:

<p-table #dataTable
                                     (onLazyLoad)="getAktenkorrespondenzen($event)"
                                     [value]="primengTableHelper.records"
                                     sortMode="multiple"
                                     rows="{{primengTableHelper.defaultRecordsCountPerPage}}"
                                     [paginator]="false"
                                     [lazy]="true"
                                     [scrollable]="true"
                                     ScrollWidth="100%"
                                     [responsive]="primengTableHelper.isResponsive"
                                     [resizableColumns]="primengTableHelper.resizableColumns">

Now I'm able to select multiple columns, but this.primengTableHelper.getSorting(this.dataTable) remains undefined.

Single sorting works fine as soon as I remove sortMode.

Do you have an idea how to correctly implement multi sort?

Thank you in advance! IPS

Hi, I am forced to use a very special DBMS and we are happy that it at least works with NHibernate. Thus I am using ABP-NHibernate stuff.

So far it works quite well (after some crunches in the beginning). I get my data off the DB and I can use sync LINQ at least. But when it comes to writing to the DB it seeminly works out NOOPs. At least the Debugging measures of NHibernate do not print any SQL insert statements.

What I am trying to do: some controller calls this Manager class' SaveAsync:

    private readonly IObjekteRepository _objRepo;

    public async Task SaveAsync(OBJEKTE entity)
    {
        try
        {
            OBJEKTE res = await _objRepo.InsertAsync(entity);
        }
        catch (Exception h)
        {
            //works well actually
        }
    }

The IObjekteRepository is just an empty derivation of yours in a 2 step process (all needed for DI):

 public class ObjekteRepository : AdsRepositoryBase&lt;OBJEKTE, string&gt;, IObjekteRepository
 {
    public ObjekteRepository(INhIpsSessionProvider sessionProvider) : base(sessionProvider)
    {
    }
}

and finally :

/// &lt;summary&gt;
/// Base class for all repositories based on ADS via NHibernate in this application.
/// &lt;/summary&gt;
public abstract class AdsRepositoryBase&lt;TEntity, TPrimaryKey&gt; : NhRepositoryBase&lt;TEntity, TPrimaryKey&gt;
    where TEntity : class, IEntity&lt;TPrimaryKey&gt;
{
    protected AdsRepositoryBase(ISessionProvider sessionProvider)
        : base(sessionProvider)
    {
    }

    //add common methods for all repositories
}

So because I do not directly use NH but via your NhRepository, let me understand what's going wrong with it? is it because of the string Template as ID? Writing not supported?

I have also implemented a generator for NH and if this is commented in, it will also be invoked. Just the INSERT never happens. I boiled everything down to a very simple insertion but it is not even shown up in the log. Still I am getting a success result. What is still going wrong? File OBJEKTE.hbm.xml:

<class name = "OBJEKTE" > <id name="Id" column="INT_ID"> <!--<generator class="IPSweb.AdsNHibernate.Gen.IpsHiLoGenerator, IPSweb.AdsNHibernate" > </generator>--> </id>

EDIT: Well actually after overriding the Insert method of the Repository using my own implementation of Save() NHibernate still won't do an Insert to the DBMS. Seems like a NHbiernate with ADS problem. But any hints are welcome

Hello,

What is the suggested way to create individual views to display (and later edit) data from multiple tables/entities? We have worked with the RAD tool already, this is a great start but limited to the standards of course. The goal now is to show data from several entities in some sort of overview tab, in some cases process or calculate on the data prior to showing it to the user.

Would also be great being able to open multiple of these overview pages at the same time - either as new browser tab or some kind of floating element in the main tab.

Thank you for letting us know the best practices for Zero before we're starting in a specific direction.

Hi, in our situation, we want to use two DBs for our application. Because it is the web port of an existing App, we still need access to the old DB data. And that DBMS is barely supported by NHibernate, not talking about EF core.

So my approach is to keep the MyApp.EntityFrameworkCore assembly as is AND create a new Assembly MyApp.NHibernateAccess Then all the User, Role, Log, ... access will be made using EF core (as in the downloaded template) and my access to the existing data would go via repositories to the old DBMS via NHibernate.

Is this a known or valid way to have several IRepository<> of different ORMs? I anticipate some problems when IoC-resolving just a IRepository<EntityX>. Well, I could just restrict myselt to creating custom IBlaBlaRepository repositories. And they should be resolved by Windsor Castle just fine.

Here are some problems that I had when trying this approach:

I followed basically the steps off ASP.Net boilerplate to using NHibernate. (https://aspnetboilerplate.com/Pages/Documents/NHibernate-Integration)

So I crated a module (as abp supposes) and depended on AbpNHibernateModule.

    [DependsOn(typeof(AbpNHibernateModule))]
    [DependsOn(typeof(IPSwebCoreModule))]
    public class MyAppdsDataModule : AbpModule
    {

This causes AbpNHibernateModule to IoC-register it's verions of UnitOfWork implementations. Which gives me an exception in MyApp.EntityFrameworkCore.DatabaseCheckHelper :

Exception : "Unable to cast object of type 'Abp.EntityFrameworkCore.Uow.EfCoreUnitOfWork' to type 'Abp.NHibernate.Uow.NhUnitOfWork'."

At:

            try
            {
                using (var uow =_unitOfWorkManager.Begin())  <<----
                {

So the question rather goes like: Is there a place to further configure the IoC-Container to return the right type depending on a string or requesting type (feature of WC)? or is there a need to include [DependsOn(typeof(AbpNHibernateModule))]? Because if I leave this commented out, it does not create conflicting IoC-registrations.... So far... just being confused.

Hi, eger to add a new page to the navigation. Like so:

new AppMenuItem('Editions', 'Pages.Editions', 'flaticon-app', '/app/admin/editions'), I wantet do give it its own icon. But I can't make sense of that flaticon-* stuff. Seems to be a font in different formats but what are the supported names and what icons are included in there. Please give me some starting point.

Maybe that also explains how I could possibly extend the supplied icon set with my own or downloaded ones.

Showing 11 to 18 of 18 entries