Fills in the element with the InputValues for input

@param element the node element
@param input   the input data
769578
protected void setInputElementValue(Node element, FormInput input) {

		LOGGER.debug("INPUTFIELD: {} ({})", input.getIdentification(), input.getType());
		if (element == null || input.getInputValues().isEmpty()) {
			return;
		}
		try {

			switch (input.getType()) {
				case TEXT:
				case TEXTAREA:
				case PASSWORD:
					handleText(input);
					break;
				case HIDDEN:
					handleHidden(input);
					break;
				case CHECKBOX:
					handleCheckBoxes(input);
					break;
				case RADIO:
					handleRadioSwitches(input);
					break;
				case SELECT:
					handleSelectBoxes(input);
			}

		} catch (ElementNotVisibleException e) {
			LOGGER.warn("Element not visible, input not completed.");
		} catch (BrowserConnectionException e) {
			throw e;
		} catch (RuntimeException e) {
			LOGGER.error("Could not input element values", e);
		}
	}
435605
@Override
	public void setInput( Input input ) {
		super.setInput(input);
		orientation.reshape(input.width,input.height);
		magnitude.reshape(input.width,input.height);

		computePixelFeatures();
	}
642596
@Override
    public String execute(EditXmlInputs inputs) throws Exception {
        Document doc = XmlUtils.createDocument(inputs.getXml(), inputs.getFilePath(), inputs.getParsingFeatures());
        NodeList nodeList = XmlUtils.readNode(doc, inputs.getXpath1(), XmlUtils.getNamespaceContext(inputs.getXml(), inputs.getFilePath()));
        Node childNode = null;
        Node node;
        Node parentNode;
        // create new Node to insert
        if (Constants.Inputs.TYPE_ELEM.equals(inputs.getType())) {
            childNode = XmlUtils.stringToNode(inputs.getValue(), doc.getXmlEncoding(), inputs.getParsingFeatures());
        }

        for (int i = 0; i < nodeList.getLength(); i++) {
            node = nodeList.item(i);
            if (Constants.Inputs.TYPE_ELEM.equals(inputs.getType())) {
                //check if provided xpath doesn't contain root node
                if (node != doc.getDocumentElement()) {
                    childNode = doc.importNode(childNode, true);
                    parentNode = node.getParentNode();
                    parentNode.insertBefore(childNode, node);
                }
            } else if (Constants.Inputs.TYPE_TEXT.equals(inputs.getType())) {
                node.setTextContent(inputs.getValue() + node.getTextContent());
            } else if (Constants.Inputs.TYPE_ATTR.equals(inputs.getType())) {
                ((Element) node).setAttribute(inputs.getName(), inputs.getValue());
            }
        }
        return DocumentUtils.documentToString(doc);
    }
1327832
public void setInput(final String input)
		throws DecodingException
	{

		boolean zipFlag = input.charAt(0) == '_';
		if (zipFlag) {
			r = new BitReader(inflateInput(
					Base64.decodeBase64(input.substring(1)), 0));
		}
		else {
			byte[] data = Base64.decodeBase64(input);
			if (data == null) {

				for (int i = 0; i < input.length(); i++) {
					System.err.println(i + ": " + (int) input.charAt(i)
							+ " <> " + input.charAt(i));
				}

				throw new DecodingException("BASE 64 DECODING FAILED: " + input);
			}
			r = new BitReader(data);
		}
	}
551126
public final void elementValue() throws RecognitionException {
		int elementValue_StartIndex = input.index();

		try {
			if ( state.backtracking>0 && alreadyParsedRule(input, 69) ) { return; }

			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:629:5: ( conditionalExpression | annotation | elementValueArrayInitializer )
			int alt91=3;
			switch ( input.LA(1) ) {
			case CharacterLiteral:
			case DecimalLiteral:
			case FloatingPointLiteral:
			case HexLiteral:
			case Identifier:
			case OctalLiteral:
			case StringLiteral:
			case 29:
			case 36:
			case 40:
			case 41:
			case 44:
			case 45:
			case 53:
			case 65:
			case 67:
			case 70:
			case 71:
			case 77:
			case 79:
			case 80:
			case 82:
			case 85:
			case 92:
			case 94:
			case 97:
			case 98:
			case 105:
			case 108:
			case 111:
			case 115:
			case 118:
			case 126:
				{
				alt91=1;
				}
				break;
			case 58:
				{
				alt91=2;
				}
				break;
			case 121:
				{
				alt91=3;
				}
				break;
			default:
				if (state.backtracking>0) {state.failed=true; return;}
				NoViableAltException nvae =
					new NoViableAltException("", 91, 0, input);
				throw nvae;
			}
			switch (alt91) {
				case 1 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:629:7: conditionalExpression
					{
					pushFollow(FOLLOW_conditionalExpression_in_elementValue2406);
					conditionalExpression();
					state._fsp--;
					if (state.failed) return;
					}
					break;
				case 2 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:630:9: annotation
					{
					pushFollow(FOLLOW_annotation_in_elementValue2416);
					annotation();
					state._fsp--;
					if (state.failed) return;
					}
					break;
				case 3 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:631:9: elementValueArrayInitializer
					{
					pushFollow(FOLLOW_elementValueArrayInitializer_in_elementValue2426);
					elementValueArrayInitializer();
					state._fsp--;
					if (state.failed) return;
					}
					break;

			}
		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
			if ( state.backtracking>0 ) { memoize(input, 69, elementValue_StartIndex); }

		}
	}
876259
public synchronized void addElement(T element) {
		List<T> origList = ref.get().list;
		boolean isPresent = origList.contains(element);
		if (isPresent) {
			return;
		}
		
		List<T> newList = new ArrayList<T>(origList);
		newList.add(element);
		
		swapWithList(newList);
	}
973161
public void inputValues(boolean... values) {
		for (boolean value : values) {
			InputValue inputValue = new InputValue();
			inputValue.setChecked(value);

			this.inputValues.add(inputValue);
		}
	}
355911
protected void replaceWithChildren(Element element)
    {
        Element parent = (Element) element.getParentNode();
        while (element.getFirstChild() != null) {
            parent.insertBefore(element.removeChild(element.getFirstChild()), element);
        }
        parent.removeChild(element);
    }
710796
public void setInput(String key, String value) {
        if (getAllowedKeys() != null && !getAllowedKeys().contains(key))
            throw new IllegalStateException("The input key " + key + " is not allowed for lookups");

        _inputs.put(key, value);
    }
1146878
function() {
   
      // This element wraps the input node in a float: none div
      this.wrapEl = inputEx.cn('div', {className: 'inputEx-StringField-wrapper'});
      
      // Attributes of the input field
      var attributes = {
         type: 'text',
         id: YAHOO.util.Dom.generateId()
      };
      if(this.options.size) attributes.size = this.options.size;
      if(this.options.readonly) attributes.readonly = 'readonly';
      if(this.options.maxLength) attributes.maxLength = this.options.maxLength;

      // Create the node
      this.el = inputEx.cn('input', attributes);
      
      // Create the hidden input
      var hiddenAttrs = {
         type: 'hidden',
         value: ''
      };
      if(this.options.name) hiddenAttrs.name = this.options.name;
      this.hiddenEl = inputEx.cn('input', hiddenAttrs);
      
      // Append it to the main element
      this.wrapEl.appendChild(this.el);
      this.wrapEl.appendChild(this.hiddenEl);
      this.fieldContainer.appendChild(this.wrapEl);
   
      // Render the list :
      this.listEl = inputEx.cn('div', {id: Dom.generateId() });
      this.fieldContainer.appendChild(this.listEl);
       
      Event.onAvailable([this.el, this.listEl], this.buildAutocomplete, this, true);
   }
1314151
private FormInput formInputMatchingNode(Node element) {
		NamedNodeMap attributes = element.getAttributes();
		Identification id;

		if (attributes.getNamedItem("id") != null
				&& formFillMode != FormFillMode.XPATH_TRAINING) {
			id = new Identification(Identification.How.id,
					attributes.getNamedItem("id").getNodeValue());
			FormInput input = this.formInputs.get(id);
			if (input != null) {
				return input;
			}
		}

		if (attributes.getNamedItem("name") != null
				&& formFillMode != FormFillMode.XPATH_TRAINING) {
			id = new Identification(Identification.How.name,
					attributes.getNamedItem("name").getNodeValue());
			FormInput input = this.formInputs.get(id);
			if (input != null) {
				return input;
			}
		}

		String xpathExpr = XPathHelper.getXPathExpression(element);
		if (xpathExpr != null && !xpathExpr.equals("")) {
			id = new Identification(Identification.How.xpath, xpathExpr);
			FormInput input = this.formInputs.get(id);
			if (input != null) {
				return input;
			}
		}

		return null;
	}
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);
		}

	}
1286248
private void addElement(String key, String value) {
        this.num_items++;
        List<String> vals = this.values.get(key);
        if (null == vals) {
            vals = new LinkedList<String>();
        }
        if (null == value) {
            vals.add("\"\"");
        } else {
            vals.add(value);
        }
        this.values.put(key, vals);
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "addElement: " + key + "=" + value + " num: " + this.num_items);
        }
    }
1074388
public synchronized void addElement(@NonNull T element) {
        hashCached = false;
        this.elementsMap.put(element.getLabel(), element);
        this.elements.add(element);
    }
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()
970547
public void setInputs(Collection<String> inputs) {
    List<String> newInputs = new ArrayList<String>();
    if (inputs != null) {
      newInputs.addAll(inputs);
    }
    this.inputs = newInputs;
  }
82937
@Override
    public void add(int index, E element) {
        final ReentrantLock lock = this.lock;
        lock.lock();
        try {
            Object[] elements = getArray();
            int len = elements.length;
            if (index > len || index < 0)
                throw new IndexOutOfBoundsException("Index: " + index +
                                                    ", Size: " + len);
            Object[] newElements;
            int numMoved = len - index;
            if (numMoved == 0)
                newElements = Arrays.copyOf(elements, len + 1);
            else {
                newElements = new Object[len + 1];
                System.arraycopy(elements, 0, newElements, 0, index);
                System.arraycopy(elements, index, newElements, index + 1,
                                 numMoved);
            }
            newElements[index] = element;
            setArray(newElements);
        } finally {
            lock.unlock();
        }
    }