Class FrameContextImpl

java.lang.Object
io.jmix.ui.sys.FrameContextImpl
All Implemented Interfaces:
FrameContext
Direct Known Subclasses:
FragmentContextImpl, WindowContextImpl

public class FrameContextImpl extends Object implements FrameContext
  • Field Details

    • frame

      protected final Frame frame
  • Constructor Details

    • FrameContextImpl

      public FrameContextImpl(Frame window)
  • Method Details

    • getParameterNames

      public Collection<String> getParameterNames()
    • getParameterValue

      public <T> T getParameterValue(String property)
    • getParamsMap

      protected Map<String,Object> getParamsMap(ScreenOptions options)
    • getFrame

      public Frame getFrame()
      Specified by:
      getFrame in interface FrameContext
    • getParams

      public Map<String,Object> getParams()
      Description copied from interface: FrameContext
      For 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 by openFrame() method contains parameters, passed to the method.
      Specified by:
      getParams in interface FrameContext
    • getParamValue

      public <T> T getParamValue(String param)
      Description copied from interface: FrameContext
      Value of an external parameters passed to the window on opening.
      Specified by:
      getParamValue in interface FrameContext
    • getValue

      @Nullable public <T> T getValue(String property)
      Description copied from interface: FrameContext
      Retrieves value of a component by complex name, dereferencing path to the component and possible drill down to the value.
      Specified by:
      getValue in interface FrameContext
      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 a HasValue or ListComponent, 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 an EnumClass and remaining property path is "id", return EnumClass.getId() value.
    • getValue

      @Nullable protected <T> T getValue(Component component)
    • setValue

      public void setValue(String property, @Nullable Object value)
      Description copied from interface: FrameContext
      Set value of a component by its path in the window
      Specified by:
      setValue in interface FrameContext
      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: FrameContext
      Add the value listener to the specified component
      Specified by:
      addValueChangeListener in interface FrameContext
      Parameters:
      componentName - a component name
      listener - a listener to add