Class ViewAttributes

java.lang.Object
io.jmix.flowui.view.ViewAttributes

@Component("flowui_ViewAttributes") @Scope("prototype") public class ViewAttributes extends Object
Class provides mechanism for setting/getting attributes that uses VaadinSession as store. Class instance should be initialized with View id.
  • Field Details

  • Constructor Details

    • ViewAttributes

      public ViewAttributes(String viewId)
  • Method Details

    • setExtendedClientDetailsProvider

      @Autowired public void setExtendedClientDetailsProvider(ExtendedClientDetailsProvider extendedClientDetailsProvider)
    • getViewId

      public String getViewId()
      Returns:
      View id
    • setAttribute

      public void setAttribute(String key, Object value)
      Sets attribute for the View (getViewId()) in a current browser tab to Vaadin session.
      Parameters:
      key - attribute name
      value - attribute value
    • getAttribute

      @Nullable public <T> T getAttribute(String key)
      Parameters:
      key - attribute name
      Returns:
      attribute value or null otherwise
    • removeAttribute

      public void removeAttribute(String key)
      Removes attribute by its name.
      Parameters:
      key - attribute name
    • removeAllAttributes

      public void removeAllAttributes()
      Removes ViewAttributes.Attributes instance that contains all attributes for View.
    • getVaadinSessionNN

      protected com.vaadin.flow.server.VaadinSession getVaadinSessionNN()
    • getAttributes

      protected Set<ViewAttributes.Attributes> getAttributes(String viewId)
    • getAttributesForWindowName

      protected Optional<ViewAttributes.Attributes> getAttributesForWindowName(Set<ViewAttributes.Attributes> attributes, String windowName)
    • getWindowName

      protected String getWindowName()