Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
localzing the table content from updateLabels()
Is there a way to localize the table content when updateLabels() is called...
I have a Japanese locale and English locale. For the first time when table is created, the default English locale is used. When the locale is changed to JP, the content inside the table should be changed. I have key-value pairs in the resource bundle for the table content. But how can i update the content from updateLabels() method.
I have tried, setting the value of the property using table.getContainerDataSource().getContainerPropertyId(itemId, propertyId).setValue(localizedValue);
but it did not work, it gave me an error. In the logs, i could see that the localized japanese value came as "??" instead of the actual value. So I tried converting those unicode characters to UTF-8, but still i get the same error.
This is what i see in the logs.....
2012-03-12 14:17:30,847 INFO resourceBundleKey FAILURE
2012-03-12 14:17:30,847 INFO localized instance status ??
2012-03-12 14:17:30,847 INFO now setting the instance status to ??
Any one have any idea...
Thank your for your help.
Actually, i just fixed it. It was not a problem with Unicode characters or decoding. I had null property id. The table' column, whose data should be localized had a null property id. The property id was overwritten by the code. I fixed it and i also removed the Unicode- UTF-8 conversions. We do not require the conversion. The I18N returned value can be set as property value as it is.