Encapsulates cross-control methods as a convenient wrapper.

This methods will use the target controls internal functions, that can also be used directly (check the documentation of the target control).

Hierarchy

  • Browser

Methods

Methods

  • Get the value from the given control.

    Parameters

    • control: UpObject

      Reference to a HTML element or an upControl object.

    • Optional attr: BrowserGetValueAttr

      Additional information for target control, depends on target control.

    Returns string | boolean

    Example

    Browser.getValue(ix.util.getHtml("<ELEMENT-GUID>"));
    
  • Set the value for the given control.

    Parameters

    • control: UpObject

      Reference to a HTML element or an upControl object, whose value is to be set.

    • value: string | number | boolean | object | Date

      Control value to set.

    • Optional attr: BrowserGetValueAttr

      Additional information for target control, depends on target control.

    • Optional fireEvent: true

      Trigger the onchange event (default: true).

    Returns boolean

    Example

    General

    Browser.setValue(ix.util.getHtml("<ELEMENT-GUID>"), "Hallo Welt!");
    

    Example

    Distribution-/Multiselect-Control

    // strModus: append | replace
    Browser.setValue(ix.util.getHtml("<ELEMENT-GUID>"), ["GUID1", "GUID2"], {
    bAsync: false,
    strModus: "append"
    });

    Example

    UpIntegerControl | UpCurrencyControl | UpFloatControl

    Browser.setValue(ix.util.getHtml("<ELEMENT-GUID>"), 1.5);
    

    Example

    upFilterCtrlRangeof | upFilterCtrlCalendar

    // set from current date - 5 days until now
    Browser.setValue(ix.util.getHtml("<ELEMENT-GUID>"), {
    from: Helper.dateAdd("d", 5, new Date()),
    to: new Date()
    });
    Browser.setValue(ix.util.getHtml("<ELEMENT-GUID>"), {
    from: ",,-5,,,",
    to: ",,,,,"
    });

    Example

    upFilterCtrlOperator

    Browser.setValue(ix.util.getHtml("<ELEMENT-GUID>"), {
    datafield: "datafieldGUID",
    operator: "contains",
    search: "test"
    });