Adds the hidden form input value assignment that is necessary for the autoscroll
feature to an html link or button onclick attribute.
767996
public static void appendAutoScrollAssignment(FacesContext context,
            StringBuilder onClickValue, String formName)
    {
        appendAutoScrollAssignment(context, new ScriptContext(onClickValue,
                false), formName);
    }
1183098
function() {
        if (this.textarea.element.form) {
          var hiddenField = document.createElement("input");
          hiddenField.type   = "hidden";
          hiddenField.name   = "_wysihtml5_mode";
          hiddenField.value  = 1;
          dom.insert(hiddenField).after(this.textarea.element);
        }
    }
624767
public void addHiddenField(String tag, 
                               String value)
    {
        Element e = new Input(Input.Hidden,tag,value);
        hidden.add(e);
    }
1160897
def set_input(self):
		
		name = self.attrs.get("_override", self.widget.__class__.__name__)
		self.values["field"] = str(FIELDS.get(name, FIELDS.get(None))(self.field, self.attrs))
790319
private void handleHidden(FormInput input) {
		String text = input.getInputValues().iterator().next().getValue();
		if (null == text || text.length() == 0) {
			return;
		}
		WebElement inputElement = browser.getWebElement(input.getIdentification());
		JavascriptExecutor js = (JavascriptExecutor) browser.getWebDriver();
		js.executeScript("arguments[0].setAttribute(arguments[1], arguments[2]);", inputElement,
				"value", text);
	}
534021
function() {
       
      var buttonConf, button, i, buttonsNb = this.options.buttons.length;
      
      this.buttonDiv = inputEx.cn('div', {className: 'inputEx-Form-buttonBar'});

      for(i = 0 ; i < buttonsNb ; i++ ) {
         buttonConf = this.options.buttons[i];
   
         // Throw Error if button is undefined
         if(!buttonConf) {
            throw new Error("inputEx.Form: One of the provided button is undefined ! (check trailing comma)");
         }
         
         button = new inputEx.widget.Button(buttonConf);
         button.render(this.buttonDiv);
         
         this.buttons.push(button);
         
      }
      
      // useful for link buttons re-styling (float required on <a>'s ... )
      this.buttonDiv.appendChild(inputEx.cn('div',null,{clear:'both'}));
      
      this.form.appendChild(this.buttonDiv);
   }
716393
protected function addCancelButton()
    {
        $cancelUrl  = [
            $this->request->getControllerKey() => $this->request->getControllerName(),
            $this->request->getActionKey()     => $this->request->getActionName(),
            $this->resetParam                  => 1,
        ];

        $element = $this->_form->createElement('html', 'reset');
        $element->setLabel(html_entity_decode('&nbsp;'));
        $element->setValue(\Gems_Html::actionLink($cancelUrl, $this->_('Cancel login')));
        $this->_form->addElement($element);
    }
857485
public void addNewAttributeValue(String value) {

        // make sure not to add more values than allowed
        int maxOccurrence = getEntityType().getAttributeMaxOccurrence(m_attributeName);
        CmsEntityAttribute attribute = m_entity.getAttribute(m_attributeName);
        boolean mayHaveMore = ((attribute == null) || (attribute.getValueCount() < maxOccurrence));
        if (mayHaveMore && getAttributeType().isSimpleType()) {
            I_CmsFormEditWidget widget = m_widgetService.getAttributeFormWidget(m_attributeName);
            m_entity.addAttributeValue(m_attributeName, value);
            int valueCount = m_entity.getAttribute(m_attributeName).getValueCount();
            String defaultValue = m_widgetService.getDefaultAttributeValue(
                m_attributeName,
                getSimplePath(valueCount - 1));
            CmsAttributeValueView valueView = null;
            if ((m_attributeValueViews.size() == 1) && !m_attributeValueViews.get(0).hasValue()) {
                valueView = m_attributeValueViews.get(0);
                valueView.setActive();
                // setActive may have reset the value, so we set it again
                m_entity.setAttributeValue(m_attributeName, value, valueCount - 1);
                valueView.getValueWidget().setValue(value);
            } else {
                valueView = new CmsAttributeValueView(
                    this,
                    m_widgetService.getAttributeLabel(m_attributeName),
                    m_widgetService.getAttributeHelp(m_attributeName));
                if (m_widgetService.isDisplaySingleLine(m_attributeName)) {
                    valueView.setCompactMode(CmsAttributeValueView.COMPACT_MODE_SINGLE_LINE);
                }
                ((FlowPanel)m_attributeValueViews.get(0).getParent()).add(valueView);
                valueView.setValueWidget(widget, value, defaultValue, true);
            }
            CmsUndoRedoHandler handler = CmsUndoRedoHandler.getInstance();
            if (handler.isIntitalized()) {
                handler.addChange(
                    m_entity.getId(),
                    m_attributeName,
                    m_entity.getAttribute(m_attributeName).getValueCount() - 1,
                    ChangeType.add);
            }
            updateButtonVisisbility();
        }
    }
1168057
function(keypath, attributes) {
      attributes = $.extend({type: 'hidden'}, this._attributesForKeyPath(keypath), attributes);
      return simple_element('input', attributes);
    }
713578
function (e) {
            this.props.actions.setRenameValue(this.props.parentPath + this.refs.name.value.trim());

            if (e.keyCode !== KeyEvent.DOM_VK_LEFT &&
                    e.keyCode !== KeyEvent.DOM_VK_RIGHT) {
                // update the width of the input field
                var node = this.refs.name,
                    newWidth = _measureText(node.value);
                $(node).width(newWidth);
            }
        }
644889
function(value) {
	      
	   // Div that wraps the deleteButton + the subField
	   var newDiv = inputEx.cn('div');
	      
	   // Delete button
	   var delButton = inputEx.cn('img', {src: inputEx.spacerUrl, className: 'inputEx-ListField-delButton'});
	   Event.addListener( delButton, 'click', this.onDelete, this, true);
	   newDiv.appendChild( delButton );
	      
	   var el = new inputEx.TreeField({parentNode: this, elementType: this.options.elementType, value: value });
	   var subFieldEl = el.getEl();
	   Dom.setStyle(subFieldEl, 'margin-left', '4px');
	   Dom.setStyle(subFieldEl, 'float', 'left');
	   newDiv.appendChild( subFieldEl );
	      
	   // Subscribe the onChange event to resend it 
	   el.updatedEvt.subscribe(this.onChange, this, true);
	
	   // Line breaker
	   newDiv.appendChild( inputEx.cn('div', null, {clear: "both"}) );
	
	   //this.divEl.appendChild(newDiv);
	   this.childContainer.appendChild(newDiv);
	      
	   return el;
	}
1356679
function SetButtonAttribute($optValue, $attribute, $value) {
        if (!isset($this->fieldAttributes[$optValue])) {
            $this->fieldAttributes[$optValue] = array();
        }
        $this->fieldAttributes[$optValue][$attribute] = $value;
    }
1139798
public function showInput()
    {
        $attributes = $this->getInputAttributes();

        if (array_key_exists('name', $attributes)) {
            $inputName = $attributes['name'];
            unset($attributes['name']);
        } else {
            $inputName = static::DEFAULT_INPUT_NAME;
        }
        $input = Input::create(
            'text',
            $inputName,
            null,
            [
                'id' => static::DEFAULT_INPUT_ID,
                'class' => 'form-control ccm-input-captcha',
                'required' => 'required',
            ]
        );
        foreach ($attributes as $attributeName => $attributeValue) {
            if ($attributeValue === null) {
                $input->removeAttribute($attributeName);
            } else {
                switch ($attributeName) {
                    case 'class':
                        $input->addClass($attributeValue);
                        break;
                    default:
                        $input->setAttribute($attributeName, $attributeValue);
                        break;
                }
            }
        }
        echo '<div>', (string) $input, '</div><br />';
    }
18061
protected void addOption(AbstractRenderAppender buffer, String type, String optionValue,
                             String optionDisplay, int idx, String altText, char accessKey, boolean disabled)
            throws JspException
    {
        ServletRequest req = pageContext.getRequest();
        if (_cr == null)
            _cr = TagRenderingBase.Factory.getConstantRendering(req);

        assert(buffer != null);
        assert(optionValue != null);
        assert(optionDisplay != null);
        assert(type != null);

        if (_orientation != null && isVertical()) {
            _cr.TR_TD(buffer);
        }

        _inputState.clear();
        _inputState.type = type;
        _inputState.name = getQualifiedDataSourceName();
        _inputState.value = optionValue;
        _inputState.style = _style;
        _inputState.styleClass = _class;

        if (isMatched(optionValue, null)) {
            _inputState.checked = true;
        }
        _inputState.disabled = isDisabled();
        _inputState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, ALT, altText);
        if (accessKey != 0x00)
            _inputState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, ACCESSKEY, Character.toString(accessKey));

        // if there are attributes defined push them to the options.
        if (_attrs != null && _attrs.size() > 0) {
            Iterator iterator = _attrs.keySet().iterator();
            for (; iterator.hasNext();) {
                String key = (String) iterator.next();
                if (key == null)
                    continue;

                String value = (String) _attrs.get(key);
                _inputState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, key, value);
            }
        }

        TagRenderingBase br = TagRenderingBase.Factory.getRendering(TagRenderingBase.INPUT_BOOLEAN_TAG, req);
        br.doStartTag(buffer, _inputState);
        br.doEndTag(buffer);

        String ls = _labelStyle;
        String lsc = _labelStyleClass;

        _spanState.style = ls;
        _spanState.styleClass = lsc;

        br = TagRenderingBase.Factory.getRendering(TagRenderingBase.SPAN_TAG, req);
        br.doStartTag(buffer, _spanState);
        buffer.append(optionDisplay);
        br.doEndTag(buffer);

        // backward compatibility this is now overridden by the _orientation
        if (_orientation == null) {
            _cr.BR(buffer);
        }
        else {
            if (isVertical()) {
                _cr.TR_TD(buffer);
            }
            else {
                _cr.NBSP(buffer);
            }
        }
    }
989858
function setVal(fill, change, time, noscroll, temp, manual) {
            if (visible && !noscroll) {
                scrollToPos(time, undefined, manual);
            }

            v = s.formatResult(that.temp);

            if (!temp) {
                that.values = that.temp.slice(0);
                that.val = v;
            }

            if (fill) {
                if (input) {
                    elm.val(v);
                    if (change) {
                        preventChange = true;
                        elm.change();
                    }
                }

                event('onValueFill', [v, change]);
            }
        }
1366625
public void setFormValue(Object value) {

        if (value == null) {
            value = "";
        }

        if (value instanceof String) {
            String strValue = (String)value;
            if (strValue.equals("")) {
                // interpret empty string as "no radio button selected"
                reset();
            } else {
                CmsRadioButton button = m_radioButtons.get(value);
                m_group.selectButton(button);
            }
        }
    }
919353
def add_attr(self, name, value):
        """"""
        setattr(self, name, value)
        self.attrs.append(name)