public class FrameContextImpl extends java.lang.Object implements FrameContext
Constructor and Description |
---|
FrameContextImpl(Frame window) |
Modifier and Type | Method and Description |
---|---|
com.haulmont.bali.events.Subscription |
addValueChangeListener(java.lang.String componentName,
java.util.function.Consumer<HasValue.ValueChangeEvent> listener)
Add the value listener to the specified component
|
Frame |
getFrame() |
java.util.Collection<java.lang.String> |
getParameterNames() |
<T> T |
getParameterValue(java.lang.String property) |
java.util.Map<java.lang.String,java.lang.Object> |
getParams()
For a window contains parameters passed to the window on opening.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getParamsMap(ScreenOptions options) |
<T> T |
getParamValue(java.lang.String param)
Value of an external parameters passed to the window on opening.
|
protected <T> T |
getValue(Component component) |
<T> T |
getValue(java.lang.String property)
Retrieves value of a component by complex name, dereferencing path to the component
and possible drill down to the value
|
void |
removeValueChangeListener(java.lang.String componentName,
java.util.function.Consumer<HasValue.ValueChangeEvent> listener)
Remove the value listener from the specified component
|
void |
setValue(java.lang.String property,
java.lang.Object value)
Set value of a component by its path in the window
|
protected final Frame frame
public FrameContextImpl(Frame window)
public java.util.Collection<java.lang.String> getParameterNames()
public <T> T getParameterValue(java.lang.String property)
protected java.util.Map<java.lang.String,java.lang.Object> getParamsMap(ScreenOptions options)
public Frame getFrame()
getFrame
in interface FrameContext
public java.util.Map<java.lang.String,java.lang.Object> getParams()
FrameContext
openFrame()
method contains parameters, passed to the method.getParams
in interface FrameContext
public <T> T getParamValue(java.lang.String param)
FrameContext
getParamValue
in interface FrameContext
public <T> T getValue(java.lang.String property)
FrameContext
getValue
in interface FrameContext
property
- path to the value. Parsed by the following rules:
HasValue
or ListComponent
, retrieve its value.
Instance
, drill down to it and return the value
of the property by remaining property path.
EnumClass
and remaining
property path is "id", return EnumClass.getId() value.protected <T> T getValue(Component component)
public void setValue(java.lang.String property, java.lang.Object value)
FrameContext
setValue
in interface FrameContext
property
- path to the component (separated by dots, taking into account square brackets)value
- value to setpublic com.haulmont.bali.events.Subscription addValueChangeListener(java.lang.String componentName, java.util.function.Consumer<HasValue.ValueChangeEvent> listener)
FrameContext
addValueChangeListener
in interface FrameContext
componentName
- a component namelistener
- a listener to addpublic void removeValueChangeListener(java.lang.String componentName, java.util.function.Consumer<HasValue.ValueChangeEvent> listener)
FrameContext
removeValueChangeListener
in interface FrameContext
componentName
- a component namelistener
- a listener to remove