Registers an action element. Action elements implement the Disable interface and are
automatically enabled/disabled when the owning container is enabled/disabled.

@param actionElement A component implementing the Disable interface.
493653
public void registerAction(IDisable actionElement) {
        if (registeredActions == null) {
            registeredActions = new ArrayList<>();
        }

        registeredActions.add(actionElement);
        actionElement.setDisabled(isDisabled());
    }
544706
@NoExport
    public void initFormElement(Element formElement) {

        m_formWrapper = new CmsUgcWrapper(formElement, getSessionId());
        m_formWrapper.setFormSession(this);
    }
718188
@Override
    public void register(CareWebShell shell, ElementBase owner, boolean register) {
        if (register) {
            ElementPlugin plugin = (ElementPlugin) owner;
            Button button = new Button(getCaption());
            button.setName(getId());
            button.setHint(getHint());
            button.setImage(getIcon());
            ActionUtil.addAction(button, getAction());
            plugin.addToolbarComponent(button);
            plugin.registerId(getId(), button);
        }
    }
670018
public void actionToggleElement() throws JspException {

        // set editor values from request
        try {
            setEditorValues(getElementLocale());
        } catch (CmsXmlException e) {
            // an error occurred while trying to set the values, stop action
            showErrorPage(e);
            return;
        }

        // get the necessary parameters to add/remove the element
        int index = 0;
        try {
            index = Integer.parseInt(getParamElementIndex());
        } catch (Exception e) {
            // ignore, should not happen
        }

        if (getAction() == ACTION_ELEMENT_REMOVE) {
            // remove the value , first get the value to remove
            I_CmsXmlContentValue value = m_content.getValue(getParamElementName(), getElementLocale(), index);
            m_content.removeValue(getParamElementName(), getElementLocale(), index);
            // check if the value was a choice option and the last one
            if (value.isChoiceOption()
                && (m_content.getSubValues(
                    CmsXmlUtils.removeLastXpathElement(getParamElementName()),
                    getElementLocale()).size() == 0)) {
                // also remove the parent choice type value
                String xpath = CmsXmlUtils.removeLastXpathElement(getParamElementName());
                m_content.removeValue(xpath, getElementLocale(), CmsXmlUtils.getXpathIndexInt(xpath) - 1);
            }
        } else {
            // add the new value after the clicked element
            if (m_content.hasValue(getParamElementName(), getElementLocale())) {
                // when other values are present, increase index to use right position
                index += 1;
            }
            String elementPath = getParamElementName();
            if (CmsStringUtil.isNotEmpty(getParamChoiceElement())) {
                // we have to add a choice element, first check if the element to add itself is part of a choice or not
                boolean choiceType = Boolean.valueOf(getParamChoiceType()).booleanValue();
                I_CmsXmlSchemaType elemType = m_content.getContentDefinition().getSchemaType(elementPath);
                if (!choiceType || (elemType.isChoiceOption() && elemType.isChoiceType())) {
                    // this is a choice option or a nested choice type to add, remove last element name from xpath
                    elementPath = CmsXmlUtils.removeLastXpathElement(elementPath);
                } else {
                    // this is a choice type to add, first create type element
                    m_content.addValue(getCms(), elementPath, getElementLocale(), index);
                    elementPath = CmsXmlUtils.createXpathElement(elementPath, index + 1);
                    // all eventual following elements to create have to be at first position
                    index = 0;
                }
                // check if there are nested choice elements to add
                if (CmsXmlUtils.isDeepXpath(getParamChoiceElement())) {
                    // create all missing elements except the last one
                    String pathToChoice = CmsXmlUtils.removeLastXpathElement(getParamChoiceElement());
                    String newPath = elementPath;
                    while (CmsStringUtil.isNotEmpty(pathToChoice)) {
                        String createElement = CmsXmlUtils.getFirstXpathElement(pathToChoice);
                        newPath = CmsXmlUtils.concatXpath(newPath, createElement);
                        pathToChoice = CmsXmlUtils.isDeepXpath(pathToChoice)
                        ? CmsXmlUtils.removeFirstXpathElement(pathToChoice)
                        : null;
                        I_CmsXmlContentValue newVal = m_content.addValue(getCms(), newPath, getElementLocale(), index);
                        newPath = newVal.getPath();
                        // all eventual following elements to create have to be at first position
                        index = 0;
                    }
                    // create the path to the last choice element
                    elementPath = CmsXmlUtils.concatXpath(
                        newPath,
                        CmsXmlUtils.getLastXpathElement(getParamChoiceElement()));
                } else {
                    // create the path to the choice element
                    elementPath += "/" + getParamChoiceElement();
                }
            }
            // add the value
            m_content.addValue(getCms(), elementPath, getElementLocale(), index);
        }

        if (getValidationHandler().hasWarnings(getElementLocale())) {
            // there were warnings for the edited content, reset validation handler to avoid display issues
            resetErrorHandler();
        }

        try {
            // write the modified content to the temporary file
            writeContent();
        } catch (CmsException e) {
            // an error occurred while trying to save
            showErrorPage(e);
        }

    }
1074388
public synchronized void addElement(@NonNull T element) {
        hashCached = false;
        this.elementsMap.put(element.getLabel(), element);
        this.elements.add(element);
    }
402799
public void addAction(M element, double value)
    {
        actions.put(element, Double.valueOf(value));
    }
1278062
public void addActionButton(final ToolbarAction action) {
		final IButton button = new IButton();
		button.setWidth(buttonSize);
		button.setHeight(buttonSize);
		button.setIconSize(buttonSize - WidgetLayout.toolbarStripHeight);
		button.setIcon(action.getIcon());
		button.setActionType(SelectionType.BUTTON);
		button.addClickHandler(action);
		button.setShowRollOver(false);
		button.setShowFocused(false);
		button.setTooltip(action.getTooltip());
		button.setDisabled(action.isDisabled());

		if (getMembers() != null && getMembers().length > 0) {
			LayoutSpacer spacer = new LayoutSpacer();
			spacer.setWidth(2);
			super.addMember(spacer);
		}
		action.addToolbarActionHandler(new ToolbarActionHandler() {

			public void onToolbarActionDisabled(ToolbarActionDisabledEvent event) {
				button.setDisabled(true);
			}

			public void onToolbarActionEnabled(ToolbarActionEnabledEvent event) {
				button.setDisabled(false);
			}
		});
		super.addMember(button);
	}
576987
public void register(Object eventListener) {
        Objects.requireNonNull(eventListener, Required.EVENT_LISTENER.toString());
        
        this.eventBus.register(eventListener);
        this.listeners.getAndIncrement();
    }
636685
public void addAction(M element, char value)
    {
        actions.put(element, Character.valueOf(value));
    }
311622
function(actionData) {
						// unbinds the old binding
						controlInstance._bindings.control[methodName](controlInstance.element);
						// binds the new
						controlInstance._bindings.control[methodName] = actionData.processor(
							actionData.delegate || controlInstance.element,
							actionData.parts[2], actionData.parts[1], methodName, controlInstance);
					}
281291
private void enableActions() {
        restoreAction.setEnabled(frame.isMaximum() || frame.isIcon());
        maximizeAction.setEnabled((frame.isMaximizable() && !frame.isMaximum() && !frame.isIcon())
                                      || (frame.isMaximizable() && frame.isIcon()));
        iconifyAction.setEnabled(frame.isIconifiable() && !frame.isIcon());
        closeAction.setEnabled(frame.isClosable());
        sizeAction.setEnabled(false);
        moveAction.setEnabled(false);
    }
228391
public void actionPerformed(java.awt.event.ActionEvent e)
    {
        System.out.println("Action Command: " + e.getActionCommand());
        System.out.println("Action Params : " + e.paramString());
        System.out.println("Action Source : " + e.getSource());
        System.out.println("Action SrcCls : " + e.getSource().getClass().getName());
        org.apache.ojb.broker.metadata.ClassDescriptor cld =
            new org.apache.ojb.broker.metadata.ClassDescriptor(rootNode.getRepository());
        // cld.setClassNameOfObject("New Class");
        cld.setTableName("New Table");
        rootNode.addClassDescriptor(cld);
    }
6022
@Override
  public void actionPerformed(ActionEvent e) {
    // Use a new JFileChooser. Inconsistent behaviour otherwise!
    final JFileChooser fc = new JFileChooser(new File("."));
    if(param.isDefined()) {
      fc.setSelectedFile(param.getValue());
    }

    if(e.getSource() == button) {
      int returnVal = fc.showOpenDialog(button);
      if(returnVal == JFileChooser.APPROVE_OPTION) {
        textfield.setText(fc.getSelectedFile().getPath());
        fireValueChanged();
      }
      // else: do nothing on cancel.
    }
    else if(e.getSource() == textfield) {
      fireValueChanged();
    }
    else {
      LoggingUtil.warning("actionPerformed triggered by unknown source: " + e.getSource());
    }
  }
972090
public void actionPerformed(ActionEvent e)
    {
        if (e.getSource() == this)
        {
            Date dateTarget = this.getTargetDate();
            JCalendarPopup popup = JCalendarPopup.createCalendarPopup(this.getDateParam(), dateTarget, this, languageString);
            popup.addPropertyChangeListener(this);
        }
    }
1332390
public ElementActionBuilder checkInput(boolean checked) {
		CheckInputAction action = new CheckInputAction();
		action.setChecked(checked);
        action(action);
        return new ElementActionBuilder(action);
    }
380463
public final void setElement(final WebElement element) {

		if (element == null) {
			throw new IllegalArgumentException(String.format(ErrorMessages.ERROR_TEMPLATE_VARIABLE_NULL,"element"));
		}

		this.element = element;

		validateElementTag();
		validateAttributes();
	}
954751
private void init(AnnotatedElement element) {
		Annotation[] declaredAnnotations = element.getDeclaredAnnotations();
		this.declaredAnnotationMap = new HashMap<>();
		parseDeclared(declaredAnnotations);
		
		Annotation[] annotations = element.getAnnotations();
		if(declaredAnnotations == annotations) {
			this.annotationMap = this.declaredAnnotationMap;
		}else {
			this.annotationMap = new HashMap<>();
			parse(annotations);
		}
	}