vaadin 14+ - charts - change drillup button text - highcharts

How do I change the text of the drillup button in a chart?
E.g. to translate it?
Example: How to change the Text of "Back to hauptserie"

The text can be set via Lang object using Lang#setDrillUpText.
Lang lang = new Lang();
lang.setDrillUpText("Zurück zur Hauptserie");
ChartOptions.get().setLang(lang);
https://vaadin.com/api/platform/23.3.5/com/vaadin/flow/component/charts/model/Lang.html#setDrillUpText(java.lang.String)
However in Vaadin 14 the Lang object is not supported. This improvement came post Vaadin 14. Chart version 21.0.9 however is known to work with Vaadin 14, and has the support for Lang object.
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-charts-flow</artifactId>
<version>21.0.9</version>
</dependency>

Related

Ionic IOS ngx-translate

i have any problems with ngx.translate on IOS.
On android device all function perfectly but on IOS ngx-traslate not work.
In the main view i can choose the language, if i choose "fr" i set "fr" in db and then i take the value from db and use : this.translate.use(lng);
In db i change correctly the value, indeed the json that i download (in other views) is with the right language, but the variable on html code {{ 'MONTH.JENUARY' | translate }} it don't take the value.
Why on ios not work?
I tried to update ngx-translate, i tried to use ionViewWillEnter, but I don't understand because it works on android and not on ios
can someone help me?

GridRowDragger in Vaadin 21 missing?

I'd like to use this "Drag and Drop Reorder of Rows in Grid"-code in Vaadin 21: https://demo.vaadin.com/sampler/#ui/drag-drop/grid-reorder-rows-html5
Unfortunately I don't find the com.vaadin.ui.components.grid.GridRowDragger<T> class in Vaadin 21.
Is there any replacement / substitution?

Reindeer.BUTTON_LINK in Vaadin 8

I am trying to have button which looks like a link in Vaadin 8.2.0. I am developing in Netbeans 8.2. I found this piece of code:
Button btn = new Button("Click Here");
btn.setStyleName(Reindeer.BUTTON_LINK);
But, it seems that in Vaadin 8 there is not such a Reindeer class. Is there any alternative?
Alternatively: ValoTheme.BUTTON_LINK
See Javadoc.
BaseTheme.LINK_STYLE should work in v8

IOS xpages date picker return "This field is not a valid date" when submitting a document

I am using a simple page with 1 text field.
Display type = Date/time
Display format = Date only
Date style = default
It works on a browser on the pc but on an iPad it returns "This field is not a valid date"
I notice that when picking a date on the iPad the format is different.
On a browser it is "Apr 21, 2017"
On the iPad "21 apr. 2017"
What am I doing wrong?
regards,
Peter
I created a PMR for this and IBM came up with this workaround.
Why it happens since FP8 and not before is not mentioned.
On mobile there is a iOS picker, which allows you to select the date. An user cannot add an invalid date, so therefore client side validation is not technically required. You would allow the data to go to the server and check server validation there.
On web it is different, as in there is a date time picker and an edit box so user's can enter anything.
The client side validation is only checking that invalid data is not entered (not possible on mobile because of the native iOS/Android pickers
The server validation checks things like if it is expecting constraints such as date must be between last year & this year etc
So the suggested workaround is to can turn client side validation off for certain controls on mobile. And leave it one for web.
There is a snippet of code on the date time control which will check whether you are on mobile or web and set this to true or false based on that
<xp:this.disableClientSideValidation><![CDATA[#{javascript:
if(deviceBean.isMobile()){
return true;
}else if(deviceBean.isTablet()){
return true
}else{
return false;
}}]]></xp:this.disableClientSideValidation>
IBM Reports the fix wil be in release 9.0.1.FP9. IBM proposes another workaround. See below.You can create a custom theme in your app, with the following:
<theme extends="Bootstrap3_flat" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="platform:/plugin/com.ibm.designer.domino.stylekits/schema/stylekit.xsd" >
<control>
<name>InputField.DateTimePicker</name>
<property baseValue="com.ibm.xsp.DateTimeHelper">
<name>rendererType</name>
<value>com.ibm.xsp.theme.bootstrap.form.InputDateDetect</value>
</property>
<property>
<name>disableClientSideValidation</name>
<value>#{deviceBean.mobile || deviceBean.tablet}</value>
</property>
</control>
</theme>
Then in xsp.properties, choose the custom theme in the application theme dropdown Themes
help doc: https://www.ibm.com/support/knowledgecenter/SSVRGU_9.0.0/com.ibm.designer.domino.ui.doc/wpd_theme.html
The effect of this is to disable client side validation for date time picker controls on mobile devices only.

Windows phone: How do I globalize/localize application title text in App list and tile

I use resource string for text appear in xaml pages by using these
{Binding Path=LocalizedResources.AppName, Source={StaticResource LocalizedStrings}}
But where and how do I globalize application title in App list and Tile? Is it in WMAppManefist.xml? I tried the above syntax in App Title and token Title but don't seem to work.
Having followed an article provided by Alaa Masound be sure to use:
#AppResLib.dll,-101
instead of:
#AppResLib.dll,-200
as your tile title, as defined in Microsoft resource dll template (AppResLib.rc):
#define AppTitle 100
#define AppTileTitle 101
So the reason for the problem is a discrepancy between Microsoft source code and its description.

Resources