Package io.jmix.flowui.component.main
Class JmixUserIndicator
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.Composite<com.vaadin.flow.component.html.Div>
io.jmix.flowui.kit.component.main.UserIndicator<org.springframework.security.core.userdetails.UserDetails>
io.jmix.flowui.component.main.JmixUserIndicator
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier,com.vaadin.flow.component.DetachNotifier,com.vaadin.flow.component.HasElement,com.vaadin.flow.component.HasEnabled,com.vaadin.flow.component.HasSize,com.vaadin.flow.component.HasStyle,HasTitle,SupportsFormatter<org.springframework.security.core.userdetails.UserDetails>,Serializable,org.springframework.beans.factory.Aware,org.springframework.beans.factory.InitializingBean,org.springframework.context.ApplicationContextAware
public class JmixUserIndicator
extends UserIndicator<org.springframework.security.core.userdetails.UserDetails>
implements org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.InitializingBean
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Actionsprotected org.springframework.context.ApplicationContextprotected CurrentUserSubstitutionprotected Dialogsprotected Messagesprotected MetadataToolsprotected UserSubstitutionManagerprotected UiComponentsprotected UserRepositoryFields inherited from class io.jmix.flowui.kit.component.main.UserIndicator
USER_INDICATOR_CLASS_NAME, USER_INDICATOR_LABEL_CLASS_NAME, userComponent, userFormatter -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected voidprotected com.vaadin.flow.component.ComponentcreateUserSelectionField(List<org.springframework.security.core.userdetails.UserDetails> currentAndSubstitutedUsers) protected StringgenerateUserTitle(org.springframework.security.core.userdetails.UserDetails user) protected voidprotected voidonApplicationEvent(org.springframework.context.ApplicationEvent event) protected voidvoidvoidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) protected voidsubstituteUser(com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.combobox.ComboBox<org.springframework.security.core.userdetails.UserDetails>, org.springframework.security.core.userdetails.UserDetails> event) protected voidupdateUserIndicatorLabel(org.springframework.security.core.userdetails.UserDetails user) Methods inherited from class io.jmix.flowui.kit.component.main.UserIndicator
createUserIndicator, getFormatter, initContent, setFormatterMethods inherited from class com.vaadin.flow.component.Composite
getChildren, getContent, getElementMethods inherited from class com.vaadin.flow.component.Component
addListener, findAncestor, fireEvent, from, get, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setVisibleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.vaadin.flow.component.HasElement
getElementMethods inherited from interface com.vaadin.flow.component.HasEnabled
isEnabled, setEnabledMethods inherited from interface com.vaadin.flow.component.HasSize
getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFullMethods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
-
Field Details
-
applicationContext
protected org.springframework.context.ApplicationContext applicationContext -
currentUserSubstitution
-
substitutionManager
-
metadataTools
-
uiComponents
-
dialogs
-
messages
-
actions
-
userRepository
-
-
Constructor Details
-
JmixUserIndicator
public JmixUserIndicator()
-
-
Method Details
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
autowireDependencies
protected void autowireDependencies() -
initUiUserSubstitutionChangeListener
protected void initUiUserSubstitutionChangeListener() -
refreshUser
public void refreshUser()- Overrides:
refreshUserin classUserIndicator<org.springframework.security.core.userdetails.UserDetails>
-
createUserSelectionField
protected com.vaadin.flow.component.Component createUserSelectionField(List<org.springframework.security.core.userdetails.UserDetails> currentAndSubstitutedUsers) -
substituteUser
protected void substituteUser(com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.combobox.ComboBox<org.springframework.security.core.userdetails.UserDetails>, org.springframework.security.core.userdetails.UserDetails> event) -
updateUserIndicatorLabel
protected void updateUserIndicatorLabel(org.springframework.security.core.userdetails.UserDetails user) - Overrides:
updateUserIndicatorLabelin classUserIndicator<org.springframework.security.core.userdetails.UserDetails>
-
generateUserTitle
- Overrides:
generateUserTitlein classUserIndicator<org.springframework.security.core.userdetails.UserDetails>
-
onApplicationEvent
protected void onApplicationEvent(org.springframework.context.ApplicationEvent event) -
onUserSubstitutionsChanged
-