mendraw/mendix/list_value

Provides typed access to Mendix list data sources.

Types

A typed FilterCondition value used by the list value capability.

pub type FilterCondition

A typed ListValue value used by the list value capability.

pub type ListValue

A typed SortDirection value used by the list value capability.

pub type SortDirection {
  Asc
  Desc
}

Constructors

  • Asc

    The Asc variant.

  • Desc

    The Desc variant.

A typed SortInstruction value used by the list value capability.

pub type SortInstruction

Controls whether Mendix should calculate the total item count.

pub type TotalCountRequest {
  RequestTotalCount
  SkipTotalCount
}

Constructors

  • RequestTotalCount

    Requests total-count calculation.

  • SkipTotalCount

    Skips total-count calculation.

Values

pub fn filter(lv lv: ListValue) -> option.Option(FilterCondition)

Returns the current filter condition.

pub fn has_more_items(lv lv: ListValue) -> option.Option(Bool)

Reports whether more items are available.

pub fn is_available(lv lv: ListValue) -> Bool

Reports whether the list data source is available.

pub fn items(
  lv lv: ListValue,
) -> option.Option(List(mendix.ObjectItem))

Returns the loaded list items.

pub fn limit(lv lv: ListValue) -> Int

Returns the current page size.

pub fn offset(lv lv: ListValue) -> Int

Returns the current page offset.

pub fn reload(lv lv: ListValue) -> Nil

Reloads the list data source.

pub fn request_total_count(
  lv lv: ListValue,
  request request: TotalCountRequest,
) -> Nil

Controls whether Mendix calculates the total item count.

pub fn set_filter(
  lv lv: ListValue,
  filter filter: option.Option(FilterCondition),
) -> Nil

Sets the filter.

pub fn set_limit(lv lv: ListValue, limit limit: Int) -> Nil

Sets the limit.

pub fn set_offset(lv lv: ListValue, offset offset: Int) -> Nil

Sets the offset.

pub fn set_sort_order(
  lv lv: ListValue,
  order order: List(SortInstruction),
) -> Nil

Sets the sort order.

pub fn sort(
  id id: String,
  direction direction: SortDirection,
) -> SortInstruction

Creates a sort instruction.

pub fn sort_direction(
  instr instr: SortInstruction,
) -> SortDirection

Returns the direction from a sort instruction.

pub fn sort_id(instr instr: SortInstruction) -> String

Returns the attribute identifier from a sort instruction.

pub fn sort_order(lv lv: ListValue) -> List(SortInstruction)

Returns the current sort instructions.

pub fn status(lv lv: ListValue) -> mendix.ValueStatus

Returns the list loading status.

pub fn total_count(lv lv: ListValue) -> option.Option(Int)

Returns the total item count when requested.

Search Document