Package io.jmix.flowui.view
Class ViewAttributes
java.lang.Object
io.jmix.flowui.view.ViewAttributes
Class provides mechanism for setting/getting attributes that uses
VaadinSession
as store.
Class instance should be initialized with View
id.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Class describes attributes map that corresponds to a certain view in a browser tab. -
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T> T
getAttribute
(String key) protected Set<ViewAttributes.Attributes>
getAttributes
(String viewId) protected Optional<ViewAttributes.Attributes>
getAttributesForWindowName
(Set<ViewAttributes.Attributes> attributes, String windowName) protected com.vaadin.flow.server.VaadinSession
protected String
void
RemovesViewAttributes.Attributes
instance that contains all attributes forView
.void
removeAttribute
(String key) Removes attribute by its name.void
setAttribute
(String key, Object value) Sets attribute for theView
(getViewId()
) in a current browser tab to Vaadin session.void
setExtendedClientDetailsProvider
(ExtendedClientDetailsProvider extendedClientDetailsProvider)
-
Field Details
-
viewId
-
extendedClientDetailsProvider
-
-
Constructor Details
-
ViewAttributes
-
-
Method Details
-
setExtendedClientDetailsProvider
@Autowired public void setExtendedClientDetailsProvider(ExtendedClientDetailsProvider extendedClientDetailsProvider) -
getViewId
- Returns:
View
id
-
setAttribute
Sets attribute for theView
(getViewId()
) in a current browser tab to Vaadin session.- Parameters:
key
- attribute namevalue
- attribute value
-
getAttribute
- Parameters:
key
- attribute name- Returns:
- attribute value or
null
otherwise
-
removeAttribute
Removes attribute by its name.- Parameters:
key
- attribute name
-
removeAllAttributes
public void removeAllAttributes()RemovesViewAttributes.Attributes
instance that contains all attributes forView
. -
getVaadinSessionNN
protected com.vaadin.flow.server.VaadinSession getVaadinSessionNN() -
getAttributes
-
getAttributesForWindowName
protected Optional<ViewAttributes.Attributes> getAttributesForWindowName(Set<ViewAttributes.Attributes> attributes, String windowName) -
getWindowName
-