Package io.jmix.ui.sys
Class FrameContextImpl
java.lang.Object
io.jmix.ui.sys.FrameContextImpl
- All Implemented Interfaces:
FrameContext
- Direct Known Subclasses:
FragmentContextImpl,WindowContextImpl
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddValueChangeListener(String componentName, Consumer<HasValue.ValueChangeEvent> listener) Add the value listener to the specified componentgetFrame()<T> TgetParameterValue(String property) For a window contains parameters passed to the window on opening.getParamsMap(ScreenOptions options) <T> TgetParamValue(String param) Value of an external parameters passed to the window on opening.protected <T> T<T> TRetrieves value of a component by complex name, dereferencing path to the component and possible drill down to the value.voidSet value of a component by its path in the window
-
Field Details
-
frame
-
-
Constructor Details
-
FrameContextImpl
-
-
Method Details
-
getParameterNames
-
getParameterValue
-
getParamsMap
-
getFrame
- Specified by:
getFramein interfaceFrameContext
-
getParams
Description copied from interface:FrameContextFor a window contains parameters passed to the window on opening.
For a frame, linked to the window in XML, contains owning window parameters.
For a frame, opened dynamically byopenFrame()method contains parameters, passed to the method.- Specified by:
getParamsin interfaceFrameContext
-
getParamValue
Description copied from interface:FrameContextValue of an external parameters passed to the window on opening.- Specified by:
getParamValuein interfaceFrameContext
-
getValue
Description copied from interface:FrameContextRetrieves value of a component by complex name, dereferencing path to the component and possible drill down to the value.- Specified by:
getValuein interfaceFrameContext- Parameters:
property- path to the value. Parsed by the following rules:
First split by dots taking into account square brackets, and looking for a component from left to right.
If a component not found, return null.
If a component found and it is aHasValueorListComponent, retrieve its value.
If the value is null, return it.
If there is nothing left in the path after the component name, return the value.
Else if the value is entity, drill down to it and return the value of the property by remaining property path.
If the value is anEnumClassand remaining property path is "id", return EnumClass.getId() value.
-
getValue
-
setValue
Description copied from interface:FrameContextSet value of a component by its path in the window- Specified by:
setValuein interfaceFrameContext- Parameters:
property- path to the component (separated by dots, taking into account square brackets)value- value to set
-
addValueChangeListener
public Subscription addValueChangeListener(String componentName, Consumer<HasValue.ValueChangeEvent> listener) Description copied from interface:FrameContextAdd the value listener to the specified component- Specified by:
addValueChangeListenerin interfaceFrameContext- Parameters:
componentName- a component namelistener- a listener to add
-