package jwebform.element.structure;

import jwebform.validation.ValidationResult;

// that wat is coming out of a "run" method of an element
public class ElementResult {

	private final String html;
	private final ValidationResult validationResult;		// or just boolean "valid"?
	private final String value;
	private final String name;	// Element name
	
	public ElementResult(String name, String html) {
		this.name = name;
		this.html = html;
		this.validationResult = ValidationResult.undefined();
		this.value = "";
	}

	public String getHtml() {
		return html;
	}

	public ValidationResult getValidationResult() {
		return validationResult;
	}

	public String getValue() {
		return value;
	}

	public String getName() {
		return name;
	}
	
}

@@ -299,16 +299,35 @@
 g value;
+%09// Better Object??
 %0A%09privat
@@ -415,16 +415,160 @@
 html) %7B%0A
+%09%09this(name, html, ValidationResult.undefined(), %22%22);%0A%09%7D%0A%09%0A%09public ElementResult(String name, String html, ValidationResult vr, String value) %7B%0A
 %09%09this.n
@@ -629,36 +629,10 @@
 t = 
-ValidationResult.undefined()
+vr
 ;%0A%09%09
@@ -648,14 +648,19 @@
 e = 
-%22%22
+value
 ;%0A%09%7D
+%0A%09
 %0A%0A%09p

complete constructor