Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ContentListReferenceField<T>

Represents a Reference list field on a Content object. Example:

let myTask = repository.Load('/Root/MyTasks/Task1', {expand: ['Versions']}).subscribe(versions => {
    task.Versions.GetContent(versions => {
        console.log('The available versions are:', versions);
    })
}, 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

  • Gets the current referenced values.

    Parameters

    • Optional odataOptions: IODataParams<T>

      Additional options to select/expand/etc...

    Returns Observable<SavedContent<T>[]>

    An observable that will publish the list of the referenced content

GetValue

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

    The reference value (content Path list) 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 list references (for expanded fields) from an OData response's field

    Parameters

    • fieldData: DeferredObject | T[]

      The DeferredObject or ContentOptions data that can be used

    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