Factory method for create a new {@link RadioChoice}.

@param <T>
the generic type of the model
@param id
the id
@param model
the model
@param choices
The list of choices in the radio choice
@return the new {@link RadioChoice}
423115
public static <T> RadioChoice<T> newRadioChoice(final String id, final IModel<T> model,
		final List<? extends T> choices)
	{
		final RadioChoice<T> radioChoice = new RadioChoice<>(id, model, choices);
		radioChoice.setOutputMarkupId(true);
		return radioChoice;
	}
405992
public void createNestedEntitiesForChoicePath(CmsEntity value, List<String> choicePath) {

        CmsEntity parentValue = value;
        for (String attributeChoice : choicePath) {
            CmsType choiceType = m_entityBackEnd.getType(parentValue.getTypeName()).getAttributeType(
                CmsType.CHOICE_ATTRIBUTE_NAME);
            CmsEntity choice = m_entityBackEnd.createEntity(null, choiceType.getId());
            parentValue.addAttributeValue(CmsType.CHOICE_ATTRIBUTE_NAME, choice);
            CmsType choiceOptionType = choiceType.getAttributeType(attributeChoice);
            if (choiceOptionType.isSimpleType()) {
                String choiceValue = m_widgetService.getDefaultAttributeValue(attributeChoice, getSimplePath(0));
                choice.addAttributeValue(attributeChoice, choiceValue);
                break;
            } else {
                CmsEntity choiceValue = m_entityBackEnd.createEntity(null, choiceOptionType.getId());
                choice.addAttributeValue(attributeChoice, choiceValue);
                parentValue = choiceValue;
            }
        }
    }
584464
public static Choice<AlbumMultipleWrapper, AlbumSingleWrapper> album(android.support.v4.app.Fragment fragment) {
        return new AlbumChoice(fragment.getContext());
    }
1208292
public static Element createElement(String tagName, String id) {
		return IMPL.createElement(tagName, id);
	}
622055
public static <L extends Serializable, R extends Serializable> TwoFormComponentPanel<L, R> newTwoFormComponentPanel(
		final String id, final IModel<TwoFormComponentBean<L, R>> model)
	{
		final TwoFormComponentPanel<L, R> twoFormComponentPanel = new TwoFormComponentPanel<>(id,
			model);
		return twoFormComponentPanel;
	}
1067413
private String genChoiceTypes(StructureDefinition sd, ElementDefinition ed, String id) {
    List<String> choiceEntries = new ArrayList<String>();
    String base = id.replace("[x]", "");

    for(ElementDefinition.TypeRefComponent typ : ed.getType())
      choiceEntries.add(genChoiceEntry(sd, ed, id, base, typ));

    return StringUtils.join(choiceEntries, " |\n");
  }
949557
public JRadioButton createRadioButton(String labelKey) {
		return (JRadioButton) getButtonLabelInfo(getRequiredMessage(labelKey)).configure(createNewRadioButton());
	}
1274828
private Id createMethodConsumerId(RpcClientLookoutModel model) {

        Map<String, String> tags = new HashMap<String, String>(6);

        tags.put("app", StringUtils.defaultString(model.getApp()));
        tags.put("service", StringUtils.defaultString(model.getService()));
        tags.put("method", StringUtils.defaultString(model.getMethod()));
        tags.put("protocol", StringUtils.defaultString(model.getProtocol()));
        tags.put("invoke_type", StringUtils.defaultString(model.getInvokeType()));
        tags.put("target_app", StringUtils.defaultString(model.getTargetApp()));

        return rpcLookoutId.fetchConsumerStatId().withTags(tags);
    }
1321572
public function assertSelectRadioById($label, $id = '')
    {
        $element = $this->getSession()->getPage();
        $radiobutton = $id ? $element->findById($id) : $element->find('named', array('radio', $this->getSession()->getSelectorsHandler()->xpathLiteral($label)));
        if ($radiobutton === null) {
            throw new \Exception(sprintf('The radio button with "%s" was not found on the page %s', $id ? $id : $label, $this->getSession()->getCurrentUrl()));
        }
        $value = $radiobutton->getAttribute('value');
        $radio_id = $radiobutton->getAttribute('id');
        $labelonpage = $element->find('css', "label[for='$radio_id']")->getText();
        if ($label != $labelonpage) {
            throw new \Exception(sprintf("Button with id '%s' has label '%s' instead of '%s' on the page %s", $id, $labelonpage, $label, $this->getSession()->getCurrentUrl()));
        }
        $radiobutton->selectOption($value, false);
    }
293455
public CreateSingleRequestBuilder<T,ID> create(T item)
    {
        return new CreateSingleRequestBuilder<>(version,type,entityName,item);
    }
1217279
public Element createElement(String tagName, String id) {
		Element element = DOM.createElement(tagName).cast();
		DOM.setElementAttribute(element, "id", id);
		return element;
	}
1264813
function() {
    if(lang.isArray(this.radioOptions)) {
        var radioOption, radioValue, radioId, elLabel;
        
        // Create the radio buttons in an IE-friendly way
        for(var i=0, len=this.radioOptions.length; i<len; i++) {
            radioOption = this.radioOptions[i];
            radioValue = lang.isValue(radioOption.value) ?
                    radioOption.value : radioOption;
            radioId = this.getId() + "-radio" + i;
            this.getContainerEl().innerHTML += "<input type=\"radio\"" +
                    " name=\"" + this.getId() + "\"" +
                    " value=\"" + radioValue + "\"" +
                    " id=\"" +  radioId + "\" />"; // Needed for label
            
            // Create the labels in an IE-friendly way
            elLabel = this.getContainerEl().appendChild(document.createElement("label"));
            elLabel.htmlFor = radioId;
            elLabel.innerHTML = (lang.isValue(radioOption.label)) ?
                    radioOption.label : radioOption;
        }
        
        // Store the reference to the checkbox elements
        var allRadios = [],
            elRadio;
        for(var j=0; j<len; j++) {
            elRadio = this.getContainerEl().childNodes[j*2];
            allRadios[allRadios.length] = elRadio;
        }
        this.radios = allRadios;

        if(this.disableBtns) {
            this.handleDisabledBtns();
        }
    }
    else {
        YAHOO.log("Could not find radioOptions", "error", this.toString());
    }
}
1170682
public void setChoices(List<String> choices) {
        if (!limitChoices) throw new IllegalArgumentException("Attempted to set choices when choices are not limited.");

        List<String> sorted = new ArrayList<String>();
        sorted.addAll(choices);
        Collections.sort(sorted);
        ((ComboBoxItem)this.nameItem).setValueMap(sorted);
    }
975307
public static <A, B> Choice2<A, B> b(B b) {
        return new _B<>(b);
    }
1252394
public static Option create(String value, String label, boolean isSelected)
	{
		Option _result = new Option();
		_result.setValue(value);
		_result.setLabel(label);
		_result.setSelected(isSelected);
		return _result;
	}
556368
public void addChoice (Object choice)
    {
        String name = (choice == null) ? "null" : choice.toString();
        addChoice(new Choice(name, choice));
    }
373553
@Override
	protected Button newButton(final String id)
	{
		return new Button(id)
		{
			/**
			 * The serialVersionUID.
			 */
			private static final long serialVersionUID = 1L;

			/**
			 * {@inheritDoc}
			 */
			@Override
			public void onSubmit()
			{
				getAction().execute();
			}
		};
	}