Skip to content

How to programmatically set value #60

Description

@jonasrotilli

I have a text field that uses Numeral. When the user types, everything works perfectly.
When I try to programmatically put a value, the formatting is not done.
What's the secret for it to correct the formatting after I set a value?
Example:

TextField textTest= new TextField("Test");
new NumeralFieldFormatter(".", ",", 3).extend(textTest);

//If I set a value:
textTest.setValue("1234.4");

It's not formatted, it's only if the user modifies anything.

I use in Vaadin 23.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions