/*
When views are composed, includeStatusMessage is passed as false so that it may be included in parent/including view
341007
protected void _createBody(_IControl body,boolean includeStatusMessage){
    	int statusMessageIndex = body.getContainedControls().size();
    	showErrorsIfAny(body,statusMessageIndex, includeStatusMessage);
    	createBody(body);
    }
566420
public void initContent(CmsResourceStatusBean status) {

        m_infoBoxContainer.clear();
        CmsListItemWidget infoBox = new CmsListItemWidget(status.getListInfo());
        infoBox.addOpenHandler(new OpenHandler<CmsListItemWidget>() {

            public void onOpen(OpenEvent<CmsListItemWidget> event) {

                CmsDomUtil.resizeAncestor(getParent());
            }
        });
        infoBox.addCloseHandler(new CloseHandler<CmsListItemWidget>() {

            public void onClose(CloseEvent<CmsListItemWidget> event) {

                CmsDomUtil.resizeAncestor(getParent());
            }
        });
        CmsContextMenuButton menuButton = new CmsContextMenuButton(
            status.getStructureId(),
            m_menuHandler,
            AdeContext.resourceinfo);
        menuButton.addStyleName(I_CmsLayoutBundle.INSTANCE.listItemWidgetCss().permaVisible());
        infoBox.addButton(menuButton);
        m_infoBoxContainer.add(infoBox);
        m_dateCreated.setText(status.getDateCreated());
        m_dateExpired.setText(status.getDateExpired());
        m_dateLastModified.setText(status.getDateLastModified());
        m_dateReleased.setText(status.getDateReleased());
        m_lastProject.setText(status.getLastProject());
        m_lockState.setText(status.getLockState());
        CmsResourceState state = status.getStateBean();
        String stateStyle = CmsResourceStateUtil.getStateStyle(state);
        String stateText = CmsResourceStateUtil.getStateName(state);
        m_state.setText(makeSpan(stateStyle, stateText));
        m_title.setText(status.getTitle());
        m_navText.setText(status.getNavText());
        m_permissions.setText(status.getPermissions());
        m_resourceType.setText(status.getResourceType());
        m_size.setText("" + status.getSize() + " Bytes");
        m_userCreated.setText(status.getUserCreated());
        m_userLastModified.setText(status.getUserLastModified());

        List<String> locales = status.getLocales();
        if (locales != null) {
            StringBuffer buffer = new StringBuffer();
            int index = 0;
            for (String locale : locales) {
                if (locale.equals(CmsCoreProvider.get().getLocale())) {
                    buffer.append("<b>");
                    buffer.append(locale);
                    buffer.append("</b>");
                } else {
                    buffer.append(locale);
                }
                if (index != (locales.size() - 1)) {
                    buffer.append(", ");
                }
                index += 1;
            }
            m_locales.setText(buffer.toString());
        } else {
            m_locales.setText("");
        }
        m_additionalParams.clear();
        if (status.getAdditionalAttributes() != null) {
            for (Entry<String, String> entry : status.getAdditionalAttributes().entrySet()) {
                CmsResourceInfoLine line = new CmsResourceInfoLine();
                line.setLabel(entry.getKey());
                line.setText(entry.getValue());
                m_additionalParams.add(line);
            }
        }

    }
908610
function embeddedViewEnd() {
    refreshView();
    isParent = false;
    previousOrParentNode = viewData[HOST_NODE];
    leaveView(viewData[PARENT]);
    ngDevMode && assertEqual(isParent, false, 'isParent');
    ngDevMode && assertNodeType(previousOrParentNode, 2 /* View */);
}
1176219
public void addStatusInfo(String message) {
        if (message == null) {
            return;
        }
        statusInfo.put(WebResponseConstant.MESSAGE_GLOBAL, message);
    }
302038
@Override
    public void displayMessage(Message message) {
        if (message == null) {
            getRequestPanel().clearView(true);
            getResponsePanel().clearView(false);
            return;
        }

        if (!(message instanceof HttpMessage)) {
            logger.warn("Unable to display message: " + message.getClass().getCanonicalName());
            return;
        }

        HttpMessage httpMessage = (HttpMessage) message;
        if (httpMessage.getRequestHeader().isEmpty()) {
            getRequestPanel().clearView(true);
        } else {
            getRequestPanel().setMessage(httpMessage);
        }

        if (httpMessage.getResponseHeader().isEmpty()) {
            getResponsePanel().clearView(false);
        } else {
            getResponsePanel().setMessage(httpMessage, true);
        }
    }
868244
@Override
  public void handleMessage(Message message) {
    final Crouton crouton = (Crouton) message.obj;
    if (null == crouton) {
      return;
    }
    switch (message.what) {
      case Messages.DISPLAY_CROUTON: {
        displayCrouton();
        break;
      }

      case Messages.ADD_CROUTON_TO_VIEW: {
        addCroutonToView(crouton);
        break;
      }

      case Messages.REMOVE_CROUTON: {
        removeCrouton(crouton);
        if (null != crouton.getLifecycleCallback()) {
          crouton.getLifecycleCallback().onRemoved();
        }
        break;
      }

      default: {
        super.handleMessage(message);
        break;
      }
    }
  }
863156
public void setIncludeExpired(boolean includeExpired, boolean fireEvent) {

        m_searchObject.setIncludeExpired(includeExpired);
        m_searchObjectChanged = true;
        if (fireEvent) {
            ValueChangeEvent.fire(this, m_searchObject);
        }

    }
908760
public void updateMessageProcessInfo(String elementIn, String elementOut, String elementFault, boolean bIsSafe, String address)
    {
        MessageInfo recMessageInfo = this.getMessageInfo(elementIn);   // Note: Message IN for them is Message Out for me
        if (recMessageInfo != null)
        {
            MessageProcessInfo recMessageProcessInfo = (MessageProcessInfo)this.getRecord(MessageProcessInfo.MESSAGE_PROCESS_INFO_FILE);
            FileListener listener = new SubFileFilter(recMessageInfo);
            recMessageProcessInfo.addListener(listener);
            recMessageProcessInfo.setKeyArea(MessageProcessInfo.MESSAGE_INFO_ID_KEY);
            recMessageProcessInfo.close();
            try {
                while (recMessageProcessInfo.hasNext())
                {
                    recMessageProcessInfo.next();
                    if (!MessageType.MESSAGE_OUT.equalsIgnoreCase(((ReferenceField)recMessageProcessInfo.getField(MessageProcessInfo.MESSAGE_TYPE_ID)).getReference().getField(MessageType.CODE).toString()))
                        continue;
                    boolean safe = CreateWSDL.SAFE_DEFAULT;
                    String safeValue = ((PropertiesField)recMessageProcessInfo.getField(MessageProcessInfo.PROPERTIES)).getProperty(MessageProcessInfo.SAFE);
                    if (safeValue != null)
                        safe = Boolean.parseBoolean(safeValue);
                    if (safeValue != null)
                        if (safe != bIsSafe)
                            continue;
                    
                    Record recMessageProcessInfo2 = ((ReferenceField)recMessageProcessInfo.getField(MessageProcessInfo.REPLY_MESSAGE_PROCESS_INFO_ID)).getReference();
                    if (recMessageProcessInfo2 != null)
                        if ((recMessageProcessInfo2.getEditMode() == DBConstants.EDIT_IN_PROGRESS) || (recMessageProcessInfo2.getEditMode() == DBConstants.EDIT_CURRENT))
                        {
                            Record recMessageInfo2 = ((ReferenceField)recMessageProcessInfo2.getField(MessageProcessInfo.MESSAGE_INFO_ID)).getReference();
                            if (recMessageInfo2 != null)
                            {
                                if (elementOut != null)
                                    if (elementOut.equalsIgnoreCase(recMessageInfo2.getField(MessageInfo.CODE).getString()))
                                    {
                                        Map<String,Object> map = null;
                                        if (address != null)
                                        {
                                            map = new Hashtable<String,Object>();
                                            String site = this.getSiteFromAddress(address, null);
                                            map.put(TrxMessageHeader.DESTINATION_PARAM, site);
                                            map.put(TrxMessageHeader.DESTINATION_MESSAGE_PARAM, this.getPathFromAddress(address, site));
                                        }
                                        this.updateMessageDetail(recMessageProcessInfo, map);   // Found
                                    }
                            }
                        }
                }
            } catch (DBException e) {
                e.printStackTrace();
            } finally {
                recMessageProcessInfo.removeListener(listener, true);
            }
        }
    }
745054
public void init(CmsElementView view, boolean useDefault) {

        m_currentView = view;
        if (!view.getId().equals(getViewSelector().getValue())) {
            getViewSelector().setValue(view.getId());
        }
        getVerticalLayout().removeAllComponents();

        List<CmsResourceTypeBean> typeBeans = m_typeHelper.getPrecomputedTypes(view);
        if (view.getId().equals(ID_VIEW_ALL)) {
            typeBeans = m_allTypes;
        }

        if (typeBeans == null) {

            LOG.warn("precomputed type list is null: " + view.getTitle(A_CmsUI.getCmsObject(), Locale.ENGLISH));
            return;
        }
        for (CmsResourceTypeBean type : typeBeans) {
            final String typeName = type.getType();
            String title = typeName;
            String subtitle = getSubtitle(type, useDefault);
            CmsExplorerTypeSettings explorerType = OpenCms.getWorkplaceManager().getExplorerTypeSetting(typeName);

            title = CmsVaadinUtils.getMessageText(explorerType.getKey());
            CmsResourceInfo info = new CmsResourceInfo(
                title,
                subtitle,
                CmsResourceUtil.getBigIconResource(explorerType, null));
            info.setData(type);
            m_resourceInfoMap.put(type, info);
            getVerticalLayout().addComponent(info);
        }
    }
1023210
public void attachView(View view) {
		if (view == null) {
			throw new IllegalArgumentException("Mvp view must be not null");
		}

		boolean isViewAdded = mViews.add(view);

		if (!isViewAdded) {
			return;
		}

		mInRestoreState.add(view);

		Set<ViewCommand<View>> currentState = mViewStates.get(view);
		currentState = currentState == null ? Collections.<ViewCommand<View>>emptySet() : currentState;

		restoreState(view, currentState);

		mViewStates.remove(view);

		mInRestoreState.remove(view);
	}
1287829
function (view) {
			if (this._onTextModelChanged && this._view) {
				this._view.removeEventListener("ModelChanged", this._listener.onTextModelChanged); //$NON-NLS-0$
			}
			this._view = view;
			if (this._onTextModelChanged && this._view) {
				this._view.addEventListener("ModelChanged", this._listener.onTextModelChanged); //$NON-NLS-0$
			}
		}
186275
private static void traceView(String additionalMsg, UIViewRoot viewRoot)
    {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        PrintStream ps = new PrintStream(baos);
        if (additionalMsg != null)
        {
            ps.println(additionalMsg);
        }
        ps.println("========================================");
        printView(viewRoot, ps);
        ps.println("========================================");
        ps.close();
        log.finest(baos.toString());
    }
230715
private void processCommonFilterStatus(final TargetUpdateStatus status, final boolean buttonPressed) {
        if (buttonPressed) {
            buttonClicked.addStyleName(BTN_CLICKED);
            managementUIState.getTargetTableFilters().getClickedStatusTargetTags().add(status);
            eventBus.publish(this, TargetFilterEvent.FILTER_BY_STATUS);

        } else {
            buttonClicked.removeStyleName(BTN_CLICKED);
            managementUIState.getTargetTableFilters().getClickedStatusTargetTags().remove(status);
            eventBus.publish(this, TargetFilterEvent.REMOVE_FILTER_BY_STATUS);
        }

    }
237480
function showUserIsTypingView(isTyping, userId, dialogId) {
    if (isMessageForCurrentDialog(userId, dialogId)) {

        if (!isTyping) {
            $('#' + userId + '_typing').remove();
        } else if (userId != currentUser.id) {
            var userLogin = getUserLoginById(userId);
            var typingUserHtml = buildTypingUserHtml(userId, userLogin);
            $('#messages-list').append(typingUserHtml);
        }

        // scroll to bottom
        var mydiv = $('#messages-list');
        mydiv.scrollTop(mydiv.prop('scrollHeight'));
    }
}
805280
function() {
      // Need to check if each view is attached because there is no guarentee that if parent is attached, child is attached.
      if (!this.__attachedCallbackInvoked) {
        this.trigger('before-attached-callback');
        this._attached();
        this.__attachedCallbackInvoked = true;
        _.each(this.getTrackedViews(), function(view) {
          if (view.isAttachedToParent()) {
            view.__invokeAttached();
          }
        });
      }
    }
789871
protected function renderMessage()
    {
        $view = $this->getView();
        BootstrapNotifyAsset::register($view);
        if ($this->useAnimation) {
            AnimateAsset::register($view);
        }
        $js = "$.notify({$this->getOptions()},{$this->getClientOptions()});";
        $view->registerJs($js, $view::POS_END);
    }
746032
@UiThread
    protected void parentCollapsedFromViewHolder(int flatParentPosition) {
        ExpandableWrapper<P, C> parentWrapper = mFlatItemList.get(flatParentPosition);
        updateCollapsedParent(parentWrapper, flatParentPosition, true);
    }