Skip to main content

IShellListing

Instances of IShellListing represent the Objects inside the Listing View tree in the M-Files Client application UI. The interface is available for example from ActiveListing property of IShellFrame.

See the Overview chapter Listing View for more details how to operate the object.

Properties

NameTypeDescription
applicationNotifierApplicationNotifierApplication notifier for notifying the changes to all applications.
CurrentPathstringGets the current location as a path.
CurrentSelectionIShellItems
EventsIEventsReturns the event registering interface of the IShellListing interface.
IsActivebooleanChecks if this listing window is currently the active listing window.
ItemsIShellItems

Methods

NameDescription
ActivateListingMakes this listing window the active listing in the shell frame.
ActivateSelectedPerforms the default action for currently selected item.
AddListingItemAdds a new item to the relevant listings.
It is a new method added for vNext.
AddObjectFilePerform add file for MFD.
GetFolderNameReturns the display name of a folder in the current listing.
RefreshListingRefreshes the current listing.
RefreshObjectRefreshes the specified object in the listing.
RemoveListingItemRemoves an item or items in an array from the listing.
It is a new method added for vNext.
ReplaceFilePerform file replace.
SelectFolderMoves the selection to the folder item.
SelectNextFolderMoves the current selection to the next folder item.
SelectNextObjectMoves the current selection to the next object (object version) item.
SelectNextObjectFileMoves the current selection to the next object file.
SelectObjectFileSelects the object (object version) item.
SelectObjectOrObjectFileVersionSelects object or file version in the listing window.
SelectObjectVersionSelects the object file item.
SelectPrevFolderMoves the current selection to the previous folder.
SelectPrevObjectMoves the current selection to the previous object (object version) item.
SelectPrevObjectFileMoves the current selection to the previous object file item.
SetFolderOrObjectVersionSelectionStatesSelects or unselects both property folders and object versions.
SetFolderSelectionStatesSelects or unselects property folders.
SetObjectOrObjectFileVersionSelectionStatesSelects or unselects objects or object files.
SetObjectVersionSelectionStatesSelects or unselects object versions.
SetVirtualSelectionOverrides the items selection with a virtual selection. Items should be valid objects, otherwise the method will throw an exception
and selection will not be changed.
UnselectAllUnselects the current selection.
UpdateListingItemUpdate a the items in the listing.
It is a new method added for vNext.

Events

ContentChanged

Triggered when the current listing content is changed, or listed items are modified.

MFiles.Event.ContentChanged

Arguments:

  • shellItems : IShellItems Contains all items in the listing.

Example Code

const eventHandle = await shellListing.Events.Register(
MFiles.Event.ContentChanged,
(
shellItems, // [IShellItems](/UIExt2/Interfaces/IShellItems/)
) => {
// Handle event
},
);

// Later unregister the event
shellListing.Events.Unregister(eventHandle);

ListingActivated

Triggered when the listing object becomes active and receives the input focus.

MFiles.Event.ListingActivated

Arguments:

  • shellListing : IShellListing The previous active shell listing object. Can be null.

Example Code

const eventHandle = await shellListing.Events.Register(
MFiles.Event.ListingActivated,
(
shellListing, // [IShellListing](/UIExt2/Interfaces/IShellListing/)
) => {
// Handle event
},
);

// Later unregister the event
shellListing.Events.Unregister(eventHandle);

ListingDeactivated

Triggered when the listing object becomes inactive and loses the input focus.

MFiles.Event.ListingDeactivated

Arguments:

  • shellListing : IShellListing The next active shell listing object. Can be null.

Example Code

const eventHandle = await shellListing.Events.Register(
MFiles.Event.ListingDeactivated,
(
shellListing, // [IShellListing](/UIExt2/Interfaces/IShellListing/)
) => {
// Handle event
},
);

// Later unregister the event
shellListing.Events.Unregister(eventHandle);

ListItemAdded

MFiles.Event.ListItemAdded

Arguments:

  • objectVersion : object Object

Example Code

const eventHandle = await shellListing.Events.Register(
MFiles.Event.ListItemAdded,
(
objectVersion, // `object`
) => {
// Handle event
},
);

// Later unregister the event
shellListing.Events.Unregister(eventHandle);

ListItemModified

?

MFiles.Event.ListItemModified

Arguments:

  • oldServerObjVer : Array <any > Array
  • newObjVer : Array <any > Array

Example Code

const eventHandle = await shellListing.Events.Register(
MFiles.Event.ListItemModified,
(
oldServerObjVer, // `Array` <`any` >
newObjVer, // `Array` <`any` >
) => {
// Handle event
},
);

// Later unregister the event
shellListing.Events.Unregister(eventHandle);

ListItemRemoved

MFiles.Event.ListItemRemoved

Arguments:

  • listItem : Array <any > Array
  • removecExternalFolder : object Object

Example Code

const eventHandle = await shellListing.Events.Register(
MFiles.Event.ListItemRemoved,
(
listItem, // `Array` <`any` >
removecExternalFolder, // `object`
) => {
// Handle event
},
);

// Later unregister the event
shellListing.Events.Unregister(eventHandle);

SelectedItemsChanged

Triggered when one or more of the items that are currently selected are modified.

MFiles.Event.SelectedItemsChanged

Arguments:

Example Code

const eventHandle = await shellListing.Events.Register(
MFiles.Event.SelectedItemsChanged,
(
shellItems, // [IShellItems](/UIExt2/Interfaces/IShellItems/)
) => {
// Handle event
},
);

// Later unregister the event
shellListing.Events.Unregister(eventHandle);

SelectionChanged

Triggered when the selection in the listing view is set, changed or removed.

MFiles.Event.SelectionChanged

Arguments:

Example Code

const eventHandle = await shellListing.Events.Register(
MFiles.Event.SelectionChanged,
(
shellItems, // [IShellItems](/UIExt2/Interfaces/IShellItems/)
) => {
// Handle event
},
);

// Later unregister the event
shellListing.Events.Unregister(eventHandle);

SelectNextFolder

MFiles.Event.SelectNextFolder

Arguments:

  • folderType : number Number

Example Code

const eventHandle = await shellListing.Events.Register(
MFiles.Event.SelectNextFolder,
(
folderType, // `number`
) => {
// Handle event
},
);

// Later unregister the event
shellListing.Events.Unregister(eventHandle);

SelectNextObject

MFiles.Event.SelectNextObject

Event has no arguments

Example Code

const eventHandle = await shellListing.Events.Register(
MFiles.Event.SelectNextObject,
() => {
// Handle event
},
);

// Later unregister the event
shellListing.Events.Unregister(eventHandle);

SelectNextObjectFile

MFiles.Event.SelectNextObjectFile

Arguments:

  • allowMoveToNextObject : boolean Boolean

Example Code

const eventHandle = await shellListing.Events.Register(
MFiles.Event.SelectNextObjectFile,
(
allowMoveToNextObject, // `boolean`
) => {
// Handle event
},
);

// Later unregister the event
shellListing.Events.Unregister(eventHandle);

SelectPreviousFolder

MFiles.Event.SelectPreviousFolder

Arguments:

  • folderType : number Number

Example Code

const eventHandle = await shellListing.Events.Register(
MFiles.Event.SelectPreviousFolder,
(
folderType, // `number`
) => {
// Handle event
},
);

// Later unregister the event
shellListing.Events.Unregister(eventHandle);

SelectPreviousObject

MFiles.Event.SelectPreviousObject

Event has no arguments

Example Code

const eventHandle = await shellListing.Events.Register(
MFiles.Event.SelectPreviousObject,
() => {
// Handle event
},
);

// Later unregister the event
shellListing.Events.Unregister(eventHandle);

SelectPreviousObjectFile

MFiles.Event.SelectPreviousObjectFile

Arguments:

  • allowMoveToPrevObject : boolean Boolean

Example Code

const eventHandle = await shellListing.Events.Register(
MFiles.Event.SelectPreviousObjectFile,
(
allowMoveToPrevObject, // `boolean`
) => {
// Handle event
},
);

// Later unregister the event
shellListing.Events.Unregister(eventHandle);

SendTelemetry

MFiles.Event.SendTelemetry

Arguments:

  • telemetryEvent : TelemetryEvents TelemetryEvents
  • eventProperties : object Object

Example Code

const eventHandle = await shellListing.Events.Register(
MFiles.Event.SendTelemetry,
(
telemetryEvent, // `TelemetryEvents`
eventProperties, // `object`
) => {
// Handle event
},
);

// Later unregister the event
shellListing.Events.Unregister(eventHandle);

Started

Sent when the object turns to started state.

MFiles.Event.Started

Event has no arguments

Example Code

const eventHandle = await shellListing.Events.Register(
MFiles.Event.Started,
() => {
// Handle event
},
);

// Later unregister the event
shellListing.Events.Unregister(eventHandle);

Stop

Sent before the object is stopped.

MFiles.Event.Stop

Event has no arguments

Example Code

const eventHandle = await shellListing.Events.Register(
MFiles.Event.Stop,
() => {
// Handle event
},
);

// Later unregister the event
shellListing.Events.Unregister(eventHandle);