Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The XdevPasswordField is a single-row input field that automatically replaces all the characters with points and, thus, exclusively allows hidden inputs. However, the XdevPasswordField does not provide any protection during data transfer. If the data transfer is not encrypted via HTTPS, the inputs are converted to plain text and can, therefore, be easily read. The XdevPasswordField is a form component, and it can be persisted via XdevFieldGroup.

...

  • Allocate content - Allocates a text as string to the XdevPasswordField. This may trigger a textChange or valueChange event. 
    This is the simplest type of allocation. However, it is 100% functional only with strings. When this method is used, diverse converters deliver an unsatisfactory output

    Code Block
    languagejava
    themeConfluence
    passwordField.setValue("Hello 123 !!!");


  • Allocate content - Allocates a specific value to the XdevPasswordField. As an example, a BigDecimal data type for currencies or Double for specific formatting with decimal places, etc.
    When this type of allocation is employed, the delivered converter functions optimally.

    Code Block
    languagejava
    themeConfluence
    Property<BigDecimal> betrag = new ObjectProperty<BigDecimal>(new BigDecimal(100), BigDecimal.class);
    passwordField.setPropertyDataSource(betrag);

    or

    Code Block
    languagejava
    themeConfluence
    Property<Double> betrag = new ObjectProperty<Double>(new Double(100), Double.class);
    passwordField.setPropertyDataSource(betrag);


  • Change content - If a property is already allocated to the XdevPasswordField (refer to example 2), the value can be changed directly in the property in this abbreviated form without setting a new data source.

    Code Block
    languagejava
    themeConfluence
    passwordField.setConvertedValue(200);


  • Read content

    Code Block
    languagejava
    themeConfluence
    String content = passwordField.getValue();


  • Delete content - Deletes the entire content in XdevPasswordField. This may trigger a textChange or valueChange event.

    Code Block
    languagejava
    themeConfluence
    passwordField.clear();


  • Cursor setzenSet cursor - Set the cursor to a specific position. The position is specified as int value.

    Code Block
    languagejava
    themeConfluence
    passwordField.setCursorPosition(10);


  • Set focus - Allocates the focus to the XdevPasswordField. This can trigger a focus event, if necessary.

    Code Block
    languagejava
    themeConfluence
    passwordField.focus();


  • Select content

    Code Block
    languagejava
    themeConfluence
    passwordField.selectAll();


...