exists

checks whether an item with the specified id exists

boolean exists(id id);

Parameters

ididthe id of an item

Returns

booleanreturns true if the item exists. Otherwise, false

Example

var id = 3;
if(view.exists(id)){    // true or false
  view.select(id);
  /* other logic */
}

See also
Back to top