Skip to content
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

MaterialComboBox LanguageOptions #422

Open
beppino opened this issue Oct 29, 2020 · 3 comments
Open

MaterialComboBox LanguageOptions #422

beppino opened this issue Oct 29, 2020 · 3 comments
Assignees
Labels

Comments

@beppino
Copy link

beppino commented Oct 29, 2020

Hi,
upgrading to GWT 2.9.0 and GMD 2.4.1 something goes bad with the setLanguage method of MaterialComboBox.
In my project, I've a method that I call for all MaterialComboBox instance (combobox.setLanguage(MaterialUtil.getComboBoxLanguageOptions())) where:

public static LanguageOptions getComboBoxLanguageOptions(){ LanguageOptions languageOptions = new LanguageOptions(); languageOptions.setNoResults(param1 -> "Nessun risultato..."); languageOptions.setErrorLoading(param1 -> "Problema nel caricamento..."); languageOptions.setInputTooLong(param1 -> "Testo troppo lungo..."); languageOptions.setInputTooShort(param1 -> "Testo troppo corto..."); languageOptions.setLoadingMore(param1 -> "Altri risultati..."); languageOptions.setMaximumSelected(param1 -> "Non puoi selezionare altri elementi..."); languageOptions.setSearching(param1 -> "Ricerca in corso..."); return languageOptions; }

Now, with 2.4.1, with this options the combobox doesn't function and on click report this error:

Throwable.java:117 Uncaught Error: java.lang.ClassCastException at CSy_g$.Mc_g$ [as createError_0_g$] (Throwable.java:117) at CSy_g$.Xc_g$ [as initializeBackingError_0_g$] (Throwable.java:109) at CSy_g$.Fc_g$ (Throwable.java:69) at CSy_g$.md_g$ (Exception.java:29) at CSy_g$.fH_g$ (RuntimeException.java:29) at new CSy_g$ (ClassCastException.java:27) at ynA_g$ (InternalPreconditions.java:154) at KnA_g$ (InternalPreconditions.java:138) at JnA_g$ (InternalPreconditions.java:133) at jSc_g$ (Cast.java:81) at Function.HvD_g$ (MaterialUtil.java:514)...

It's a bug or have I to change somethings?
Thanks
-g

@kevzlou7979
Copy link
Contributor

Ok I will dig into this issue, might be causing with the migration with GWT 2.9.

@kevzlou7979 kevzlou7979 self-assigned this Oct 29, 2020
@kevzlou7979
Copy link
Contributor

Oh I think the upgrade select2js has an issue , we might need to update how the GMD Combobox adapt the new version select2/select2#3799

@vokke
Copy link
Contributor

vokke commented Aug 23, 2021

For all getting here with this problem:
It's just the last option, throwing the exception:

languageOptions.setSearching(param1 -> "Ricerca in corso...");
<<
If you delete this option, Beppinos code still works in GWT 2.9.0 and GMD 2.5.0-rc1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants