-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2.5 -> 2.6 Error when adding the first column to the #215
Comments
Ok will take a look into this.
…On Tue, Oct 25, 2022 at 4:08 AM robertpic71 ***@***.***> wrote:
When i update my project from 2.5.0 to 2.6.0 or 2.6.1 my table wont build.
I get: "Cannot read properties of undefined (reading 'isHelpEnabled_0_g$')
TypeError: Cannot read properties of undefined (reading
'isHelpEnabled_0_g$')
at qHk_g$.zGk_g$ *[as isHelpEnabled_0_g$] (Column.java:557:1)*
at PKk_g$.WKk_g$ [as drawColumnHeader_0_g$] (BaseRenderer.java:322:1)
at dPk_g$.CEk_g$ [as renderColumn_0_g$] (AbstractDataView.java:530:1)
at dPk_g$.qDk_g$ [as insertColumn_6_g$] (AbstractDataView.java:1139:1)
at dPk_g$.CBk_g$ [as addColumn_9_g$] (AbstractDataView.java:1112:1)
at dPk_g$.BBk_g$ [as addColumn_8_g$] (AbstractDataView.java:1150:1)
at l7k_g$.j3k_g$ [as addColumn_8_g$] (AbstractDataTable.java:332:1)
at bu_g$.whl_g$ [as buildTable_0_g$] (MitarbeiterOverlay.java:111:1)
at bu_g$.Nhl_g$ [as onClick_0_g$] (MitarbeiterOverlay.java:198:1)
at Shl_g$.Thl_g$ [as onClick_0_g$]
(MitarbeiterOverlay_MitarbeiterViewUiBinderImpl.java:40:1)
at Uch_g$.IJf_g$ [as lambda$2_1_g$] (MaterialWidget.java:1487:1)
at vjg_g$.wjg_g$ [as onClick_0_g$] (MaterialWidget.java:1485:1)
at ERc_g$.FRc_g$ [as dispatch_4_g$] (ClickEvent.java:56:1)
at ERc_g$.GRc_g$ [as dispatch_1_g$] (ClickEvent.java:55:1)
at ERc_g$.wQc_g$ [as dispatch_0_g$] (GwtEvent.java:76:1)
at D_c_g$ (EventBus.java:40:1)
My view ..ui.xml
<m:MaterialRow marginTop="5" width="98%">
<m:MaterialColumn ui:field="maPanel" grid="l12 s12 m12">
<table:MaterialDataTable ui:field="maTable"
shadow="1"
useCategories="true"
useRowExpansion="false"
useStickyHeader="false"
/>
</m:MaterialColumn>
</m:MaterialRow>
<m:MaterialButton text="Laden" ui:field="btnload"/>
</ma:overlay.MaterialOverlay>
Java View
@UiField
MaterialDataTable<MitarbeiterDTO> maTable;
...
public void buildTable() {
if (maTable.getColumns().size() > 0) return;
maTable.setRowFactory(new MitarbeiterRowFactory());
maTable.addColumn(MitarbeiterDTO::getSbrName, "Mitarbeiter"); // error
maTable.addColumn(MitarbeiterDTO::getAppBezeichnung, "Typ");
maTable.addColumn(MitarbeiterDTO::getLeZugriff, "Le.Zugriff");
maTable.addColumn(MitarbeiterDTO::getLeZugriff, "Le.Besuch");
GMW Column.java
public Boolean isHelpEnabled() {
if (helpEnabled == null) {
Boolean defaultHelpEnabled = getDataView().isHelpEnabled();
helpEnabled = defaultHelpEnabled != null ? defaultHelpEnabled :
MaterialDataTable.getGlobals().isHelpEnabled(); // << error
}
return helpEnabled;
}
—
Reply to this email directly, view it on GitHub
<#215>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAX6EF63NKSSZ7OYSTBGQUTWE3UEVANCNFSM6AAAAAARNJ7IPM>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
THX. My dirty work-a-round:
I could not find the difference to your working demo :/ |
I have the same problem. It's a little curious, as in one table I only get it work when I use above workaround. However, other tables work without the workaround, at least the addColumn call. But there I have a problem with sorting the table; getting a IndexOutOfBoundsException also in the AbstractDataView. I assume it's connected, because in 2.5 everything was working. |
When i update my project from 2.5.0 to 2.6.0 or 2.6.1 my table wont build.
I get: "Cannot read properties of undefined (reading 'isHelpEnabled_0_g$')
TypeError: Cannot read properties of undefined (reading 'isHelpEnabled_0_g$')
at qHk_g$.zGk_g$ [as isHelpEnabled_0_g$] (Column.java:557:1)
at PKk_g$.WKk_g$ [as drawColumnHeader_0_g$] (BaseRenderer.java:322:1)
at dPk_g$.CEk_g$ [as renderColumn_0_g$] (AbstractDataView.java:530:1)
at dPk_g$.qDk_g$ [as insertColumn_6_g$] (AbstractDataView.java:1139:1)
at dPk_g$.CBk_g$ [as addColumn_9_g$] (AbstractDataView.java:1112:1)
at dPk_g$.BBk_g$ [as addColumn_8_g$] (AbstractDataView.java:1150:1)
at l7k_g$.j3k_g$ [as addColumn_8_g$] (AbstractDataTable.java:332:1)
at bu_g$.whl_g$ [as buildTable_0_g$] (MitarbeiterOverlay.java:111:1)
at bu_g$.Nhl_g$ [as onClick_0_g$] (MitarbeiterOverlay.java:198:1)
at Shl_g$.Thl_g$ [as onClick_0_g$] (MitarbeiterOverlay_MitarbeiterViewUiBinderImpl.java:40:1)
at Uch_g$.IJf_g$ [as lambda$2_1_g$] (MaterialWidget.java:1487:1)
at vjg_g$.wjg_g$ [as onClick_0_g$] (MaterialWidget.java:1485:1)
at ERc_g$.FRc_g$ [as dispatch_4_g$] (ClickEvent.java:56:1)
at ERc_g$.GRc_g$ [as dispatch_1_g$] (ClickEvent.java:55:1)
at ERc_g$.wQc_g$ [as dispatch_0_g$] (GwtEvent.java:76:1)
at D_c_g$ (EventBus.java:40:1)
Java View
...
public void buildTable() {
if (maTable.getColumns().size() > 0) return;
GMW Column.java
public Boolean isHelpEnabled() {
if (helpEnabled == null) {
Boolean defaultHelpEnabled = getDataView().isHelpEnabled();
helpEnabled = defaultHelpEnabled != null ? defaultHelpEnabled : MaterialDataTable.getGlobals().isHelpEnabled(); // << error
}
return helpEnabled;
}
The text was updated successfully, but these errors were encountered: