Factory method to create a new {@link JavascriptAppenderBehavior} object from the given
parameters.

@param id
the id
@param javascript
the javascript
@param bindEvent
the bind event
@return the new {@link JavascriptAppenderBehavior} object
343054
public static JavascriptAppenderBehavior of(final String id, final CharSequence javascript,
		final JavascriptBindEvent bindEvent)
	{
		return new JavascriptAppenderBehavior(id, javascript, bindEvent);
	}
758372
public synchronized void addHandler(String handlerId) {
		// If it is first async handler subscribed, then create the main buffer
		if (ringBuffer == null) {
			ringBuffer = new Buffer<Object>(capacity);
		}
		/*
		 * Every new Asynchronous handler starts off with all events from EMQ.
		 * So we write all EMQ messages directly to RingBuffer
		 */

		if (earlyMessageQueue != null && earlyMessageQueue.size() != 0) {
			for (Object message : earlyMessageQueue.toArray()) {
				if (message != null) {
					ringBuffer.add(message);
				}
			}
		}

		handlerEventMap.putIfAbsent(handlerId, new HandlerStats(handlerId, sourceId));
		Tr.event(tc, "Added Asynchronous Handler: " + handlerId);
	}
364520
function parameterBuilder(paramName) {
    // 
    return function (key) {
        // console.log("Declaration");
        // console.log({ key:key});
        // 
        return function (target, propertyKey, parameterIndex) {
            // console.log("Instance");
            // console.log({ key:key, propertyKey: propertyKey,parameterIndex: parameterIndex });
            target.methods = target.methods || {};
            var a = target.methods[propertyKey];
            if (!a) {
                a = [];
                target.methods[propertyKey] = a;
            }
            a[parameterIndex] = new WebAtoms.Rest.ServiceParameter(paramName, key);
        };
    };
}
636767
@Override
	public void addEventHandler(EventHandler eventHandler) {
		Preconditions.checkNotNull(eventHandler.getName(), "Missing Name");
		if(getEventHandler(eventHandler.getName()) != null) {
			throw new ApplicationException(Code.CONFLICT, "EventHandler with name " + eventHandler.getName() + " already exists!");
		}
		index(eventHandler);
		dynoClient.hset(nsKey(EVENT_HANDLERS), eventHandler.getName(), toJson(eventHandler));
		recordRedisDaoRequests("addEventHandler");
	}
366136
public static HeaderActionRule newInstance(String id, Boolean hidden) {
        HeaderActionRule headerActionRule = new HeaderActionRule();
        headerActionRule.setActionId(id);
        headerActionRule.setHidden(hidden);
        return headerActionRule;
    }
556179
function bindEvent(element, type, handler, context) {
    /**
     * Event handler
     * @param {Event} e - event object
     */
    function eventHandler(e) {
        handler.call(context || element, e || window.event);
    }

    /**
     * Event handler for normalize mouseenter event
     * @param {MouseEvent} e - event object
     */
    function mouseEnterHandler(e) {
        e = e || window.event;

        if (checkMouse(element, e)) {
            eventHandler(e);
        }
    }

    if ('addEventListener' in element) {
        if (type === 'mouseenter' || type === 'mouseleave') {
            type = (type === 'mouseenter') ? 'mouseover' : 'mouseout';
            element.addEventListener(type, mouseEnterHandler);
            memorizeHandler(element, type, handler, mouseEnterHandler);
        } else {
            element.addEventListener(type, eventHandler);
            memorizeHandler(element, type, handler, eventHandler);
        }
    } else if ('attachEvent' in element) {
        element.attachEvent(`on${type}`, eventHandler);
        memorizeHandler(element, type, handler, eventHandler);
    }
}
810113
function EventsBinder() {
    var listeners = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
    classCallCheck(this, EventsBinder);

    this.listeners = listeners;
  }
723727
@Override
    public InjectionBinding<WebServiceRef> createInjectionBinding(WebServiceRef webServiceRef, Class<?> instanceClass, Member member, String jndiName) throws InjectionException {
        InjectionBinding<WebServiceRef> binding;

        WebServiceRefInfo wsrInfo = WebServiceRefInfoBuilder.buildWebServiceRefInfo(webServiceRef, instanceClass.getClassLoader());
        wsrInfo.setClientMetaData(JaxWsMetaDataManager.getJaxWsClientMetaData(ivNameSpaceConfig.getModuleMetaData()));
        if (member == null) { //Annotated on class
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "Creating new injection binding for @WebServiceRef annotation found on the " + instanceClass.getName() + " class.");
            }

            this.validateAndSetClassLevelWebServiceRef(webServiceRef, instanceClass, wsrInfo);

            // Now add the @HandlerChain instance
            javax.jws.HandlerChain hcAnnot = instanceClass.getAnnotation(javax.jws.HandlerChain.class);
            if (hcAnnot != null) {
                wsrInfo.setHandlerChainAnnotation(hcAnnot);
                wsrInfo.setHandlerChainDeclaringClassName(instanceClass.getName());
            }

            binding = new WebServiceRefBinding(wsrInfo, ivNameSpaceConfig);

        } else if (member instanceof Method) { //Annotated on method
            Method method = (Method) member;
            wsrInfo.setJndiName(jndiName);

            // Send the wsrInfo to this call so that both the 'type' and 'value' properties can be set correctly
            this.validateAndSetMemberLevelWebServiceRef(webServiceRef, method, wsrInfo);

            // Now add the @HandlerChain instance
            javax.jws.HandlerChain hcAnnot = method.getAnnotation(javax.jws.HandlerChain.class);
            if (hcAnnot != null) {
                wsrInfo.setHandlerChainAnnotation(hcAnnot);
                wsrInfo.setHandlerChainDeclaringClassName(instanceClass.getName());
            }

            //MTOM, RespectBinding, Addressing  
            //Merge any features that might be set on the field (@MTOM, @RespectBinding, @Addressing)
            //Note that we only support features for port-component-ref type injections.
            //For a port-component-ref type injection, the "Service SEI class" will be set on
            //'wsrMetadata'.
            if (wsrInfo.getServiceRefTypeClassName() != null) {
                handleMTOM(webServiceRef, wsrInfo, method.getAnnotation(MTOM.class));
                handleRespectBinding(webServiceRef, wsrInfo, method.getAnnotation(RespectBinding.class));
                handleAddressing(webServiceRef, wsrInfo, method.getAnnotation(Addressing.class));
            }

            // Create binding for @WebServiceRef annotation
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "Creating new injection binding for the @WebServiceRef annotation on the " + method.getName() + " method in the "
                             + method.getDeclaringClass().getName() + " class.");
            }
            binding = new WebServiceRefBinding(wsrInfo, ivNameSpaceConfig);
            addInjectionBinding(binding);
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "Successfully created an injection binding for the @WebServiceRef annotation on the " + method.getName() + " method in the "
                             + method.getDeclaringClass().getName() + " class.");
            }

        } else { //Annotated on field
            Field field = (Field) member;
            wsrInfo.setJndiName(jndiName);

            // Send the wsrInfo to this call so that both the 'type' and 'value' properties can be set correctly
            this.validateAndSetMemberLevelWebServiceRef(webServiceRef, field, wsrInfo);

            // Now add the @HandlerChain instance
            javax.jws.HandlerChain hcAnnot = field.getAnnotation(javax.jws.HandlerChain.class);
            if (hcAnnot != null) {
                wsrInfo.setHandlerChainAnnotation(hcAnnot);
                wsrInfo.setHandlerChainDeclaringClassName(instanceClass.getName());
            }

            //MTOM, RespectBinding, Addressing  
            // Merge any features that might be set on the field (@MTOM, @RespectBinding, @Addressing)
            // Note that we only support features for port-component-ref type injections.
            // For a port-component-ref type injection, the "Service SEI class" will be set on
            // 'wsrMetadata'.
            if (wsrInfo.getServiceRefTypeClassName() != null) {
                handleMTOM(webServiceRef, wsrInfo, field.getAnnotation(MTOM.class));
                handleRespectBinding(webServiceRef, wsrInfo, field.getAnnotation(RespectBinding.class));
                handleAddressing(webServiceRef, wsrInfo, field.getAnnotation(Addressing.class));
            }

            // Create binding for @WebServiceRef annotation
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "Creating new injection binding for the @WebServiceRef annotation on the " + field.getName() + " field in the "
                             + field.getDeclaringClass().getName() + " class.");
            }
            binding = new WebServiceRefBinding(wsrInfo, ivNameSpaceConfig);
            addInjectionBinding(binding);
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "Successfully created an injection binding for the @WebServiceRef annotation on the " + field.getName() + " field in the "
                             + field.getDeclaringClass().getName() + " class. HashCode=" + Integer.toHexString(System.identityHashCode(this)));
            }
        }

        return binding;
    }
608314
def newFromBehavior(name, id=None):
    
    name = name.upper()
    behavior = getBehavior(name, id)
    if behavior is None:
        raise VObjectError("No behavior found named %s" % name)
    if behavior.isComponent:
        obj = Component(name)
    else:
        obj = ContentLine(name, [], '')
    obj.behavior = behavior
    obj.isNative = False
    return obj
290567
public static LinkedBindingBuilder<Servlet> bindCatchallServlet(final Binder binder)
    {
        return binder.bind (Servlet.class).annotatedWith(CATCHALL_NAMED);
    }
328112
public static ComponentFeedbackPanel newComponentFeedbackPanel(final String id,
		final Component filter)
	{
		final ComponentFeedbackPanel feedbackPanel = new ComponentFeedbackPanel(id, filter);
		feedbackPanel.setOutputMarkupId(true);
		return feedbackPanel;
	}
1347001
@Override
	public void fireEvent(String event) throws WidgetException {
		try {
			String javaScript = null;
			if (event.startsWith("mouse")) {
				javaScript = "if(document.createEvent){var evObj = document.createEvent('MouseEvents');evObj.initEvent('" + event
						+ "', true, false); arguments[0].dispatchEvent(evObj);} else if(document.createEventObject) { arguments[0].fireEvent('on" + event + "');}";
			} else {
				javaScript = "if(document.createEvent){var evObj = document.createEvent('HTMLEvents');evObj.initEvent('" + event
						+ "', true, false); arguments[0].dispatchEvent(evObj);} else if(document.createEventObject) { arguments[0].fireEvent('on" + event + "');}";
			}
			eval(javaScript);
		} catch (Exception e) {
			throw new WidgetException("Error while trying to fire event", getByLocator(), e);
		}
	}
548131
function(id) {
        if (typeof id !== "string") {
            YAHOO.log("id is not a string, assuming it is an HTMLElement");
            id = Dom.generateId(id);
        }
        this.logger.log("Adding outer handle event: " + id);
        Event.on(id, "mousedown", 
                this.handleMouseDown, this, true);
        this.setHandleElId(id);

        this.hasOuterHandles = true;
    }
211810
public MethodMetaArgs createCreateMethod(HandlerMetaDef handlerMetaDef, EventModel em) {

		String p_methodName = handlerMetaDef.getCreateMethod();
		if (p_methodName == null) {
			Debug.logError("[JdonFramework] not configure the createMethod parameter: <createMethod name=XXXXX /> ", module);
		}
		return createCRUDMethodMetaArgs(p_methodName, em);
	}
233022
function _createCallBack(callBack, callBackEventData, triggerInformation) {
            return function () {
                try {
                    callBack.func.call(callBack.context, callBackEventData, triggerInformation);
                    callBackEventData = null;//Delete local pointer
                    if (callBack.triggerOnce) {
                        unbind(callBack);
                    }
                    callBack = null;
                } catch (err) {
                    //noinspection JSUnresolvedVariable
                    evUtil.log("Error executing " + triggerInformation.eventName + " eventId: " + callBack.id + "e=" + err.message, "ERROR", "Events");
                }
            };
        }
130426
function createEvent(name) {
    var event = void 0;
    if (typeof document !== 'undefined') {
        event = document.createEvent('HTMLEvents') || document.createEvent('event');
        event.initEvent(name, false, true);
    }
    return event;
}
215017
public ErrorEventDefinitionBuilder errorEventDefinition(String id) {
    ErrorEventDefinition errorEventDefinition = createEmptyErrorEventDefinition();
    if (id != null) {
      errorEventDefinition.setId(id);
    }

    element.getEventDefinitions().add(errorEventDefinition);
    return new ErrorEventDefinitionBuilder(modelInstance, errorEventDefinition);
  }