Chat now with support
Chat mit Support

Foglight Evolve 6.0.0 - Web Component Guide

Introducing the Web Component Framework The Web Component Framework Configuring Views and Context Queries Functions Bindings Additional Components

Required Context

If the input is marked as required, then it must be provided for the view to operate. You cannot add a component to a parent unless the parent can provide the required context. Thus, the parent view must do one of the following:

Optional Context

If the input is marked as optional, then the view takes the data if present, otherwise it has some mechanism for inferring or calculating the data. Often this comes in the form of a drop-down list or selectable table that auto-selects the first element in the data list if a selected item is not provided. Optional Context items are those inputs that are used if they are present but are derived in some other way if they are not present. For example:

Internal Context

Marking a context as Internal means that the input is required for internal operation of the component and is much like the optional input, except that changes to this value by the component are not propagated to the rest of the page on an update. However, the value is propagated to the children of the component.

Internal Context items behave like optional inputs, except that when a context element changes in a nested level, the changes do not traverse up the hierarchy to the parent level. This makes it possible to have similar and dynamic views that use the same key names and types co-existing on the same page without adversely affecting each other.

You can use this type of context in a portlet with a customizer. For example, the customizer allows you to select which Host is displayed by the portlet. It is important for the component to mark the Host as internal to make sure that if two identical views are on the page at the same time, but each show data from a different host, that they do not conflict with each other.

For more information see Configuring Views .

Additional Context

Additional Context is context that is added by the view designer. The order of the additional context entries is important because the order that they are listed determines the order in which the values are evaluated (if the values are bindings).

You can add context using the Additional Context tab in the Module Contents pane to the following:

Verwandte Dokumente

The document was helpful.

Bewertung auswählen

I easily found the information I needed.

Bewertung auswählen