IntegerValidator error after setValue() - Solved

Hi all.
I Have a TextField with a IntegerValidator, that works ok if put a value manually on the textfield. But in some cases, I set the value of the textfield via the setValue() method. In this case, on the interface, the Validator says that the value is not a Integer value, but it is…

Here the code:


secondlyInterval = new TextField("Intervalo em segundos");
            secondlyInterval.addValidator(new IntegerValidator("O intervalo precisa ser um número"));
            secondlyInterval.setColumns(5);
            this.addField("sencondlyInterval", secondlyInterval);
            
            repeatCount = new TextField("Qtde de Repetições");
            repeatCount.setDescription("Insira a quantidade de vezes que a tarefa deve ser repetida. Ela será realizada uma vez, e repetida pela quantidade de vezes definida neste campo.");
            repeatCount.addValidator(new IntegerValidator("O intervalo precisa ser um número"));
            repeatCount.setColumns(4);
            this.addField("repeatCount", repeatCount);
            
            ((FormLayout)getLayout()).setMargin(true);
            
            if(jobEntity.getId() != null && jobEntity.getTriggerSegundos() != null) {
                secondlyInterval.setValue(jobEntity.getTriggerSegundos().getIntervalo());
                repeatCount.setValue(jobEntity.getTriggerSegundos().getRepeticoes());
            }

Many thanks!

Its strange. If i conver the integer to String, it works:

secondlyInterval.setValue(jobEntity.getTriggerSegundos().getIntervalo().toString())

This is the normal behavior?

Thanks!

Update to 6.5.0 and it should work.

Many thanks!
I Will try!

Nice. It works! Many thanks again!