protected void UpdateFiltersList()
        {
            _filterItemsList.Clear();
            NavigationData         navigationData = GetCurrentNavigationData();
            IList <WorkflowAction> actions        = navigationData.GetWorkflowActions();

            if (actions == null)
            {
                return;
            }

            string currentScreenTitle = LocalizationHelper.CreateResourceString(navigationData.CurrentScreenData?.MenuItemLabel)?.Evaluate();

            foreach (WorkflowAction action in actions)
            {
                WorkflowAction actionCopy = action;
                ListItem       screenItem = new ListItem(Consts.KEY_NAME, action.DisplayTitle)
                {
                    Command  = new MethodDelegateCommand(actionCopy.Execute),
                    Selected = currentScreenTitle == action.DisplayTitle?.Evaluate()
                };
                screenItem.AdditionalProperties[Consts.KEY_FILTER] = actionCopy;
                _filterItemsList.Add(screenItem);
            }
            _filterItemsList.FireChange();
        }
Exemple #2
0
        protected void UpdateFiltersList()
        {
            _filterItemsList.Clear();
            NavigationData         navigationData = GetCurrentNavigationData();
            IList <WorkflowAction> actions        = navigationData.GetWorkflowActions();

            if (actions == null)
            {
                return;
            }
            foreach (WorkflowAction action in actions)
            {
                WorkflowAction actionCopy = action;
                ListItem       screenItem = new ListItem(Consts.KEY_NAME, action.DisplayTitle)
                {
                    Command = new MethodDelegateCommand(actionCopy.Execute)
                };
                screenItem.AdditionalProperties[Consts.KEY_FILTER] = actionCopy;
                _filterItemsList.Add(screenItem);
            }
            _filterItemsList.FireChange();
        }