Options
Menu

Encapsulates cross-control methods as a convenient wrapper.

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

Hierarchy

  • Browser

Index

Methods

Methods

getValue

  • getValue(control: UpObject, attr?: "text" | "key" | "value" | "store" | "selection" | "offset" | "from" | "to" | "datafield" | "operator" | "search"): string | boolean
  • Get the value from the given control.

    example
    Browser.getValue(ix.util.getHtml("<ELEMENT-GUID>"));
    

    Parameters

    • control: UpObject

      Reference to a HTML element or an upControl object.

    • Optional attr: "text" | "key" | "value" | "store" | "selection" | "offset" | "from" | "to" | "datafield" | "operator" | "search"

      Additional information for target control, depends on target control.

    Returns string | boolean

setValue

  • setValue(control: UpObject, value: string | number | boolean | object | Date, attr?: "text" | "key" | "value" | "store" | "selection" | "offset" | "from" | "to" | "datafield" | "operator" | "search", fireEvent?: true): boolean
  • Set the value for the given control.

    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"
    });
    

    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: "text" | "key" | "value" | "store" | "selection" | "offset" | "from" | "to" | "datafield" | "operator" | "search"

      Additional information for target control, depends on target control.

    • Optional fireEvent: true

      Trigger the onchange event (default: true).

    Returns boolean