Table of Contents

Class NavigationOptions

Namespace
GroupeIsa.Neos.Designer.UIAbstractions
Assembly
GroupeIsa.Neos.Designer.UIAbstractions.dll

Represents the navigation options.

[ExcludeFromCodeCoverage]
[SuppressMessage("Minor Code Smell", "S2325:Methods and properties that don't access instance data should be static", Justification = "Stubs for transpilation.")]
public class NavigationOptions
Inheritance
NavigationOptions
Inherited Members

Constructors

NavigationOptions(RemoteId, string)

Initializes a new instance of the NavigationOptions class.

public NavigationOptions(RemoteId remoteId, string uiViewName)

Parameters

remoteId RemoteId

Remote id.

uiViewName string

UI view name.

NavigationOptions(UIViewId)

Initializes a new instance of the NavigationOptions class.

public NavigationOptions(UIViewId uiViewId)

Parameters

uiViewId UIViewId

UI view id.

NavigationOptions(string)

Initializes a new instance of the NavigationOptions class.

public NavigationOptions(string uiViewName)

Parameters

uiViewName string

UI view name.

Properties

Callback

Gets or sets the callback function called when the UI view is closed.

public Action<NavigationResult> Callback { get; set; }

Property Value

Action<NavigationResult>

Closeable

Gets or sets a value indicating whether the view is closeable by the user.

public bool? Closeable { get; set; }

Property Value

bool?

ContainerId

Gets or sets the container identifier.

public string? ContainerId { get; set; }

Property Value

string

Datasource

Gets or sets the shared data source.

public IDatasource<IUIView>? Datasource { get; set; }

Property Value

IDatasource<IUIView>

Filter

Gets the filter.

public Filter? Filter { get; }

Property Value

Filter

FrameId

Gets or sets the frame identifier.

public string? FrameId { get; set; }

Property Value

string

Icon

Gets or sets the icon.

public string Icon { get; set; }

Property Value

string

IconId

Gets the icon id.

public ImageId? IconId { get; }

Property Value

ImageId

Parameters

Gets the parameters.

public NavigationParameters Parameters { get; }

Property Value

NavigationParameters

PopupPosition

Gets or sets the popup position.

public PopupPosition PopupPosition { get; set; }

Property Value

PopupPosition

PopupSize

Gets or sets the popup size.

public PopupSize PopupSize { get; set; }

Property Value

PopupSize

Position

Gets or sets the position of the shared data source at the opening.

public int? Position { get; set; }

Property Value

int?

RemoteId

Gets the remote id.

public RemoteId RemoteId { get; }

Property Value

RemoteId

Target

Gets or sets the type of target where the navigation will occur (e.g. NewFrame, NestedFrame, SameFrame, Popup, etc.).

public NavigationTarget Target { get; set; }

Property Value

NavigationTarget

Title

Gets or sets the title.

public string? Title { get; set; }

Property Value

string

Remarks

ℹ️ Prefer leaving this value undefined when the title can come from the menu caption or the UI View metadata.

UIViewId

Gets the UI view id.

public UIViewId UIViewId { get; }

Property Value

UIViewId

UIViewName

Gets or sets the UI view name.

public string UIViewName { get; set; }

Property Value

string

UrlParameters

Gets the URL parameters.

public ReadOnlyDictionary<string, string> UrlParameters { get; }

Property Value

ReadOnlyDictionary<string, string>

Methods

OnTarget(NavigationTarget)

Sets the type of target where the navigation will occur (e.g. NewFrame, NestedFrame, SameFrame, Popup, etc.).

public NavigationOptions OnTarget(NavigationTarget target)

Parameters

target NavigationTarget

Type of target where the navigation will occur (e.g. NewFrame, NestedFrame, SameFrame, Popup, etc.).

Returns

NavigationOptions

The navigation options.

WithCallback(Action<NavigationResult>)

Sets the callback function called when the UI view is closed.

public NavigationOptions WithCallback(Action<NavigationResult> callback)

Parameters

callback Action<NavigationResult>

The callback action.

Returns

NavigationOptions

The navigation options.

WithCallback<TValue>(Action<NavigationResult<TValue>>)

Sets the callback function called when the UI view is closed.

public NavigationOptions WithCallback<TValue>(Action<NavigationResult<TValue>> callback)

Parameters

callback Action<NavigationResult<TValue>>

The callback action.

Returns

NavigationOptions

The navigation options.

Type Parameters

TValue

Type of the result value.

WithCloseable(bool?)

Sets the value indicating whether the view is closeable by the user.

public NavigationOptions WithCloseable(bool? closeable)

Parameters

closeable bool?

Value indicating whether the view is closeable by the user.

Returns

NavigationOptions

The navigation options.

WithCloseableOnClickOutside(bool?)

Sets the value indicating whether the view is closeable by the user on click outside.

public NavigationOptions WithCloseableOnClickOutside(bool? closeableOnClickOutside)

Parameters

closeableOnClickOutside bool?

Value indicating whether the view is closeable by the user on click outside.

Returns

NavigationOptions

The navigation options.

WithContainerId(string?)

Sets the container identifier.

public NavigationOptions WithContainerId(string? containerId)

Parameters

containerId string

Container identifier.

Returns

NavigationOptions

The navigation options.

WithCreationMode(bool?, object?)

Adds the creation mode parameter.

public NavigationOptions WithCreationMode(bool? creationMode, object? creationData = null)

Parameters

creationMode bool?

A value indicating whether the UI view is opened in creation mode.

creationData object

Object that contains data used to set initialize value in the opened UI view. The names of the object properties must match the names of the UI view properties using PascalCase.

Returns

NavigationOptions

The navigation options.

WithDataSharing<TUIView>(IDatasource<TUIView>?, int?)

Sets the data source to share with the view to open and the position at the opening.

public NavigationOptions WithDataSharing<TUIView>(IDatasource<TUIView>? datasource, int? position) where TUIView : class, IUIView

Parameters

datasource IDatasource<TUIView>

Shared datasource.

position int?

Position at the opening.

Returns

NavigationOptions

The navigation options.

Type Parameters

TUIView

UI view type.

WithFilter(Filter?)

Sets the filter.

public NavigationOptions WithFilter(Filter? filter)

Parameters

filter Filter

Filter.

Returns

NavigationOptions

The navigation options.

WithFrameId(string?)

Sets the tab identifier.

public NavigationOptions WithFrameId(string? frameId)

Parameters

frameId string

Frame identifier.

Returns

NavigationOptions

The navigation options.

WithIcon(string?)

Sets the icon.

[Obsolete("Using string literals for image name is error-prone. Use WithIconId(Images.MyImage) to benefit from compile-time safety.", false)]
public NavigationOptions WithIcon(string? icon)

Parameters

icon string

Icon.

Returns

NavigationOptions

The navigation options.

WithIconId(ImageId?)

Sets the icon.

public NavigationOptions WithIconId(ImageId? icon)

Parameters

icon ImageId

Icon.

Returns

NavigationOptions

The navigation options.

WithId(Dictionary<string, object>?)

Adds the identifier parameter.

public NavigationOptions WithId(Dictionary<string, object>? id)

Parameters

id Dictionary<string, object>

Identifier.

Returns

NavigationOptions

The navigation options.

WithNewParameters()

Disables the view context inheritance and resets the parameters.

public NavigationOptions WithNewParameters()

Returns

NavigationOptions

The navigation options.

WithNewParameters(NavigationParameters)

Disables the view context inheritance and sets the new parameters.

public NavigationOptions WithNewParameters(NavigationParameters parameters)

Parameters

parameters NavigationParameters

Parameters.

Returns

NavigationOptions

The navigation options.

Remarks

ℹ️ If the browser window is refreshed, those parameters will be lost. Therefore, if the UI view needs the parameter(s) even after a browser refresh, consider using WithUrlParameter(string, string) (or WithUrlParameters(Dictionary<string, string>)) instead.

WithNewUrlParameters()

Resets the frame's URL parameters.

public NavigationOptions WithNewUrlParameters()

Returns

NavigationOptions

The navigation options.

WithNewUrlParameters(Dictionary<string, string>)

Resets the frame URL parameters and adds new URL parameters for the next frame (and that frame only).

public NavigationOptions WithNewUrlParameters(Dictionary<string, string> extraParameters)

Parameters

extraParameters Dictionary<string, string>

Extra parameters for the frame.

Returns

NavigationOptions

The navigation options.

Remarks

ℹ️ When being written to and read from the URL, this parameter will be prefixed with 'f_' to be differentiated from global URL parameters.

WithPageNumber(int?)

Adds the page number parameter.

public NavigationOptions WithPageNumber(int? pageNumber)

Parameters

pageNumber int?

Page number.

Returns

NavigationOptions

The navigation options.

WithParameter(string, object?)

Adds a parameter.

public NavigationOptions WithParameter(string key, object? value)

Parameters

key string

Parameter key.

value object

Parameter value.

Returns

NavigationOptions

The navigation options.

Remarks

ℹ️ If the browser window is refreshed, those parameters will be lost. Therefore, if the UI view requires the parameter(s) even after a browser refresh, consider using WithUrlParameter(string, string) (or WithUrlParameters(Dictionary<string, string>)) instead.

WithParameters(Dictionary<string, object>)

Adds parameters to the navigation options. They are merged with the existing parameters, if any. In case of conflicts, the new parameters take precedence over the existing ones.

public NavigationOptions WithParameters(Dictionary<string, object> parameters)

Parameters

parameters Dictionary<string, object>

Parameters.

Returns

NavigationOptions

The navigation options.

Remarks

ℹ️ If the browser window is refreshed, those parameters will be lost. Therefore, if the UI view requires the parameter(s) even after a browser refresh, consider using WithUrlParameter(string, string) (or WithUrlParameters(Dictionary<string, string>)) instead.

WithPopupMaximizable(bool)

Sets the popup maximizable.

public NavigationOptions WithPopupMaximizable(bool popupMaximizable)

Parameters

popupMaximizable bool

The popup maximizable.

Returns

NavigationOptions

The navigation options.

WithPopupPosition(PopupPosition)

Sets the popup position.

public NavigationOptions WithPopupPosition(PopupPosition popupPosition)

Parameters

popupPosition PopupPosition

The popup position.

Returns

NavigationOptions

The navigation options.

WithPopupSize(PopupSize)

Sets the popup size.

public NavigationOptions WithPopupSize(PopupSize popupSize)

Parameters

popupSize PopupSize

The popup size.

Returns

NavigationOptions

The navigation options.

WithRecordsByPage(int?)

Adds the records by page parameter.

public NavigationOptions WithRecordsByPage(int? recordsByPage)

Parameters

recordsByPage int?

Records by page.

Returns

NavigationOptions

The navigation options.

WithTitle(string?)

Sets the title.

public NavigationOptions WithTitle(string? title)

Parameters

title string

Title.

Returns

NavigationOptions

The navigation options.

WithUIViewId(UIViewId)

Sets the destination of the navigation event.

public NavigationOptions WithUIViewId(UIViewId id)

Parameters

id UIViewId

Id of the UIView.

Returns

NavigationOptions

The navigation options.

WithUIViewName(string)

Sets the destination of the navigation event.

[Obsolete("Using string literals or nameof(...) for UI view name is error-prone. Use WithUIViewId(UIViews.MyView) to benefit from compile-time safety.", false)]
public NavigationOptions WithUIViewName(string id)

Parameters

id string

Name of the UIView.

Returns

NavigationOptions

The navigation options.

WithUrlParameter(string, string)

Adds one URL parameter for the next frame (and that frame only). The parameter is merged with the existing ones, if any. In case of conflicts, the new parameter takes precedence over the existing ones.

public NavigationOptions WithUrlParameter(string key, string value)

Parameters

key string

The name of the extra parameter for the frame.

value string

String parameter value. Cannot be null.

Returns

NavigationOptions

The navigation options.

Remarks

ℹ️ When being written to and read from the URL, this parameter will be prefixed with 'f_' to be differentiated from global URL parameters.

WithUrlParameters(Dictionary<string, string>)

Adds URL parameters for the next frame (and that frame only). The parameters are merged with the existing ones, if any. In case of conflicts, the new parameters take precedence over the existing ones.

public NavigationOptions WithUrlParameters(Dictionary<string, string> extraParameters)

Parameters

extraParameters Dictionary<string, string>

Extra parameters for the frame.

Returns

NavigationOptions

The navigation options.

Remarks

ℹ️ When being written to and read from the URL, this parameter will be prefixed with 'f_' to be differentiated from global URL parameters.

ℹ️ Unlike <xref href="GroupeIsa.Neos.Designer.UIAbstractions.NavigationOptions.WithNewUrlParameters" data-throw-if-not-resolved="false"></xref>, this method does not replace the existing
parameters but adds to them, allowing to keep previously set parameters while adding new
ones.