Helper for setting content_for in activity partial, needed to
 flush remains in between partial renders.
194144
def single_content_for(name, content = nil, &block)
      @view_flow.set(name, ActiveSupport::SafeBuffer.new)
      content_for(name, content, &block)
    end
288696
public void setContent(final WComponent content) {
		WComponent oldContent = getContent();

		if (oldContent != null) {
			remove(oldContent);
		}

		if (content != null) {
			add(content);
		}
	}
755457
protected void setContentStart(String contentStart) {
        if (contentStart == null) {
            contentStart = StringUtils.EMPTY;
        }
        this.contentStart = contentStart;
    }
832755
def flush(self):
        
        if not self._emit_partial and len(self._state) != self._state.maxlen:
            self.notify(tuple(self._state))
        self._state.clear()
579999
public void setAbove(Component aboveContent) {

        if (m_mainPanel.getComponentIndex(m_contentPanel) == 0) {
            m_mainPanel.addComponent(aboveContent, 0);
        } else {
            m_mainPanel.replaceComponent(m_mainPanel.getComponent(0), aboveContent);
        }
    }
783537
protected void reinitContent(CmsResourceStatusBean statusBean) {

        int selected = m_tabPanel.getSelectedIndex();
        for (int i = 0; i < m_tabPanel.getTabCount(); i++) {
            CmsTabContentWrapper wrapper = m_tabPanel.getWidget(i);
            if (wrapper.getWidget() instanceof CmsResourceInfoView) {
                ((CmsResourceInfoView)wrapper.getWidget()).initContent(statusBean);
            } else if (wrapper.getWidget() instanceof CmsResourceRelationView) {
                ((CmsResourceRelationView)wrapper.getWidget()).initContent(statusBean);
                if (i == selected) {
                    ((CmsResourceRelationView)wrapper.getWidget()).onResizeDescendant();
                }
            }
        }
    }
1373880
public SwipeBack setContentView(View view, LayoutParams params) {
		switch (mDragMode) {
		case SwipeBack.DRAG_CONTENT:
			mContentContainer.removeAllViews();
			mContentContainer.addView(view, params);
			break;

		case SwipeBack.DRAG_WINDOW:

			// mActivity can be null if inflated from xml, so retrieve activity
			// if (mActivity == null) {
			// mActivity = (Activity) getContext();
			// }

			mActivity.setContentView(view, params);
			break;
		}

		return this;
	}
833349
function( contentItem ) {
		var i, j, isActive, activeTab;

		if (this.activeContentItem === contentItem) return;
		
		for( i = 0; i < this.tabs.length; i++ ) {
			isActive = this.tabs[ i ].contentItem === contentItem;
			this.tabs[ i ].setActive( isActive );
			if( isActive === true ) {
				this.activeContentItem = contentItem;
				this.parent.config.activeItemIndex = i;
			}
		}

		if (this.layoutManager.config.settings.reorderOnTabMenuClick) {
			/**
			 * If the tab selected was in the dropdown, move everything down one to make way for this one to be the first.
			 * This will make sure the most used tabs stay visible.
			 */
			if (this._lastVisibleTabIndex !== -1 && this.parent.config.activeItemIndex > this._lastVisibleTabIndex) {
				activeTab = this.tabs[this.parent.config.activeItemIndex];
				for ( j = this.parent.config.activeItemIndex; j > 0; j-- ) {
					this.tabs[j] = this.tabs[j - 1];
				}
				this.tabs[0]                       = activeTab;
				this.parent.config.activeItemIndex = 0;
			}
		}

		this._updateTabSizes();
		this.parent.emitBubblingEvent( 'stateChanged' );
	}
1071865
public void setContent(Component content) {

        m_contentPanel.setContent(content);
        if (content instanceof Layout.MarginHandler) {
            ((Layout.MarginHandler)content).setMargin(true);
        }
    }
672447
void perform(ContentHandler handler, SectionState state) {
    final ModeUsage modeUsage = getModeUsage();
    if (handler != null)
      state.addActiveHandler(handler, modeUsage);
    else
      state.addAttributeValidationModeUsage(modeUsage);
    state.addChildMode(modeUsage, handler);
  }
1332931
public void setContent(final WComponent content) {
		getOrCreateComponentModel().content = content;

		// There should only be one content.
		holder.removeAll();
		holder.add(content);
	}
735528
def render_content(content, **kwargs):
    ''''''
    # try to take pre rendered content from django cache, if caching is enabled
    if settings.ACTIVE_URL_CACHE:
        cache_key = get_cache_key(content, **kwargs)

        # get cached content from django cache backend
        from_cache = cache.get(cache_key)

        # return pre rendered content if it exist in cache
        if from_cache is not None:
            return from_cache

    # render content with "active" logic
    content = check_content(content, **kwargs)

    # write rendered content to django cache backend, if caching is enabled
    if settings.ACTIVE_URL_CACHE:
        cache.set(cache_key, content, settings.ACTIVE_URL_CACHE_TIMEOUT)

    return content
790842
protected void setContentEnd(String contentEnd) {
        if (contentEnd == null) {
            contentEnd = StringUtils.EMPTY;
        }
        this.contentEnd = contentEnd;
    }
428989
@Override
    protected void initContent() {

        if (CmsStringUtil.isNotEmpty(getParamContent())) {
            if (CmsStringUtil.isNotEmpty(getParamElementname())
                && getParamElementname().equals(getParamOldelementname())) {
                if (CmsStringUtil.isNotEmpty(getParamElementlanguage())
                    && getParamElementlanguage().equals(getParamOldelementlanguage())) {
                    return;
                }
            }
        }
        getCms().getRequestContext().setAttribute(CmsRequestContext.ATTRIBUTE_EDITOR, Boolean.TRUE);

        String elementData;
        if (m_page.hasValue(getParamElementname(), getElementLocale())) {
            // element value is available in the page
            elementData = m_page.getStringValue(getCms(), getParamElementname(), getElementLocale());
        } else {
            // value is not available in the page
            if (Boolean.valueOf(getParamDirectedit()).booleanValue()) {
                // direct edit on a non-existing element: create new element with this name
                m_page.addValue(getParamElementname(), getElementLocale());
            }
            elementData = "";
        }
        setParamContent(elementData);
    }
1351489
protected void initContent(CmsReplaceInfo replaceInfo) {

        m_replaceInfo = replaceInfo;
        CmsListItemWidget fileInfoItem = new CmsListItemWidget(m_replaceInfo.getFileInfo());
        m_mainPanel.setReplaceInfo(fileInfoItem);
        if (!m_replaceInfo.isLockable()) {
            m_mainPanel.displayDialogInfo(Messages.get().key(Messages.GUI_REPLACE_LOCKED_RESOURCE_0), true);
        } else {
            m_mainPanel.displayDialogInfo(Messages.get().key(Messages.GUI_REPLACE_INFO_0), false);
            checkFileType();
            createButtons();
        }
    }
201169
function setContent(content) {

            if (content.nodeType !== undefined) {
                that._content.innerHTML = '';
                that._content.appendChild(content);
            } else {
                that._content.innerHTML = content;
            }


            that._options.cache = true;

            /**
             * Event emitted when the content change.
             * @event ch.Content#contentchange
             * @private
             */
            that.emit('_contentchange');

            /**
             * Event emitted if the content is loaded successfully.
             * @event ch.Content#contentdone
             * @example
             * // Subscribe to "contentdone" event.
             * component.on('contentdone', function (event) {
             *     // Some code here!
             * });
             */
            that.emit('contentdone');
        }
914844
public void setContents(ByteArraySegment contents) {
        Preconditions.checkNotNull(contents, "contents");
        Preconditions.checkState(this.contents == null, "This operation has already had its contents set.");
        this.contents = contents;
    }