Struct ::exo::ui::UrlQuery

Overview

UrlQuery struct for the browser query.

This struct provides access to all query parameter of the actual page. It can be used to receive or set the query parameter.

The following parameter keys are preserved for specific cases:

  • search: The SqlQuery used for filtering the record view
  • status: List of status used for filtering the record view
  • show_filter: When true, the filter panel is shown
  • view: The typ of the record selection List, Tree, etc.
  • print: When true, show the record page in print view
  • columns: The table columns to show as String
  • subpage: Restricted
  • page: Restricted
  • modeler: Restricted
  • addon: Restricted
  • setting: The selected setting page
  • station: The selected station of the page
  • env: The selected environment
  • model: Restricted
  • record: The selected record uuid within the record view
  • root: Set with a record uuid, to show it as full page view

All other query parameter are free to be used. To prevent future breaking changes, prefix your parameters with a own tag like org_parameter_name.

Example get query parameter:

let query = exo::ui::UrlQuery::new();
assert!(query is exo::ui::UrlQuery);

Example empty UrlQuery:

let query = exo::ui::UrlQuery::empty();
assert!(query is exo::ui::UrlQuery);

Methods

fn new() -> UrlQuery

Creates a new UrlQuery from the url.

Example

let query = exo::ui::UrlQuery::new();
assert!(query is exo::ui::UrlQuery);
fn empty() -> UrlQuery

Creates a new empty UrlQuery.

Example

let query = exo::ui::UrlQuery::empty();
assert!(query is exo::ui::UrlQuery);

Protocols

protocol get query
let output = value.query

Allows a get operation to work.

protocol set query
value.query = input

Allows a set operation to work.

protocol get status
let output = value.status

Allows a get operation to work.

protocol set status
value.status = input

Allows a set operation to work.

protocol get show_filter
let output = value.show_filter

Allows a get operation to work.

protocol set show_filter
value.show_filter = input

Allows a set operation to work.

protocol get print
let output = value.print

Allows a get operation to work.

protocol set print
value.print = input

Allows a set operation to work.

protocol get tab
let output = value.tab

Allows a get operation to work.

protocol set tab
value.tab = input

Allows a set operation to work.

protocol get cols
let output = value.cols

Allows a get operation to work.

protocol set cols
value.cols = input

Allows a set operation to work.

protocol get columns_filter
let output = value.columns_filter

Allows a get operation to work.

protocol set columns_filter
value.columns_filter = input

Allows a set operation to work.

protocol get setting
let output = value.setting

Allows a get operation to work.

protocol set setting
value.setting = input

Allows a set operation to work.

protocol get station
let output = value.station

Allows a get operation to work.

protocol set station
value.station = input

Allows a set operation to work.

protocol get env
let output = value.env

Allows a get operation to work.

protocol set env
value.env = input

Allows a set operation to work.

protocol get template
let output = value.template

Allows a get operation to work.

protocol set template
value.template = input

Allows a set operation to work.

protocol index_get
let output = value[index]

Returns the url parameter value for the given custom key.

Example

let query = exo::ui::UrlQuery::empty();
query["test"] = "Hello";
assert_eq!(query["test"], "Hello");
protocol index_set
value[index] = input

Returns the url parameter value for the given custom key.

Example

let query = exo::ui::UrlQuery::empty();
query["test"] = "Hello";
assert_eq!(query["test"], "Hello");
protocol partial_eq
if value == b { }

Allows for partial equality operations to work.

protocol string_debug
println("{:?}", value)

Allows the value to be debug printed.

protocol string_display
println("{}", value)

Allows the value to be display printed.

protocol get view
let output = value.view

The list view style to show the records e.g. List, Table, Tree, Calender.

Example

let query = exo::ui::UrlQuery::empty();
query.view = "tree";
assert_eq!(query.view, "tree");
protocol set view
value.view = input

The list view style to show the records e.g. List, Table, Tree, Calender.

Example

let query = exo::ui::UrlQuery::empty();
query.view = "tree";
assert_eq!(query.view, "tree");
protocol get record
let output = value.record

The record uuid for the record to show on the search page.

Example

let query = exo::ui::UrlQuery::empty();
query.record = "2d245706-ca1c-48ae-9f99-1a55c50286a1";
assert_eq!(query.record, "2d245706-ca1c-48ae-9f99-1a55c50286a1");
protocol set record
value.record = input

The record uuid for the record to show on the search page.

Example

let query = exo::ui::UrlQuery::empty();
query.record = "2d245706-ca1c-48ae-9f99-1a55c50286a1";
assert_eq!(query.record, "2d245706-ca1c-48ae-9f99-1a55c50286a1");