Event handler method - should not be called manually
@internal
@param  ITemplateFactory
@param  string
@param  string
183609
public function onLoadLayout(ITemplateFactory $templateFactory, $layoutFile, $presenterName)
	{
		if (!$this->activeTheme) {
			return;
		}

		$templateFactory->addLayout(
			$this->formatTemplateFilePath($this->activeTheme, $layoutFile, $presenterName)
		);
		$templateFactory->addLayout(
			$this->formatTemplateFilePath($this->activeTheme, $layoutFile)
		);

		$parent = $this->activeTheme->getParent();
		if (!$parent) {
			return;
		}
		$parentTheme = $this->getTheme($parent);
		$templateFactory->addLayout(
			$this->formatTemplateFilePath($parentTheme, $layoutFile, $presenterName)
		);
		$templateFactory->addLayout(
			$this->formatTemplateFilePath($parentTheme, $layoutFile)
		);
	}
24408
protected void init(Map<String, String> items) {

        initWidget(m_panel);
        m_items = new LinkedHashMap<String, String>(items);
        m_panel.setStyleName(I_CmsInputLayoutBundle.INSTANCE.inputCss().multiCheckBox());
        m_panel.addStyleName(I_CmsLayoutBundle.INSTANCE.generalCss().textMedium());
        FocusHandler focusHandler = new FocusHandler() {

            public void onFocus(FocusEvent event) {

                CmsDomUtil.fireFocusEvent(CmsMultiCheckBox.this);
            }
        };
        for (Map.Entry<String, String> entry : items.entrySet()) {
            String value = entry.getValue();
            CmsCheckBox checkbox = new CmsCheckBox(value);
            // wrap the check boxes in FlowPanels to arrange them vertically
            FlowPanel checkboxWrapper = new FlowPanel();
            checkboxWrapper.add(checkbox);
            checkbox.addValueChangeHandler(new ValueChangeHandler<Boolean>() {

                public void onValueChange(ValueChangeEvent<Boolean> valueChanged) {

                    fireValueChanged(getFormValueAsString());
                }
            });
            checkbox.getButton().addFocusHandler(focusHandler);
            m_panel.add(checkboxWrapper);
            m_checkboxes.add(checkbox);
        }
        m_panel.add(m_error);
    }
1357978
@Override
    public void handleTemplateStart(final ITemplateStart templateStart) {
        this.events.add(TemplateStart.asEngineTemplateStart(templateStart));
        // The engine event we might have created is not forwarded - this makes cache creating transparent to the handler chain
        super.handleTemplateStart(templateStart);
    }
165752
def handleClick(self, item, column):
        
        if item.text(0) == 'add another item':
            new_item = self.addEntry()
            self.setCurrentItem(new_item, 1)
            self.editItem(new_item, 1)
        
        elif column == 0:
            self.takeTopLevelItem(self.indexOfTopLevelItem(item))
1340759
function(view){
    var prefix = Marionette.getOption(this, "itemViewEventPrefix");

    // Forward all child item view events through the parent,
    // prepending "itemview:" to the event name
    this.listenTo(view, "all", function(){
      var args = slice(arguments);
      args[0] = prefix + ":" + args[0];
      args.splice(1, 0, view);

      Marionette.triggerMethod.apply(this, args);
    }, this);
  }
2702
public function process($item, $arguments = null, $inheritedScope = null)
    {
        self::trackTemplateUsed($this->chosen);
        return parent::process($item, $arguments, $inheritedScope);
    }
356986
public function addItemFactory(ItemFactoryInterface $itemFactory)
    {
        $class = get_class($itemFactory);

        if (isset($this->itemFactories[$class])) {
            throw new MenuException(sprintf('Item factory "%s" already added to menu.', $class));
        }

        $this->itemFactories[$class] = $itemFactory;
    }
836108
public void onClick(MenuItemClickEvent event) {
		if (feature != null && feature.isSelected()) {
			FeatureTransaction ft = mapWidget.getMapModel().getFeatureEditor().startEditing(
					new Feature[] { feature.clone() }, new Feature[] { feature.clone() });
			mapWidget.render(ft, RenderGroup.VECTOR, RenderStatus.ALL);
			VectorLayer vLayer = feature.getLayer();
			if (vLayer.getLayerInfo().getLayerType() == LayerType.POINT) {
				controller.setController(new PointEditController(mapWidget, controller));
			} else if (vLayer.getLayerInfo().getLayerType() == LayerType.MULTIPOINT) {
				mapWidget.getMapModel().getFeatureEditor().stopEditing();
				mapWidget.render(ft, RenderGroup.VECTOR, RenderStatus.DELETE);
				SC.warn("Editing of MultiPoint layers is not supported yet....");
			} else if (vLayer.getLayerInfo().getLayerType() == LayerType.LINESTRING) {
				controller.setController(new LineStringEditController(mapWidget, controller));
			} else if (vLayer.getLayerInfo().getLayerType() == LayerType.MULTILINESTRING) {
				controller.setController(new MultiLineStringEditController(mapWidget, controller));
			} else if (vLayer.getLayerInfo().getLayerType() == LayerType.POLYGON) {
				controller.setController(new PolygonEditController(mapWidget, controller));
			} else if (vLayer.getLayerInfo().getLayerType() == LayerType.MULTIPOLYGON) {
				controller.setController(new MultiPolygonEditController(mapWidget, controller));
			}
			controller.setEditMode(EditMode.DRAG_MODE);
		}
	}
1018854
function $item(corq, item){
		var typeName = item.type;
		if (!corq.callbacks[typeName]){
			throw "Item handler not found for items of type `" + typeName + "`";
		}
		$debug(corq, 'Corq: Calling handler for item `' + typeName + '`');
		$debug(corq, item.data);
		var _next = function(){
			var freq = (corq.delay) ? corq.delayLength : corq.frequency;
			setTimeout(function(){
				$next(corq);
			}, freq);
		};
		var _success = function(){
			$debug(corq, 'Corq: Item processing SUCCESS `' + typeName + '` ');
			$debug(corq, item.data);
			$success(corq,item);
			_next();
		};
		var _fail = function(){
			$debug(corq, 'Corq: Item processing FAILURE `' + typeName + '` ');
			$debug(corq, item.data);
			$fail(corq, item);
			_next();
		};
		try {
			corq.callbacks[typeName](item.data, _success, _fail);
		}catch(e){
			$debug(corq, 'Corq: Error thrown by item processing function `' + typeName + '` ');
			$debug(corq, item.data);
			_fail();
			throw e;
		}
	}
258963
function onMvcErrorInjectViewTemplate($e)
    {
        if (!$this->error)
            // We have no error detected on prev. event
            return;

        $result = $e->getResult();
        if ($result instanceof Response)
            // Already Have A Response As Result
            return;

        if ($result instanceof ModelInterface)
            // Already Have A View Model
            return;

        if (ArrayUtils::hasStringKeys($result, true))
            $result = new ViewModel($result);
        else
            $result = new ViewModel(['exception_result' => $result]);

        $result->setVariable('exception'
            , new \Exception(
                'An error occurred during execution; please try again later.'
                , null
                , $e->getError()
            )
        );

        $result->setVariable('original_exception', $e->getError());

        $result->setVariable('display_exceptions', (error_reporting() != 0));

        $result->setTemplate(
            $this->__getExceptionTemplate($this->error)
        );

        $e->setResult($result);
    }
1106733
function addItemCreationListener(location, fn) {
		var listeners = itemCreationListeners[location] || [];
		listeners.push(fn);
		itemCreationListeners[location] = listeners;
	}
3405
public void itemStateChangedHandler(ItemEvent e) {
		String valueName = (String) controlToValueName.get(e.getSource());
		LinearInterpolator value = (LinearInterpolator) valueMap.get(valueName);

		if (e.getStateChange() == ItemEvent.SELECTED) {
			value.setActive(true);
			editor.registerValue(value, valueName);
		} else {
			value.setActive(false);
			editor.removeValue(valueName);
		}
	}
208344
@SuppressWarnings("unchecked")
    void onItemClick(MouseEvents.ClickEvent event, Object itemId, Object propertyId) {

        if (!event.isCtrlKey() && !event.isShiftKey()) {
            changeValueIfNotMultiSelect(itemId);
            // don't interfere with multi-selection using control key
            if (event.getButton().equals(MouseButton.RIGHT) || (propertyId == null)) {
                Set<String> jobIds = new HashSet<String>();
                for (CmsJobBean job : (Set<CmsJobBean>)getValue()) {
                    jobIds.add(job.getJob().getId());
                }
                m_menu.setEntries(getMenuEntries(), jobIds);
                m_menu.openForTable(event, itemId, propertyId, this);
            } else if (event.getButton().equals(MouseButton.LEFT)
                && TableProperty.className.toString().equals(propertyId)) {

                String jobId = ((Set<CmsJobBean>)getValue()).iterator().next().getJob().getId();
                m_manager.defaultAction(jobId);
            }
        }
    }
781937
public boolean bind(@NonNull ViewDataBinding binding, T item) {
        if (variableId == VAR_NONE) {
            return false;
        }
        boolean result = binding.setVariable(variableId, item);
        if (!result) {
            Utils.throwMissingVariable(binding, variableId, layoutRes);
        }
        if (extraBindings != null) {
            for (int i = 0, size = extraBindings.size(); i < size; i++) {
                int variableId = extraBindings.keyAt(i);
                Object value = extraBindings.valueAt(i);
                if (variableId != VAR_NONE) {
                    binding.setVariable(variableId, value);
                }
            }
        }
        return true;
    }
1262918
public function renderItem(array $context, CmsItemInterface $item, string $viewType, array $parameters = [], ?string $viewContext = null): string
    {
        try {
            return $this->renderer->renderValue(
                $item,
                $this->getViewContext($context, $viewContext),
                ['view_type' => $viewType] + $parameters
            );
        } catch (Throwable $t) {
            $message = sprintf(
                'Error rendering an item with value "%s" and value type "%s"',
                $item->getValue(),
                $item->getValueType()
            );

            $this->errorHandler->handleError($t, $message);
        }

        return '';
    }
1149006
static void captureEvent(final Element elem, String eventName, final EventHandler handler) {
    // register regular event handler on the element
    HtmlPlatform.captureEvent(elem, eventName, handler);
  }
880761
@SuppressWarnings("unchecked")
    void onItemClick(ItemClickEvent event) {

        if (!event.isCtrlKey() && !event.isShiftKey()) {
            // don't interfere with multi-selection using control key
            if (event.getButton().equals(MouseButton.RIGHT) || (event.getPropertyId() == null)) {
                CmsUUID itemId = (CmsUUID)event.getItemId();
                Set<CmsUUID> value = (Set<CmsUUID>)getValue();
                if (value == null) {
                    select(itemId);
                } else if (!value.contains(itemId)) {
                    setValue(null);
                    select(itemId);
                }
                m_menu.setEntries(getMenuEntries(), (Set<CmsUUID>)getValue());
                m_menu.openForTable(event, this);
            } else if (event.getButton().equals(MouseButton.LEFT) && PROP_NAME.equals(event.getPropertyId())) {
                Item item = event.getItem();
                CmsUUID id = (CmsUUID)item.getItemProperty(PROP_ID).getValue();
                m_manager.openSubView(
                    A_CmsWorkplaceApp.addParamToState(CmsProjectManager.PATH_NAME_FILES, "projectId", id.toString()),
                    true);
            }
        }
    }