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 = new;
assert!;
Example empty UrlQuery:
let query = empty;
assert!;
Methods
Protocols
protocol index_get
let output = value
Returns the url parameter value for the given custom key.
Example
let query = empty;
query = "Hello";
assert_eq!;
protocol index_set
value= input
Returns the url parameter value for the given custom key.
Example
let query = empty;
query = "Hello";
assert_eq!;
protocol get view
let output = value.view
The list view style to show the records e.g. List, Table, Tree, Calender.
Example
let query = empty;
query.view = "tree";
assert_eq!;
protocol set view
value.view = input
The list view style to show the records e.g. List, Table, Tree, Calender.
Example
let query = empty;
query.view = "tree";
assert_eq!;
protocol get record
let output = value.record
The record uuid for the record to show on the search page.
Example
let query = empty;
query.record = "2d245706-ca1c-48ae-9f99-1a55c50286a1";
assert_eq!;
protocol set record
value.record = input
The record uuid for the record to show on the search page.
Example
let query = empty;
query.record = "2d245706-ca1c-48ae-9f99-1a55c50286a1";
assert_eq!;