Returns a new {@link FieldControl}instance. The element passed either has to be of type
{@link XMLTags#FIELD} or {@link XMLTags#FIELD_REF} or at least contain one of these tags.
554573
public FieldControl getControl(final MathRandom random, Element element, final Range range) {
		if (finder == null) {
			finder = new XmlElementFinder(element.getDocument());
		}
		Element fieldElement = element.getChild(XMLTags.FIELD);
		if (fieldElement != null) {
			element = fieldElement;
		} else {
			fieldElement = element.getChild(XMLTags.FIELD_REF);
			if (fieldElement != null) {
				element = finder.findElementById(fieldElement);
			} else if (XMLTags.FIELD_REF.equals(element.getName())) {
				// search for original field element
				element = finder.findElementById(element);
			}
		}
		element = element.getChild(XMLTags.CONTROL_REF);
		element = finder.findElementById(element);
		if (element == null) {
			throw new IllegalStateException("Could not find control object");
		}
		String className = null;
		Class<? extends FieldControl> classObject = null;
		try {
			className = element.getAttributeValue(XMLTags.CLASS);
			className = className.indexOf('.') > 0 ? className : getClass().getPackage().getName() + '.' + className;
			classObject = Class.forName(className).asSubclass(FieldControl.class);
		} catch (ClassNotFoundException e) {
			throw new IllegalStateException("Could  not load class " + className, e);
		}
		Constructor<? extends FieldControl> constructor = null;
		try {
			constructor = classObject.getConstructor(new Class[] { MathRandom.class, Element.class, Range.class });
		} catch (NoSuchMethodException e) {
			throw new IllegalStateException("Could not find constructor for class " + className, e);
		}
		try {
			return constructor.newInstance(new Object[] { random, element, range });
		} catch (Exception e) {
			throw new IllegalStateException("Could not call constructor for class " + className, e);
		}
	}
1196663
public static CmsBasicFormField createField(CmsXmlContentProperty propertyConfig) {

        return createField(propertyConfig, Collections.<String, String> emptyMap());
    }
1309342
public static DocumentBuilder newControlParser()
        throws ConfigurationException {
        try {
            controlBuilderFactory = getControlDocumentBuilderFactory();
            DocumentBuilder builder =
                controlBuilderFactory.newDocumentBuilder();
            if (controlEntityResolver!=null) {
                builder.setEntityResolver(controlEntityResolver);
            }
            return builder;
        } catch (ParserConfigurationException ex) {
            throw new ConfigurationException(ex);
        }
    }
194887
public AttributeType getTagAttribute() {
      if (tagAttributeType == null) {
         synchronized (this) {
            if (tagAttributeType == null) {
               String attribute = Config.get(typeName, name(), "tag").asString();
               if (StringUtils.isNullOrBlank(attribute) && !AnnotationType.ROOT.equals(getParent())) {
                  tagAttributeType = getParent().getTagAttribute();
               } else if (StringUtils.isNullOrBlank(attribute)) {
                  tagAttributeType = Types.TAG;
               } else {
                  tagAttributeType = AttributeType.create(attribute);
               }
            }
         }
      }
      return tagAttributeType;
   }
828547
protected Converter createConverter(FaceletContext ctx)
    {
        if (this.converterId == null)
        {
            throw new TagException(this.tag,
                                   "Default behavior invoked of requiring a converter-id passed in the constructor, "
                                   + "must override ConvertHandler(ConverterConfig)");
        }
        return ctx.getFacesContext().getApplication().createConverter(this.converterId);
    }
854082
public FaceletTaglibTagType<FaceletTaglibType<T>> getOrCreateTag()
   {
      List<Node> nodeList = childNode.get("tag");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new FaceletTaglibTagTypeImpl<FaceletTaglibType<T>>(this, "tag", childNode, nodeList.get(0));
      }
      return createTag();
   }
813771
public void fieldToControl()
    {
        if (this.getConverter() != null)
        {
            Object objValue = this.getScreenFieldView().getFieldState();
            if (this.getScreenFieldView().getControl() != null)
                this.getScreenFieldView().setComponentState(this.getScreenFieldView().getControl(), objValue);
        }
    }
115935
public static Type forField(Field field) {
		Assert.notNull(field, "Field must not be null");
		return forTypeProvider(new FieldTypeProvider(field));
	}
1095271
public static DocumentBuilderFactory getControlDocumentBuilderFactory() {
        if (controlBuilderFactory == null) {
            controlBuilderFactory = DocumentBuilderFactory.newInstance();
            controlBuilderFactory.setNamespaceAware(true);
            if (enableXXEProtection) {
                DocumentBuilderFactoryConfigurer.Default.configure(controlBuilderFactory);
            }
        }
        return controlBuilderFactory;
    }
682054
protected JComponent createFormControl() {
        TableFormBuilder formBuilder = new TableFormBuilder( getBindingFactory() );
        usernameField = formBuilder.add( LoginDetails.PROPERTY_USERNAME )[1];
        formBuilder.row();
        passwordField = formBuilder.addPasswordField( LoginDetails.PROPERTY_PASSWORD )[1];
        return formBuilder.getForm();
    }
912885
public XML fillOppositeField(Class<?> configuredClass, MappedField configuredField, MappedField targetField) {
		Attribute attribute = null;
		Global global = loadGlobals().get(configuredClass.getName());
		if(!isNull(global)){
			
			String value = global.getValue();
			if(!isEmpty(value) && value.equals(targetField.getValue().getName())){
				String get = global.getGet();
				String set = global.getSet();
				if(!isNull(get) || !isNull(set))
					attribute = new Attribute(null,new Value(global.getValue(),get,set));
			}
		}
		
		if(isNull(attribute))
			attribute = getAttribute(configuredField, configuredClass);

		if(!isNull(attribute)){
			
			Value value = attribute.getValue();
			
			// verifies value
			if(!isNull(value))
				if(targetField.getValue().getName().equals(value.getName())){
					if(isEmpty(targetField.getMethod()))
						targetField.getMethod(value.getGet());
					if(isEmpty(targetField.setMethod()))
						targetField.setMethod(value.getSet());
				}

			SimplyAttribute[] attributes = attribute.getAttributes();
			
			// verifies attributes
			if(!isNull(attributes))
				for (SimplyAttribute targetAttribute : attributes) 
					if(targetField.getValue().getName().equals(targetAttribute.getName())){
						if(isEmpty(targetField.getMethod()))
							targetField.getMethod(targetAttribute.getGet());
						if(isEmpty(targetField.setMethod()))
							targetField.setMethod(targetAttribute.getSet());
					}
		}
		return this;
	}
1353176
public FieldType<BeanType<T>> getOrCreateField()
   {
      List<Node> nodeList = childNode.get("field");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new FieldTypeImpl<BeanType<T>>(this, "field", childNode, nodeList.get(0));
      }
      return createField();
   }
305808
public TagType<TldTaglibType<T>> getOrCreateTag()
   {
      List<Node> nodeList = childNode.get("tag");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new TagTypeImpl<TldTaglibType<T>>(this, "tag", childNode, nodeList.get(0));
      }
      return createTag();
   }
1329878
public static <E extends HTMLElement> TextContentBuilder<E> textElement(String tag, Class<E> type) {
        return new TextContentBuilder<>(createElement(tag, type));
    }
965529
protected Validator createValidator(FaceletContext ctx)
    {
        if (this.validatorId == null)
        {
            throw new TagException(
                                   this.tag,
                                   "Default behavior invoked of requiring a validator-id passed in the "
                                   + "constructor, must override ValidateHandler(ValidatorConfig)");
        }
        return ctx.getFacesContext().getApplication().createValidator(this.validatorId);
    }
1302648
@XmlElementDecl(namespace = "http://www.opengis.net/gml", name = "_reference")
    public JAXBElement<ReferenceType> create_Reference(ReferenceType value) {
        return new JAXBElement<ReferenceType>(__Reference_QNAME, ReferenceType.class, null, value);
    }
526861
public Control createControl(Composite parent) {
		this.control = SWTFactory.createComposite(
				parent, parent.getFont(), 1, 1, GridData.FILL_HORIZONTAL);

		final int nbColumns = this.enableSystemWideSelector ? 3 : 2;
		final Group group = SWTFactory.createGroup(this.control,
				MoreObjects.firstNonNull(this.title, Messages.SREConfigurationBlock_7),
				nbColumns, 1, GridData.FILL_HORIZONTAL);

		if (this.enableSystemWideSelector || !this.projectProviderFactories.isEmpty()) {
			createSystemWideSelector(group);
			createProjectSelector(group);
			this.specificSREButton = SWTFactory.createRadioButton(group,
					Messages.SREConfigurationBlock_2, 1);
			this.specificSREButton.addSelectionListener(new SelectionAdapter() {
				@SuppressWarnings("synthetic-access")
				@Override
				public void widgetSelected(SelectionEvent event) {
					if (SREConfigurationBlock.this.specificSREButton.getSelection()) {
						handleSpecificConfigurationSelected();
					}
				}
			});
		} else {
			this.systemSREButton = null;
			this.projectSREButton = null;
			this.specificSREButton = null;
		}

		createSRESelector(group);

		return getControl();
	}