OneIdentity / IdentityManager.Imx

HTML5 source code for Identity Manager web apps
Other
26 stars 107 forks source link

Not able to display a list of persons when I add a new component in Angular 14.3 (OIM version 9.2.0.261) as explained in tutorials #133

Closed jonathanduperrier closed 3 months ago

jonathanduperrier commented 3 months ago

Hello,

When we add a new component as explained in the tutorial video https://www.youtube.com/watch?v=zSSpul8Ez6g&list=PL242czeZwlAmhFqcLZP6KwlUiro6YWdI9&index=11

we have an error message (Could not find column with id "__Display")

The video #11 which show how to create a new page and get information of users.

We copied the same code as in sample-identities component.

When we try to display data of users we get this error message (Could not find column with id "__Display").

Even if the column “__Display” exist in “this.dstSettings.dataSource.Data” element as you can see from the screenshots.

The video of tutorial: https://www.youtube.com/watch?v=zSSpul8Ez6g&list=PL242czeZwlAmhFqcLZP6KwlUiro6YWdI9&index=11

Best regards

sample-identities.component.html Capture d’écran 2024-04-02 163430 sample-identities.component.ts Capture d’écran 2024-04-02 163455 Screenshot with issue: Capture d’écran 2024-04-02 170817

SebastianWeberQuest commented 3 months ago

Hi Jonathan,

you've made a small mistake in your TS code by nesting two data-tables.

image

Please use only the following code. Then it should works.

<h1 class="mat-headline">{{ '#LDS#Identities' | translate }}</h1>

<imx-data-source-toolbar
  #dst
  [settings]="dstSettings"
  (navigationStateChanged)="onNavigationStateChanged($event)"
></imx-data-source-toolbar>

<imx-data-table [dst]="dst" mode="manual">
  <imx-data-table-column [entityColumn]="schema?.Columns[DisplayColumns.DISPLAY_PROPERTYNAME]">
    <ng-template let-item>
      <div>{{ item.GetEntity().GetDisplay() }}</div>
      <div>{{ item.IdentityType.Column.GetDisplayValue() }}</div>
    </ng-template>
  </imx-data-table-column>
  <imx-data-table-column [entityColumn]="schema?.Columns.DefaultEmailAddress">
    <ng-template let-item>
      <div>{{ item.DefaultEmailAddress.Column.GetDisplayValue() }}</div>
    </ng-template>
  </imx-data-table-column>
</imx-data-table>

<imx-data-source-paginator [dst]="dst"></imx-data-source-paginator>
SebastianWeberQuest commented 3 months ago

sample-identity.zip

I've tested the attached code sample and it works for me.

jonathanduperrier commented 3 months ago

Thank you it was just a small mistake.