String generateHtmlForElement(boolean firstRun, MessageSource messageSource, FormCheckerElement elem, boolean html5Validation) {
		InputElementStructure inputStruct = new InputElementStructure();
		// errors
		ValidationResult vr = getErrors(elem, firstRun);
		if (!vr.isValid()) {
			inputStruct.setErrors(formatError(messageSource.getMessage(vr)));
		}

		// label
		boolean displayLabel = !StringUtils.isEmpty(elem.getDescription());
		if (displayLabel) {
			inputStruct.setLabel(getLabelForElement(elem, getLabelAttributes(elem), firstRun));
		}
		// input tag
		Map<String, String> attribs = new LinkedHashMap<>();
		addAttributesToInputFields(attribs, elem);
		inputStruct.setInput(elem.getInputTag(attribs, messageSource, html5Validation));
		// help tag
		if (!StringUtils.isEmpty(elem.getHelpText())) {
			inputStruct.setHelp(getHelpTag(elem.getHelpText(), elem));
		}
		return getCompleteRenderedInput(inputStruct, elem, firstRun);
	}
String generateHtmlForElement(boolean firstRun, MessageSource messageSource, FormCheckerElement elem, boolean html5Validation) {
		InputElementStructure inputStruct = new InputElementStructure();
		
		ValidationResult vr = getErrors(elem, firstRun);
		if (!vr.isValid()) {
			inputStruct.setErrors(formatError(messageSource.getMessage(vr)));
		}

		
		boolean displayLabel = !StringUtils.isEmpty(elem.getDescription());
		if (displayLabel) {
			inputStruct.setLabel(getLabelForElement(elem, getLabelAttributes(elem), firstRun));
		}
		
		Map<String, String> attribs = new LinkedHashMap<>();
		addAttributesToInputFields(attribs, elem);
		inputStruct.setInput(elem.getInputTag(attribs, messageSource, html5Validation));
		
		if (!StringUtils.isEmpty(elem.getHelpText())) {
			inputStruct.setHelp(getHelpTag(elem.getHelpText(), elem));
		}
		return getCompleteRenderedInput(inputStruct, elem, firstRun);
	}
String generateHtmlForElement ( boolean firstRun , MessageSource messageSource , FormCheckerElement elem , boolean html5Validation ) { InputElementStructure inputStruct = new InputElementStructure ( ) ; // errors ValidationResult vr = getErrors ( elem , firstRun ) ; if ( ! vr . isValid ( ) ) { inputStruct . setErrors ( formatError ( messageSource . getMessage ( vr ) ) ) ; } // label boolean displayLabel = ! StringUtils . isEmpty ( elem . getDescription ( ) ) ; if ( displayLabel ) { inputStruct . setLabel ( getLabelForElement ( elem , getLabelAttributes ( elem ) , firstRun ) ) ; } // input tag Map < String , String > attribs = new LinkedHashMap <> ( ) ; addAttributesToInputFields ( attribs , elem ) ; inputStruct . setInput ( elem . getInputTag ( attribs , messageSource , html5Validation ) ) ; // help tag if ( ! StringUtils . isEmpty ( elem . getHelpText ( ) ) ) { inputStruct . setHelp ( getHelpTag ( elem . getHelpText ( ) , elem ) ) ; } return getCompleteRenderedInput ( inputStruct , elem , firstRun ) ; }
builds the html for one element
builds the html for one element