Enters the form data. First, the related input elements (if any) to the eventable are filled
in and then it tries to fill in the remaining input elements.

@param eventable the eventable element.
194210
private void handleInputElements(Eventable eventable) {
		CopyOnWriteArrayList<FormInput> formInputs = eventable.getRelatedFormInputs();

		for (FormInput formInput : formHandler.getFormInputs()) {
			if (!formInputs.contains(formInput)) {
				formInputs.add(formInput);
			}
		}

		formHandler.handleFormElements(formInputs);

	}
749871
public final synchronized void addListener(EventListener l) {
        if(l ==null) {
            throw new IllegalArgumentException("Listener " + l +
                                               " is null");
        }
        if(listeners == EMPTY_LISTENERS) {
            listeners = new EventListener[1];
            listeners[0] = l;
        }
        else {
            int i = listeners.length;
            EventListener[] tmp = new EventListener[i+1];
            System.arraycopy(listeners, 0, tmp, 0, i);

            tmp[i] = l;
            listeners = tmp;
        }
    }
866449
public void handleData(String data) {
		try {
			sendEvent(new ClickEvent(this.user, getPayload()));
			if (clickHandler != null)
				clickHandler.clicked();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
256392
protected void init() {
        FormModel model = createFormModel();
        if(getId() == null)
            formId = model.getId();
        if (model instanceof ValidatingFormModel) {
            ValidatingFormModel validatingFormModel = (ValidatingFormModel) model;
            setFormModel(validatingFormModel);
        } else {
            throw new IllegalArgumentException("Unsupported form model implementation " + formModel);
        }
        getApplicationConfig().applicationObjectConfigurer().configure(this, getId());
	}
931235
@Handler
    public void onInput(Input<ByteBuffer> event, Channel channel) {
        Writer writer = inputWriters.get(channel);
        if (writer != null) {
            writer.write(event.buffer());
        }
    }
16893
private void init() {
        if (initialized) return;

        // Initialise variables
        setTokenizer(new CharacterTokenizer(Arrays.asList(',', ';'), ","));
        Editable text = getText();
        assert null != text;
        spanWatcher = new TokenSpanWatcher();
        textWatcher = new TokenTextWatcher();
        hiddenContent = null;
        countSpan = new CountSpan();

        // Initialise TextChangedListeners
        addListeners();

        setTextIsSelectable(false);
        setLongClickable(false);

        //In theory, get the soft keyboard to not supply suggestions. very unreliable
        setInputType(getInputType() |
                InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS |
                InputType.TYPE_TEXT_FLAG_AUTO_COMPLETE);
        setHorizontallyScrolling(false);

        // Listen to IME action keys
        setOnEditorActionListener(this);

        // Initialise the text filter (listens for the split chars)
        setFilters(new InputFilter[]{new InputFilter() {
            @Override
            public CharSequence filter(CharSequence source, int start, int end,
                                       Spanned dest, int destinationStart, int destinationEnd) {
                if (internalEditInProgress) {
                    return null;
                }

                // Token limit check
                if (tokenLimit != -1 && getObjects().size() == tokenLimit) {
                    return "";
                }

                //Detect split characters, remove them and complete the current token instead
                if (tokenizer.containsTokenTerminator(source)) {
                    //Only perform completion if we don't allow free form text, or if there's enough
                    //content to believe this should be a token
                    if (preventFreeFormText || currentCompletionText().length() > 0) {
                        performCompletion();
                        return "";
                    }
                }

                //We need to not do anything when we would delete the prefix
                if (destinationStart < prefix.length()) {
                    //when setText is called, which should only be called during restoring,
                    //destinationStart and destinationEnd are 0. If not checked, it will clear out
                    //the prefix.
                    //This is why we need to return null in this if condition to preserve state.
                    if (destinationStart == 0 && destinationEnd == 0) {
                        return null;
                    } else if (destinationEnd <= prefix.length()) {
                        //Don't do anything
                        return prefix.subSequence(destinationStart, destinationEnd);
                    } else {
                        //Delete everything up to the prefix
                        return prefix.subSequence(destinationStart, prefix.length());
                    }
                }
                return null;
            }
        }});

        initialized = true;
    }
1277855
protected function InitForm()
    {
        $this->submit = $this->LoadElement();
        
        $this->AddNameField();
        $this->AddValueField();
        
        $this->AddCssIDField();
        $this->AddCssClassField();
        $this->AddTemplateField();
        $this->AddSubmit();
    }
981312
public void inputChanged(Viewer viewer, Object oldInput, Object newInput)
	{
		super.inputChanged(viewer, oldInput, newInput);
		this.viewer = viewer;
	}
764319
private void triggerEvents(WebElement element, WebDriver driver) {
		if ("input".equalsIgnoreCase(element.getTagName())) {
			driver.findElement(By.tagName("body")).click();
		}
	}
1025905
public function process()
    {
        if (
            $this->getForm()->getHiddenField($this->id . '_submitted') === null
        ) {
            return;
        }

        parent::process();

        foreach ($this->values as $option_value) {
            $this->getEntryWidget($option_value)->process();
        }
    }
713358
private void init() {

        getElement().setAttribute("contentEditable", "true");
        addStyleName(I_CmsLayoutBundle.INSTANCE.form().input());
        m_active = true;
    }
140200
public void mark(int eventLimit) {
        this.eventLimit = eventLimit;

        // Buffering no events now, clear the buffer and buffered reader
        if (this.eventLimit == 0) {
            this.eventBuffer.clear();
            this.bufferReader = null;
        }
        // Buffering limited set of events, lets trim the buffer if needed
        else if (this.eventLimit > 0) {
            // If there is an iterator check its current position and calculate the new iterator
            // start position
            int iteratorIndex = 0;
            if (this.bufferReader != null) {
                final int nextIndex = this.bufferReader.nextIndex();
                iteratorIndex =
                        Math.max(0, nextIndex - (this.eventBuffer.size() - this.eventLimit));
            }

            // Trim the buffer until it is not larger than the limit
            while (this.eventBuffer.size() > this.eventLimit) {
                this.eventBuffer.poll();
            }

            // If there is an iterator re-create it using the newly calculated index
            if (this.bufferReader != null) {
                this.bufferReader = this.eventBuffer.listIterator(iteratorIndex);
            }
        }
    }
350026
function fill(form_id, data) {
        this._checkInit(form_id);
        for (var input_name in data) {
            if (this._collection[form_id].has(input_name)) {
                this.set(form_id, input_name, data[input_name]);
            }
        }
    }
335484
protected void process(BufferedReader bufferedReader) throws IOException {
        Matcher eventMatcher;
        Matcher exceptionMatcher;
        String line;
        while ((line = bufferedReader.readLine()) != null) {
            //skip empty line entries
            eventMatcher = regexpPattern.matcher(line);
            if (line.trim().equals("")) {continue;}
            exceptionMatcher = exceptionPattern.matcher(line);
            if (eventMatcher.matches()) {
                //build an event from the previous match (held in current map)
                LoggingEvent event = buildEvent();
                if (event != null) {
                    if (passesExpression(event)) {
                        doPost(event);
                    }
                }
                currentMap.putAll(processEvent(eventMatcher.toMatchResult()));
            } else if (exceptionMatcher.matches()) {
                //an exception line
                additionalLines.add(line);
            } else {
                //neither...either post an event with the line or append as additional lines
                //if this was a logging event with multiple lines, each line will show up as its own event instead of being
                //appended as multiple lines on the same event..
                //choice is to have each non-matching line show up as its own line, or append them all to a previous event
                if (appendNonMatches) {
                    //hold on to the previous time, so we can do our best to preserve time-based ordering if the event is a non-match
                    String lastTime = (String)currentMap.get(TIMESTAMP);
                    //build an event from the previous match (held in current map)
                    if (currentMap.size() > 0) {
                        LoggingEvent event = buildEvent();
                        if (event != null) {
                            if (passesExpression(event)) {
                              doPost(event);
                            }
                        }
                    }
                    if (lastTime != null) {
                        currentMap.put(TIMESTAMP, lastTime);
                    }
                    currentMap.put(MESSAGE, line);
                } else {
                    additionalLines.add(line);
                }
            }
        }

        //process last event if one exists
        LoggingEvent event = buildEvent();
        if (event != null) {
            if (passesExpression(event)) {
                doPost(event);
            }
        }
    }
337730
def add_input(self, input):
        '''
        
        '''
        events = xml.dom.pulldom.parse(input)
        context = []
        for (event,node) in events:
            if event == xml.dom.pulldom.START_ELEMENT:
                context.append(node)
                if node.nodeType == xml.dom.Node.ELEMENT_NODE:
                    x_f = self.x_name_(*context)
                    if x_f:
                        events.expandNode(node)
                        # expanding eats the end element, hence walking us out one level
                        context.pop()
                        # call handler
                        (x_f[1])(node)
            elif event == xml.dom.pulldom.END_ELEMENT:
                context.pop()
987874
@SuppressWarnings("nls")
    @Override
    public void entering(String sourceClass, String sourceMethod) {
        writeLog(Level.FINER, "ENTRY {0}.{1}", null, new Object[] {
            sourceClass, sourceMethod
        });
    }
710194
public void handleFormElements(List<FormInput> formInputs) {
		try {
			Document dom = DomUtils.asDocument(browser.getStrippedDomWithoutIframeContent());
			for (FormInput input : formInputs) {
				LOGGER.debug("Filling in: " + input);
				setInputElementValue(formInputValueHelper.getBelongingNode(input, dom), input);
			}
		} catch (IOException | XPathExpressionException e) {
			LOGGER.error(e.getMessage(), e);
		}

	}