Package org.adempiere.webui.panel
Class UserPanel
java.lang.Object
org.adempiere.webui.panel.UserPanel
- All Implemented Interfaces:
Serializable,org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>,org.zkoss.zk.ui.util.Composer<org.zkoss.zk.ui.Component>
public class UserPanel
extends Object
implements org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>, org.zkoss.zk.ui.util.Composer<org.zkoss.zk.ui.Component>, Serializable
Desktop header panel for user info
- Author:
- Ashley G Ramdass
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.zkoss.zk.ui.Componentprotected Propertiesprotected Menupopupprotected Labelprotected Labelprotected org.zkoss.zk.ui.Componentprotected WPreferenceprotected org.zkoss.zk.ui.Componentprotected org.zkoss.zk.ui.Componentprotected org.zkoss.zk.ui.Componentprotected Label -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddoAfterCompose(org.zkoss.zk.ui.Component comp) protected intGet the activities count by evaluating all document status indicatorsprotected Stringprotected voidonCreate()Call when UI is compose from zul definitionvoidonEvent(org.zkoss.zk.ui.event.Event event) protected voidOpen the notification popup showing MDocumentStatus indicatorsprotected voidOpen the modern user menu popup (profile card + actions)protected voidupdateNotificationBadge(int count) Update the notification badge with the given count
-
Field Details
-
ctx
-
lblUserNameValue
-
preferencePopup
-
feedbackMenu
-
component
protected org.zkoss.zk.ui.Component component -
userPanelLinksContainer
protected org.zkoss.zk.ui.Component userPanelLinksContainer -
userProfileChip
protected org.zkoss.zk.ui.Component userProfileChip -
userAvatar
protected org.zkoss.zk.ui.Component userAvatar -
userSubText
-
notificationBell
protected org.zkoss.zk.ui.Component notificationBell -
notificationBadge
-
-
Constructor Details
-
UserPanel
public UserPanel()Default constructor
-
-
Method Details
-
onCreate
protected void onCreate()Call when UI is compose from zul definition -
onEvent
- Specified by:
onEventin interfaceorg.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event>- Throws:
Exception
-
openUserMenuPopup
protected void openUserMenuPopup()Open the modern user menu popup (profile card + actions) -
openNotificationPopup
protected void openNotificationPopup()Open the notification popup showing MDocumentStatus indicators -
getInitials
- Returns:
- initials of the user
-
getActivitiesCount
protected int getActivitiesCount()Get the activities count by evaluating all document status indicators- Returns:
- total count of activities
-
updateNotificationBadge
protected void updateNotificationBadge(int count) Update the notification badge with the given count- Parameters:
count- number of pending activities
-
doAfterCompose
- Specified by:
doAfterComposein interfaceorg.zkoss.zk.ui.util.Composer<org.zkoss.zk.ui.Component>- Throws:
Exception
-