Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ContentReferenceField<T>

Represents a Reference field on a Content object. Example:

let myTask = repository.Load('/Root/MyTasks/Task1', {expand: ['Owner']}).subscribe(task => {
    task.Owner.GetContent(owner => {
        console.log('The Owner of the task is:', owner.DisplayName);
    })
}, error => console.error)

Type parameters

Hierarchy

Index

Constructors

constructor

Properties

FieldSetting

FieldSetting: ReferenceFieldSetting

Repository

Repository: BaseRepository

Protected _isDirty

_isDirty: boolean = false

Accessors

IsDirty

  • get IsDirty(): boolean

Methods

GetContent

GetValue

  • GetValue(): string | undefined
  • Returns string | undefined

    The reference value (content Path) that can be used for change tracking and content updates.

HandleLoaded

  • Updates the reference URL in case of DeferredObject (not-expanded-fields) or populates the Content reference (for expanded fields) from an OData response's Field

    Parameters

    Returns void

Search

  • Executes a search query to lookup possible values to the reference field

    Parameters

    • term: string

      This term will be searched in the _Text field

    • Default value top: number = 10

      The Top value for paging

    • Default value skip: number = 0

      The Skip value for paging

    • Default value odataParams: IODataParams<T> = {}

      The additional OData params (like select, expand, etc...)

    Returns FinializedQuery<T>

    The FinializedQuery instance that can be executed

    Example:

    reference.Search('Term').Exec().subscribe(hits=>{
         console.log(hits);
    });
    

SetContent

Generated using TypeDoc