diff --git a/spring-webflow/.classpath b/spring-webflow/.classpath
index 2abf9ad1..2c8bee93 100644
--- a/spring-webflow/.classpath
+++ b/spring-webflow/.classpath
@@ -55,5 +55,6 @@
+
diff --git a/spring-webflow/ivy.xml b/spring-webflow/ivy.xml
index 807f5642..e44c55f0 100644
--- a/spring-webflow/ivy.xml
+++ b/spring-webflow/ivy.xml
@@ -57,6 +57,7 @@
+
diff --git a/spring-webflow/src/main/java/META-INF/faces-config.xml b/spring-webflow/src/main/java/META-INF/faces-config.xml
new file mode 100644
index 00000000..94c6d6d7
--- /dev/null
+++ b/spring-webflow/src/main/java/META-INF/faces-config.xml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+ spring.faces.ClientTextValidator
+ org.springframework.faces.ui.ClientTextValidator
+
+
+
+ spring.faces.ClientNumberValidator
+ org.springframework.faces.ui.ClientNumberValidator
+
+
+
+ spring.faces.ClientDateValidator
+ org.springframework.faces.ui.ClientDateValidator
+
+
+
+ spring.faces.ExtJsComponent
+ org.springframework.faces.ui.ExtJsComponent
+
+
+
+ HTML_BASIC
+
+
+ spring.faces.ExtAdvisor
+ spring.faces.ExtAdvisor
+ org.springframework.faces.ui.ExtAdvisorRenderer
+
+
+
+ spring.faces.ExtAdvisor
+ spring.faces.ExtValidateAll
+ org.springframework.faces.ui.ExtValidateAllRenderer
+
+
+
+
diff --git a/spring-webflow/src/main/java/META-INF/springfaces.taglib.xml b/spring-webflow/src/main/java/META-INF/springfaces.taglib.xml
new file mode 100644
index 00000000..9ae9bf8a
--- /dev/null
+++ b/spring-webflow/src/main/java/META-INF/springfaces.taglib.xml
@@ -0,0 +1,40 @@
+
+
+
+ http://springframework.org/faces
+
+
+ clientTextValidator
+
+ spring.faces.ClientTextValidator
+ spring.faces.ExtAdvisor
+
+
+
+
+ clientNumberValidator
+
+ spring.faces.ClientNumberValidator
+ spring.faces.ExtAdvisor
+
+
+
+
+ clientDateValidator
+
+ spring.faces.ClientDateValidator
+ spring.faces.ExtAdvisor
+
+
+
+
+ validateAllOnClick
+
+ spring.faces.ExtJsComponent
+ spring.faces.ExtValidateAll
+
+
+
+
\ No newline at end of file
diff --git a/spring-webflow/src/main/java/org/springframework/faces/ui/ClientDateValidator.java b/spring-webflow/src/main/java/org/springframework/faces/ui/ClientDateValidator.java
new file mode 100644
index 00000000..4dc283a2
--- /dev/null
+++ b/spring-webflow/src/main/java/org/springframework/faces/ui/ClientDateValidator.java
@@ -0,0 +1,258 @@
+package org.springframework.faces.ui;
+
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+
+public class ClientDateValidator extends ClientTextValidator {
+
+ private static final String EXT_COMPONENT_TYPE = "Ext.form.DateField";
+
+ private static final String[] EXT_ATTRS_INTERNAL = new String[] { "altFormats", "disabledDates",
+ "disabledDatesText", "disabledDays", "disabledDaysText", "format", "maxText", "maxValue", "minText",
+ "minValue", "triggerClass" };
+
+ protected static final String[] EXT_ATTRS;
+
+ static {
+ EXT_ATTRS = new String[ClientTextValidator.EXT_ATTRS.length + EXT_ATTRS_INTERNAL.length];
+ System.arraycopy(ClientTextValidator.EXT_ATTRS, 0, EXT_ATTRS, 0, ClientTextValidator.EXT_ATTRS.length);
+ System.arraycopy(EXT_ATTRS_INTERNAL, 0, EXT_ATTRS, ClientTextValidator.EXT_ATTRS.length,
+ EXT_ATTRS_INTERNAL.length);
+ }
+
+ /**
+ * Multiple date formats separated by "|" to try when parsing a user input value and it doesn't match the defined
+ * format (defaults to 'm/d/Y|m-d-y|m-d-Y|m/d|m-d|d').
+ */
+ private String altFormats;
+
+ /**
+ * An array of "dates" to disable, as strings. These strings will be used to build a dynamic regular expression so
+ * they are very powerful. Some examples:
+ *
+ * ["03/08/2003", "09/16/2003"] would disable those exact dates ["03/08", "09/16"] would disable those days for
+ * every year ["^03/08"] would only match the beginning (useful if you are using short years) ["03/../2006"] would
+ * disable every day in March 2006 ["^03"] would disable every day in every March
+ *
+ * In order to support regular expressions, if you are using a date format that has "." in it, you will have to
+ * escape the dot when restricting dates. For example: ["03\\.08\\.03"].
+ */
+ private String disabledDates;
+
+ /**
+ * The tooltip text to display when the date falls on a disabled date (defaults to 'Disabled')
+ */
+ private String disabledDatesText;
+
+ /**
+ * An array of days to disable, 0 based. For example, [0, 6] disables Sunday and Saturday (defaults to null).
+ */
+ private String disabledDays;
+
+ /**
+ * The tooltip to display when the date falls on a disabled day (defaults to 'Disabled')
+ */
+ private String disabledDaysText;
+
+ /**
+ * The default date format string which can be overriden for localization support. The format must be valid
+ * according to Date.parseDate (defaults to 'm/d/y').
+ */
+ private String format;
+
+ /**
+ * The error text to display when the date in the field is invalid (defaults to '{value} is not a valid date - it
+ * must be in the format {format}').
+ */
+ private String invalidText;
+
+ /**
+ * The error text to display when the date in the cell is after maxValue (defaults to 'The date in this field must
+ * be before {maxValue}').
+ */
+ private String maxText;
+
+ /**
+ * The maximum allowed date. Can be either a Javascript date object or a string date in a valid format (defaults to
+ * null).
+ */
+ private String maxValue;
+
+ /**
+ * The error text to display when the date in the cell is before minValue (defaults to 'The date in this field must
+ * be after {minValue}').
+ */
+ private String minText;
+
+ /**
+ * The minimum allowed date. Can be either a Javascript date object or a string date in a valid format (defaults to
+ * null).
+ */
+ private String minValue;
+
+ /**
+ * An additional CSS class used to style the trigger button. The trigger will always get the class 'x-form-trigger'
+ * and triggerClass will be appended if specified (defaults to 'x-form-date-trigger' which displays a calendar
+ * icon).
+ */
+ private String triggerClass;
+
+ public String getAltFormats() {
+ return altFormats;
+ }
+
+ public void setAltFormats(String altFormats) {
+ this.altFormats = altFormats;
+ }
+
+ public String getDisabledDates() {
+ return disabledDates;
+ }
+
+ public void setDisabledDates(String disabledDates) {
+ this.disabledDates = disabledDates;
+ }
+
+ public String getDisabledDatesText() {
+ if (disabledDatesText != null) {
+ return disabledDatesText;
+ }
+ ValueBinding vb = getValueBinding("disabledDatesText");
+ return vb != null ? (String) vb.getValue(getFacesContext()) : null;
+ }
+
+ public void setDisabledDatesText(String disabledDatesText) {
+ this.disabledDatesText = disabledDatesText;
+ }
+
+ public String getDisabledDays() {
+ return disabledDays;
+ }
+
+ public void setDisabledDays(String disabledDays) {
+ this.disabledDays = disabledDays;
+ }
+
+ public String getDisabledDaysText() {
+ if (disabledDaysText != null) {
+ return disabledDaysText;
+ }
+ ValueBinding vb = getValueBinding("disabledDaysText");
+ return vb != null ? (String) vb.getValue(getFacesContext()) : null;
+ }
+
+ public void setDisabledDaysText(String disabledDaysText) {
+ this.disabledDaysText = disabledDaysText;
+ }
+
+ public String getFormat() {
+ return format;
+ }
+
+ public void setFormat(String format) {
+ this.format = format;
+ }
+
+ public String getInvalidText() {
+ if (invalidText != null) {
+ return invalidText;
+ }
+ ValueBinding vb = getValueBinding("invalidText");
+ return vb != null ? (String) vb.getValue(getFacesContext()) : null;
+ }
+
+ public void setInvalidText(String invalidText) {
+ this.invalidText = invalidText;
+ }
+
+ public String getMaxText() {
+ if (maxText != null) {
+ return maxText;
+ }
+ ValueBinding vb = getValueBinding("maxText");
+ return vb != null ? (String) vb.getValue(getFacesContext()) : null;
+ }
+
+ public void setMaxText(String maxText) {
+ this.maxText = maxText;
+ }
+
+ public String getMaxValue() {
+ return maxValue;
+ }
+
+ public void setMaxValue(String maxValue) {
+ this.maxValue = maxValue;
+ }
+
+ public String getMinText() {
+ if (minText != null) {
+ return minText;
+ }
+ ValueBinding vb = getValueBinding("minText");
+ return vb != null ? (String) vb.getValue(getFacesContext()) : null;
+ }
+
+ public void setMinText(String minText) {
+ this.minText = minText;
+ }
+
+ public String getMinValue() {
+ return minValue;
+ }
+
+ public void setMinValue(String minValue) {
+ this.minValue = minValue;
+ }
+
+ public String getTriggerClass() {
+ return triggerClass;
+ }
+
+ public void setTriggerClass(String triggerClass) {
+ this.triggerClass = triggerClass;
+ }
+
+ protected String[] getExtAttributes() {
+ return EXT_ATTRS;
+ }
+
+ public String getExtComponentType() {
+ return EXT_COMPONENT_TYPE;
+ }
+
+ public Object saveState(FacesContext context) {
+ Object[] values = new Object[13];
+ values[0] = super.saveState(context);
+ values[1] = altFormats;
+ values[2] = disabledDates;
+ values[3] = disabledDatesText;
+ values[4] = disabledDays;
+ values[5] = disabledDaysText;
+ values[6] = format;
+ values[7] = invalidText;
+ values[8] = maxText;
+ values[9] = maxValue;
+ values[10] = minText;
+ values[11] = minValue;
+ values[12] = triggerClass;
+ return values;
+ }
+
+ public void restoreState(FacesContext context, Object state) {
+ Object values[] = (Object[]) state;
+ super.restoreState(context, values[0]);
+ altFormats = (String) values[1];
+ disabledDates = (String) values[2];
+ disabledDatesText = (String) values[3];
+ disabledDays = (String) values[4];
+ disabledDaysText = (String) values[5];
+ format = (String) values[6];
+ invalidText = (String) values[7];
+ maxText = (String) values[8];
+ maxValue = (String) values[9];
+ minText = (String) values[10];
+ minValue = (String) values[11];
+ triggerClass = (String) values[12];
+ }
+}
\ No newline at end of file
diff --git a/spring-webflow/src/main/java/org/springframework/faces/ui/ClientNumberValidator.java b/spring-webflow/src/main/java/org/springframework/faces/ui/ClientNumberValidator.java
new file mode 100644
index 00000000..d7692bfc
--- /dev/null
+++ b/spring-webflow/src/main/java/org/springframework/faces/ui/ClientNumberValidator.java
@@ -0,0 +1,206 @@
+package org.springframework.faces.ui;
+
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+
+public class ClientNumberValidator extends ClientTextValidator {
+
+ private static final String EXT_COMPONENT_TYPE = "Ext.form.NumberField";
+
+ private static final String[] EXT_ATTRS_INTERNAL = new String[] { "allowDecimals", "allowNegative",
+ "decimalPrecision", "decimalSeparator", "maxText", "maxValue", "minText", "minValue", "nanText" };
+
+ protected static final String[] EXT_ATTRS;
+
+ static {
+ EXT_ATTRS = new String[ClientTextValidator.EXT_ATTRS.length + EXT_ATTRS_INTERNAL.length];
+ System.arraycopy(ClientTextValidator.EXT_ATTRS, 0, EXT_ATTRS, 0, ClientTextValidator.EXT_ATTRS.length);
+ System.arraycopy(EXT_ATTRS_INTERNAL, 0, EXT_ATTRS, ClientTextValidator.EXT_ATTRS.length,
+ EXT_ATTRS_INTERNAL.length);
+ }
+
+ /**
+ * False to disallow decimal values (defaults to true)
+ */
+ private Boolean allowDecimals;
+
+ /**
+ * False to prevent entering a negative sign (defaults to true)
+ */
+ private Boolean allowNegative;
+
+ /**
+ * The maximum precision to display after the decimal separator (defaults to 2)
+ */
+ private Integer decimalPrecision;
+
+ /**
+ * Character(s) to allow as the decimal separator (defaults to '.')
+ */
+ private String decimalSeparator;
+
+ /**
+ * The default CSS class for the field (defaults to "x-form-field x-form-num-field")
+ */
+ private String fieldClass;
+
+ /**
+ * Error text to display if the maximum value validation fails (defaults to "The maximum value for this field is
+ * {maxValue}")
+ */
+ private String maxText;
+
+ /**
+ * The maximum allowed value (defaults to Number.MAX_VALUE)
+ */
+ private Integer maxValue;
+
+ /**
+ * Error text to display if the minimum value validation fails (defaults to "The minimum value for this field is
+ * {minValue}")
+ */
+ private String minText;
+
+ /**
+ * The minimum allowed value (defaults to Number.NEGATIVE_INFINITY)
+ */
+ private Integer minValue;
+
+ /**
+ * Error text to display if the value is not a valid number. For example, this can happen if a valid character like
+ * '.' or '-' is left in the field with no number (defaults to "{value} is not a valid number")
+ */
+ private String nanText;
+
+ public Boolean getAllowDecimals() {
+ return allowDecimals;
+ }
+
+ public void setAllowDecimals(Boolean allowDecimals) {
+ this.allowDecimals = allowDecimals;
+ }
+
+ public Boolean getAllowNegative() {
+ return allowNegative;
+ }
+
+ public void setAllowNegative(Boolean allowNegative) {
+ this.allowNegative = allowNegative;
+ }
+
+ public Integer getDecimalPrecision() {
+ return decimalPrecision;
+ }
+
+ public void setDecimalPrecision(Integer decimalPrecision) {
+ this.decimalPrecision = decimalPrecision;
+ }
+
+ public String getDecimalSeparator() {
+ return decimalSeparator;
+ }
+
+ public void setDecimalSeparator(String decimalSeparator) {
+ this.decimalSeparator = decimalSeparator;
+ }
+
+ public String getFieldClass() {
+ return fieldClass;
+ }
+
+ public void setFieldClass(String fieldClass) {
+ this.fieldClass = fieldClass;
+ }
+
+ public String getMaxText() {
+ if (maxText != null) {
+ return maxText;
+ }
+ ValueBinding vb = getValueBinding("maxText");
+ return vb != null ? (String) vb.getValue(getFacesContext()) : null;
+ }
+
+ public void setMaxText(String maxText) {
+ this.maxText = maxText;
+ }
+
+ public Integer getMaxValue() {
+ return maxValue;
+ }
+
+ public void setMaxValue(Integer maxValue) {
+ this.maxValue = maxValue;
+ }
+
+ public String getMinText() {
+ if (minText != null) {
+ return minText;
+ }
+ ValueBinding vb = getValueBinding("minText");
+ return vb != null ? (String) vb.getValue(getFacesContext()) : null;
+ }
+
+ public void setMinText(String minText) {
+ this.minText = minText;
+ }
+
+ public Integer getMinValue() {
+ return minValue;
+ }
+
+ public void setMinValue(Integer minValue) {
+ this.minValue = minValue;
+ }
+
+ public String getNanText() {
+ if (nanText != null) {
+ return nanText;
+ }
+ ValueBinding vb = getValueBinding("nanText");
+ return vb != null ? (String) vb.getValue(getFacesContext()) : null;
+ }
+
+ public void setNanText(String nanText) {
+ this.nanText = nanText;
+ }
+
+ protected String[] getExtAttributes() {
+ return EXT_ATTRS;
+ }
+
+ public String getExtComponentType() {
+ return EXT_COMPONENT_TYPE;
+ }
+
+ public Object saveState(FacesContext context) {
+ Object[] values = new Object[11];
+ values[0] = super.saveState(context);
+ values[1] = allowDecimals;
+ values[2] = allowNegative;
+ values[3] = decimalPrecision;
+ values[4] = decimalSeparator;
+ values[5] = fieldClass;
+ values[6] = maxText;
+ values[7] = maxValue;
+ values[8] = minText;
+ values[9] = minValue;
+ values[10] = nanText;
+ return values;
+ }
+
+ public void restoreState(FacesContext context, Object state) {
+ Object values[] = (Object[]) state;
+ super.restoreState(context, values[0]);
+ allowDecimals = (Boolean) values[1];
+ allowNegative = (Boolean) values[2];
+ decimalPrecision = (Integer) values[3];
+ decimalSeparator = (String) values[4];
+ fieldClass = (String) values[5];
+ maxText = (String) values[6];
+ maxValue = (Integer) values[7];
+ minText = (String) values[8];
+ minValue = (Integer) values[9];
+ nanText = (String) values[10];
+ }
+
+}
diff --git a/spring-webflow/src/main/java/org/springframework/faces/ui/ClientTextValidator.java b/spring-webflow/src/main/java/org/springframework/faces/ui/ClientTextValidator.java
new file mode 100644
index 00000000..eb629795
--- /dev/null
+++ b/spring-webflow/src/main/java/org/springframework/faces/ui/ClientTextValidator.java
@@ -0,0 +1,306 @@
+package org.springframework.faces.ui;
+
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+
+public class ClientTextValidator extends ExtAdvisor {
+
+ private static final String EXT_COMPONENT_TYPE = "Ext.form.TextField";
+
+ private static final String[] EXT_ATTRS_INTERNAL = new String[] { "allowBlank", "blankText", "disableKeyFilter",
+ "emptyClass", "emptyText", "grow", "growMax", "growMin", "maskRe", "maxLength", "maxLengthText",
+ "minLength", "minLengthText", "regex", "regexText", "selectOnFocus" };
+
+ protected static final String[] EXT_ATTRS;
+
+ static {
+ EXT_ATTRS = new String[ExtAdvisor.EXT_ATTRS.length + EXT_ATTRS_INTERNAL.length];
+ System.arraycopy(ExtAdvisor.EXT_ATTRS, 0, EXT_ATTRS, 0, ExtAdvisor.EXT_ATTRS.length);
+ System.arraycopy(EXT_ATTRS_INTERNAL, 0, EXT_ATTRS, ExtAdvisor.EXT_ATTRS.length, EXT_ATTRS_INTERNAL.length);
+ }
+
+ /**
+ * False to validate that the value length > 0 (defaults to true)
+ */
+ private Boolean allowBlank;
+
+ /**
+ * Error text to display if the allow blank validation fails (defaults to "This field is required")
+ */
+ private String blankText;
+
+ /**
+ * True to disable input keystroke filtering (defaults to false)
+ */
+ private Boolean disableKeyFilter;
+
+ /**
+ * The CSS class to apply to an empty field to style the emptyText (defaults to 'x-form-empty-field'). This class is
+ * automatically added and removed as needed depending on the current field value.
+ */
+ private String emptyClass;
+
+ /**
+ * The default text to display in an empty field (defaults to null).
+ */
+ private String emptyText;
+
+ /**
+ * True if this field should automatically grow and shrink to its content
+ */
+ private Boolean grow;
+
+ /**
+ * The maximum width to allow when grow = true (defaults to 800)
+ */
+ private Integer growMax;
+
+ /**
+ * The minimum width to allow when grow = true (defaults to 30)
+ */
+ private Integer growMin;
+
+ /**
+ * An input mask regular expression that will be used to filter keystrokes that don't match (defaults to null)
+ */
+ private String maskRe;
+
+ /**
+ * Maximum input field length allowed (defaults to Number.MAX_VALUE)
+ */
+ private Integer maxLength;
+
+ /**
+ * Error text to display if the maximum length validation fails (defaults to "The maximum length for this field is
+ * {maxLength}")
+ */
+ private String maxLengthText;
+
+ /**
+ * Minimum input field length required (defaults to 0)
+ */
+ private Integer minLength;
+
+ /**
+ * Error text to display if the minimum length validation fails (defaults to "The minimum length for this field is
+ * {minLength}")
+ */
+ private String minLengthText;
+
+ /**
+ * A JavaScript RegExp object to be tested against the field value during validation (defaults to null). If
+ * available, this regex will be evaluated only after the basic validators all return true, and will be passed the
+ * current field value. If the test fails, the field will be marked invalid using regexText.
+ */
+ private String regex;
+
+ /**
+ * The error text to display if regex is used and the test fails during validation (defaults to "")
+ */
+ private String regexText;
+
+ /**
+ * True to automatically select any existing field text when the field receives input focus (defaults to false)
+ */
+ private Boolean selectOnFocus;
+
+ public Boolean getAllowBlank() {
+ return allowBlank;
+ }
+
+ public void setAllowBlank(Boolean allowBlank) {
+ this.allowBlank = allowBlank;
+ }
+
+ public String getBlankText() {
+ if (blankText != null) {
+ return blankText;
+ }
+ ValueBinding vb = getValueBinding("blankText");
+ return vb != null ? (String) vb.getValue(getFacesContext()) : null;
+ }
+
+ public void setBlankText(String blankText) {
+ this.blankText = blankText;
+ }
+
+ public Boolean getDisableKeyFilter() {
+ return disableKeyFilter;
+ }
+
+ public void setDisableKeyFilter(Boolean disableKeyFilter) {
+ this.disableKeyFilter = disableKeyFilter;
+ }
+
+ public String getEmptyClass() {
+ return emptyClass;
+ }
+
+ public void setEmptyClass(String emptyClass) {
+ this.emptyClass = emptyClass;
+ }
+
+ public String getEmptyText() {
+ if (emptyText != null) {
+ return emptyText;
+ }
+ ValueBinding vb = getValueBinding("emptyText");
+ return vb != null ? (String) vb.getValue(getFacesContext()) : null;
+ }
+
+ public void setEmptyText(String emptyText) {
+ this.emptyText = emptyText;
+ }
+
+ public Boolean getGrow() {
+ return grow;
+ }
+
+ public void setGrow(Boolean grow) {
+ this.grow = grow;
+ }
+
+ public Integer getGrowMax() {
+ return growMax;
+ }
+
+ public void setGrowMax(Integer growMax) {
+ this.growMax = growMax;
+ }
+
+ public Integer getGrowMin() {
+ return growMin;
+ }
+
+ public void setGrowMin(Integer growMin) {
+ this.growMin = growMin;
+ }
+
+ public String getMaskRe() {
+ return maskRe;
+ }
+
+ public void setMaskRe(String maskRe) {
+ this.maskRe = maskRe;
+ }
+
+ public Integer getMaxLength() {
+ return maxLength;
+ }
+
+ public void setMaxLength(Integer maxLength) {
+ this.maxLength = maxLength;
+ }
+
+ public String getMaxLengthText() {
+ if (maxLengthText != null) {
+ return maxLengthText;
+ }
+ ValueBinding vb = getValueBinding("maxLengthText");
+ return vb != null ? (String) vb.getValue(getFacesContext()) : null;
+ }
+
+ public void setMaxLengthText(String maskLengthText) {
+ this.maxLengthText = maskLengthText;
+ }
+
+ public Integer getMinLength() {
+ return minLength;
+ }
+
+ public void setMinLength(Integer minLength) {
+ this.minLength = minLength;
+ }
+
+ public String getMinLengthText() {
+ if (minLengthText != null) {
+ return minLengthText;
+ }
+ ValueBinding vb = getValueBinding("minLengthText");
+ return vb != null ? (String) vb.getValue(getFacesContext()) : null;
+ }
+
+ public void setMinLengthText(String minLengthText) {
+ this.minLengthText = minLengthText;
+ }
+
+ public String getRegex() {
+ return regex;
+ }
+
+ public void setRegex(String regex) {
+ this.regex = regex;
+ }
+
+ public String getRegexText() {
+ if (regexText != null) {
+ return regexText;
+ }
+ ValueBinding vb = getValueBinding("regexText");
+ return vb != null ? (String) vb.getValue(getFacesContext()) : null;
+ }
+
+ public void setRegexText(String regexText) {
+ this.regexText = regexText;
+ }
+
+ public Boolean getSelectOnFocus() {
+ return selectOnFocus;
+ }
+
+ public void setSelectOnFocus(Boolean selectOnFocus) {
+ this.selectOnFocus = selectOnFocus;
+ }
+
+ protected String[] getExtAttributes() {
+ return EXT_ATTRS;
+ }
+
+ public String getExtComponentType() {
+ return EXT_COMPONENT_TYPE;
+ }
+
+ public Object saveState(FacesContext context) {
+ Object[] values = new Object[17];
+ values[0] = super.saveState(context);
+ values[1] = allowBlank;
+ values[2] = blankText;
+ values[3] = disableKeyFilter;
+ values[4] = emptyClass;
+ values[5] = emptyText;
+ values[6] = grow;
+ values[7] = growMax;
+ values[8] = growMin;
+ values[9] = maskRe;
+ values[10] = maxLength;
+ values[11] = maxLengthText;
+ values[12] = minLength;
+ values[13] = minLengthText;
+ values[14] = regex;
+ values[15] = regexText;
+ values[16] = selectOnFocus;
+ return values;
+ }
+
+ public void restoreState(FacesContext context, Object state) {
+ Object values[] = (Object[]) state;
+ super.restoreState(context, values[0]);
+ allowBlank = (Boolean) values[1];
+ blankText = (String) values[2];
+ disableKeyFilter = (Boolean) values[3];
+ emptyClass = (String) values[4];
+ emptyText = (String) values[5];
+ grow = (Boolean) values[6];
+ growMax = (Integer) values[7];
+ growMin = (Integer) values[8];
+ maskRe = (String) values[9];
+ maxLength = (Integer) values[10];
+ maxLengthText = (String) values[11];
+ minLength = (Integer) values[12];
+ minLengthText = (String) values[13];
+ regex = (String) values[14];
+ regexText = (String) values[15];
+ selectOnFocus = (Boolean) values[16];
+ }
+
+}
diff --git a/spring-webflow/src/main/java/org/springframework/faces/ui/ExtAdvisor.java b/spring-webflow/src/main/java/org/springframework/faces/ui/ExtAdvisor.java
new file mode 100644
index 00000000..305e6078
--- /dev/null
+++ b/spring-webflow/src/main/java/org/springframework/faces/ui/ExtAdvisor.java
@@ -0,0 +1,271 @@
+package org.springframework.faces.ui;
+
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+
+public abstract class ExtAdvisor extends ExtJsComponent {
+
+ protected static final String[] EXT_ATTRS = new String[] { "cls", "disableClass", "disabled", "fieldClass",
+ "focusClass", "hideMode", "invalidClass", "invalidText", "msgDisplay", "readOnly", "validateOnBlur",
+ "validationDelay", "validationEvent", "width" };
+
+ /**
+ * A CSS class to apply to the field's underlying element.
+ */
+ private String cls;
+
+ /**
+ * CSS class added to the component when it is disabled (defaults to "x-item-disabled").
+ */
+ private String disableClass;
+
+ /**
+ * True to disable the field (defaults to false).
+ */
+ private Boolean disabled;
+
+ /**
+ * The default CSS class for the field (defaults to "x-form-field")
+ */
+ private String fieldClass;
+
+ /**
+ * The CSS class to use when the field receives focus (defaults to "x-form-focus")
+ */
+ private String focusClass;
+
+ /**
+ * How this component should hidden. Supported values are "visibility" (css visibility), "offsets" (negative offset
+ * position) and "display" (css display) - defaults to "display".
+ */
+ private String hideMode;
+
+ /**
+ * The CSS class to use when marking a field invalid (defaults to "x-form-invalid")
+ */
+ private String invalidClass;
+
+ /**
+ * The error text to use when marking a field invalid and no message is provided (defaults to "The value in this
+ * field is invalid")
+ */
+ private String invalidText;
+
+ /**
+ * The CSS class to be applied to the message div when displaying validation messages
+ */
+ private String msgClass;
+
+ /**
+ * The 'display' style to be applied to the message div when displaying validation messages.
+ */
+ private String msgDisplay;
+
+ /**
+ * True to mark the field as readOnly in HTML (defaults to false) -- Note: this only sets the element's readOnly DOM
+ * attribute.
+ */
+ private Boolean readOnly;
+
+ /**
+ * Whether the field should validate when it loses focus (defaults to true).
+ */
+ private Boolean validateOnBlur;
+
+ /**
+ * The length of time in milliseconds after user input begins until validation is initiated (defaults to 250)
+ */
+ private Integer validationDelay;
+
+ /**
+ * The event that should initiate field validation. Set to false to disable automatic validation (defaults to
+ * "keyup").
+ */
+ private String validationEvent;
+
+ /**
+ * The width to be applied to the field
+ */
+ private Integer width;
+
+ public String getCls() {
+ return cls;
+ }
+
+ public void setCls(String cls) {
+ this.cls = cls;
+ }
+
+ public String getDisableClass() {
+ return disableClass;
+ }
+
+ public void setDisableClass(String disableClass) {
+ this.disableClass = disableClass;
+ }
+
+ public Boolean getDisabled() {
+ if (disabled != null) {
+ return disabled;
+ }
+ ValueBinding vb = getValueBinding("disabled");
+ return vb != null ? (Boolean) vb.getValue(getFacesContext()) : null;
+ }
+
+ public void setDisabled(Boolean disabled) {
+ this.disabled = disabled;
+ }
+
+ public String getFieldClass() {
+ return fieldClass;
+ }
+
+ public void setFieldClass(String fieldClass) {
+ this.fieldClass = fieldClass;
+ }
+
+ public String getFocusClass() {
+ return focusClass;
+ }
+
+ public void setFocusClass(String focusClass) {
+ this.focusClass = focusClass;
+ }
+
+ public String getHideMode() {
+ return hideMode;
+ }
+
+ public void setHideMode(String hideMode) {
+ this.hideMode = hideMode;
+ }
+
+ public String getInvalidClass() {
+ return invalidClass;
+ }
+
+ public void setInvalidClass(String invalidClass) {
+ this.invalidClass = invalidClass;
+ }
+
+ public String getInvalidText() {
+ if (invalidText != null) {
+ return invalidText;
+ }
+ ValueBinding vb = getValueBinding("invalidText");
+ return vb != null ? (String) vb.getValue(getFacesContext()) : null;
+ }
+
+ public void setInvalidText(String invalidText) {
+ this.invalidText = invalidText;
+ }
+
+ public String getMsgClass() {
+ if (msgClass != null) {
+ return msgClass;
+ }
+ ValueBinding vb = getValueBinding("msgClass");
+ return vb != null ? (String) vb.getValue(getFacesContext()) : null;
+ }
+
+ public void setMsgClass(String msgClass) {
+ this.msgClass = msgClass;
+ }
+
+ public String getMsgDisplay() {
+ return msgDisplay;
+ }
+
+ public void setMsgDisplay(String msgDisplay) {
+ this.msgDisplay = msgDisplay;
+ }
+
+ public Boolean getReadOnly() {
+ if (readOnly != null) {
+ return readOnly;
+ }
+ ValueBinding vb = getValueBinding("readOnly");
+ return vb != null ? (Boolean) vb.getValue(getFacesContext()) : null;
+ }
+
+ public void setReadOnly(boolean readOnly) {
+ this.readOnly = new Boolean(readOnly);
+ }
+
+ public Boolean getValidateOnBlur() {
+ return validateOnBlur;
+ }
+
+ public void setValidateOnBlur(Boolean validateOnBlur) {
+ this.validateOnBlur = validateOnBlur;
+ }
+
+ public Integer getValidationDelay() {
+ return validationDelay;
+ }
+
+ public void setValidationDelay(Integer validationDelay) {
+ this.validationDelay = validationDelay;
+ }
+
+ public String getValidationEvent() {
+ return validationEvent;
+ }
+
+ public void setValidationEvent(String validationEvent) {
+ this.validationEvent = validationEvent;
+ }
+
+ public Integer getWidth() {
+ return width;
+ }
+
+ public void setWidth(Integer width) {
+ this.width = width;
+ }
+
+ protected abstract String[] getExtAttributes();
+
+ public abstract String getExtComponentType();
+
+ public Object saveState(FacesContext context) {
+ Object[] values = new Object[16];
+ values[0] = super.saveState(context);
+ values[1] = cls;
+ values[2] = disableClass;
+ values[3] = disabled;
+ values[4] = fieldClass;
+ values[5] = focusClass;
+ values[6] = hideMode;
+ values[7] = invalidClass;
+ values[8] = invalidText;
+ values[9] = msgClass;
+ values[10] = msgDisplay;
+ values[11] = readOnly;
+ values[12] = validateOnBlur;
+ values[13] = validationDelay;
+ values[14] = validationEvent;
+ values[15] = width;
+ return values;
+ }
+
+ public void restoreState(FacesContext context, Object state) {
+ Object values[] = (Object[]) state;
+ super.restoreState(context, values[0]);
+ cls = (String) values[1];
+ disableClass = (String) values[2];
+ disabled = (Boolean) values[3];
+ fieldClass = (String) values[4];
+ focusClass = (String) values[5];
+ hideMode = (String) values[6];
+ invalidClass = (String) values[7];
+ invalidText = (String) values[8];
+ msgClass = (String) values[9];
+ msgDisplay = (String) values[10];
+ readOnly = (Boolean) values[11];
+ validateOnBlur = (Boolean) values[12];
+ validationDelay = (Integer) values[13];
+ validationEvent = (String) values[14];
+ width = (Integer) values[15];
+ }
+}
diff --git a/spring-webflow/src/main/java/org/springframework/faces/ui/ExtAdvisorRenderer.java b/spring-webflow/src/main/java/org/springframework/faces/ui/ExtAdvisorRenderer.java
new file mode 100644
index 00000000..765cfb9d
--- /dev/null
+++ b/spring-webflow/src/main/java/org/springframework/faces/ui/ExtAdvisorRenderer.java
@@ -0,0 +1,83 @@
+package org.springframework.faces.ui;
+
+import java.io.IOException;
+
+import javax.faces.FacesException;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+
+/**
+ * A base implementation for use in rendering Ext based components that enhance existing DOM elements.
+ *
+ * @author Jeremy Grelle
+ *
+ */
+public class ExtAdvisorRenderer extends ExtJsRenderer {
+
+ private static final String CLASS_ATTR = "class";
+
+ private static final String ID_ATTR = "id";
+
+ private static final String SCRIPT_ELEMENT = "script";
+
+ private static final String DIV_ELEMENT = "div";
+
+ public void encodeEnd(FacesContext context, UIComponent component) throws IOException {
+
+ ResponseWriter writer = context.getResponseWriter();
+
+ if (component.getChildCount() == 0)
+ throw new FacesException("A Spring Faces advisor expects to have at least one child component.");
+
+ UIComponent advisedChild = (UIComponent) component.getChildren().get(0);
+
+ writer.startElement(DIV_ELEMENT, component);
+ writer.writeAttribute(ID_ATTR, advisedChild.getClientId(context) + ":msg", null);
+ writer.writeAttribute(CLASS_ATTR, ((ExtAdvisor) component).getMsgClass(), null);
+ writer.endElement(DIV_ELEMENT);
+
+ writer.startElement(SCRIPT_ELEMENT, component);
+ StringBuffer script = new StringBuffer();
+ script.append(" SpringFaces.advisors.push(new SpringFaces.ExtGenericFieldAdvisor({ ");
+ script.append(" targetElId : '" + advisedChild.getClientId(context) + "', ");
+ script.append(" msgElId : '" + advisedChild.getClientId(context) + ":msg', ");
+ script.append(" decoratorType : '" + ((ExtAdvisor) component).getExtComponentType() + "', ");
+ script.append(" decoratorAttrs : \"{ ");
+
+ script.append(getExtAttributesAsString(context, component));
+
+ script.append(" }\"})); ");
+
+ writer.writeText(script, null);
+ writer.endElement(SCRIPT_ELEMENT);
+ }
+
+ protected String getExtAttributesAsString(FacesContext context, UIComponent component) {
+
+ ExtAdvisor advisor = (ExtAdvisor) component;
+ StringBuffer attrs = new StringBuffer();
+
+ for (int i = 0; i < advisor.getExtAttributes().length; i++) {
+
+ String key = advisor.getExtAttributes()[i];
+ Object value = advisor.getAttributes().get(key);
+
+ if (value != null) {
+
+ if (attrs.length() > 0)
+ attrs.append(", ");
+
+ attrs.append(key + " : ");
+
+ if (value instanceof String) {
+ attrs.append("'" + value + "'");
+ } else {
+ attrs.append(value);
+ }
+
+ }
+ }
+ return attrs.toString();
+ }
+}
diff --git a/spring-webflow/src/main/java/org/springframework/faces/ui/ExtJsComponent.java b/spring-webflow/src/main/java/org/springframework/faces/ui/ExtJsComponent.java
new file mode 100644
index 00000000..dcedc521
--- /dev/null
+++ b/spring-webflow/src/main/java/org/springframework/faces/ui/ExtJsComponent.java
@@ -0,0 +1,57 @@
+package org.springframework.faces.ui;
+
+import javax.faces.component.UIComponentBase;
+import javax.faces.context.FacesContext;
+
+public class ExtJsComponent extends UIComponentBase {
+
+ /**
+ * The component will render the default ExtJs css resources by default. This may be set to false if the page
+ * developer wants to include their own stylesheet.
+ */
+ private Boolean includeExtStyles = new Boolean(true);
+
+ /**
+ * The component will render an optimized version of the ExtJs javascript that contains only the pieces of the
+ * library used by SpringFaces. This may be set to false if the page developer wants to include their own ExtJs
+ * resources.
+ */
+ private Boolean includeExtScript = new Boolean(true);
+
+ public String getFamily() {
+
+ return "spring.faces.ExtAdvisor";
+ }
+
+ public Boolean getIncludeExtStyles() {
+ return includeExtStyles;
+ }
+
+ public void setIncludeExtStyles(Boolean includeExtStyles) {
+ this.includeExtStyles = includeExtStyles;
+ }
+
+ public Boolean getIncludeExtScript() {
+ return includeExtScript;
+ }
+
+ public void setIncludeExtScript(Boolean includeExtScript) {
+ this.includeExtScript = includeExtScript;
+ }
+
+ public Object saveState(FacesContext context) {
+ Object[] values = new Object[3];
+ values[0] = super.saveState(context);
+ values[1] = includeExtScript;
+ values[2] = includeExtStyles;
+ return values;
+ }
+
+ public void restoreState(FacesContext context, Object state) {
+ Object values[] = (Object[]) state;
+ super.restoreState(context, values[0]);
+ includeExtScript = (Boolean) values[1];
+ includeExtStyles = (Boolean) values[2];
+ }
+
+}
diff --git a/spring-webflow/src/main/java/org/springframework/faces/ui/ExtJsRenderer.java b/spring-webflow/src/main/java/org/springframework/faces/ui/ExtJsRenderer.java
new file mode 100644
index 00000000..c89a5774
--- /dev/null
+++ b/spring-webflow/src/main/java/org/springframework/faces/ui/ExtJsRenderer.java
@@ -0,0 +1,37 @@
+package org.springframework.faces.ui;
+
+import java.io.IOException;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import javax.faces.render.Renderer;
+
+import org.apache.shale.remoting.Mechanism;
+import org.apache.shale.remoting.XhtmlHelper;
+
+public class ExtJsRenderer extends Renderer {
+
+ private static final String EXT_CSS = "/org/springframework/faces/ui/ext/resources/css/ext-all.css";
+
+ private static final String EXT_SCRIPT = "/org/springframework/faces/ui/ext/ext.js";
+
+ private static final String SPRING_FACES_SCRIPT = "/org/springframework/faces/ui/SpringFaces.js";
+
+ private XhtmlHelper resourceHelper = new XhtmlHelper();
+
+ public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
+
+ ExtJsComponent extJsComponent = (ExtJsComponent) component;
+
+ ResponseWriter writer = context.getResponseWriter();
+
+ if (extJsComponent.getIncludeExtStyles().equals(Boolean.TRUE))
+ resourceHelper.linkStylesheet(context, extJsComponent, writer, Mechanism.CLASS_RESOURCE, EXT_CSS);
+
+ if (extJsComponent.getIncludeExtScript().equals(Boolean.TRUE))
+ resourceHelper.linkJavascript(context, extJsComponent, writer, Mechanism.CLASS_RESOURCE, EXT_SCRIPT);
+
+ resourceHelper.linkJavascript(context, extJsComponent, writer, Mechanism.CLASS_RESOURCE, SPRING_FACES_SCRIPT);
+ }
+}
diff --git a/spring-webflow/src/main/java/org/springframework/faces/ui/ExtValidateAllRenderer.java b/spring-webflow/src/main/java/org/springframework/faces/ui/ExtValidateAllRenderer.java
new file mode 100644
index 00000000..7ff1b214
--- /dev/null
+++ b/spring-webflow/src/main/java/org/springframework/faces/ui/ExtValidateAllRenderer.java
@@ -0,0 +1,44 @@
+package org.springframework.faces.ui;
+
+import java.io.IOException;
+
+import javax.faces.FacesException;
+import javax.faces.component.UICommand;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+
+public class ExtValidateAllRenderer extends ExtJsRenderer {
+
+ private static final String SCRIPT_ELEMENT = "script";
+
+ public void encodeEnd(FacesContext context, UIComponent component) throws IOException {
+
+ ResponseWriter writer = context.getResponseWriter();
+
+ if (component.getChildCount() == 0)
+ throw new FacesException("A Spring Faces advisor expects to have at least one child component.");
+
+ if (!(component.getChildren().get(0) instanceof UICommand))
+ throw new FacesException("ValidateAll expects to have a child of type UICommand.");
+
+ UIComponent advisedChild = (UIComponent) component.getChildren().get(0);
+
+ String elementVar = advisedChild.getClientId(context).replaceAll(":", "_") + "_element";
+ String handlerVar = advisedChild.getClientId(context).replaceAll(":", "_") + "_handler";
+
+ writer.startElement(SCRIPT_ELEMENT, component);
+ StringBuffer script = new StringBuffer();
+ script
+ .append(" var " + elementVar + " = document.getElementById('" + advisedChild.getClientId(context)
+ + "');");
+ script.append(" var " + handlerVar + " = " + elementVar + ".onclick;");
+ script.append(elementVar + ".onclick" + " = function(){");
+ script.append(" if(!SpringFaces.validateAll()) return false; ");
+ script.append(handlerVar + "();");
+ script.append("};");
+
+ writer.writeText(script, null);
+ writer.endElement(SCRIPT_ELEMENT);
+ }
+}
diff --git a/spring-webflow/src/main/java/org/springframework/faces/ui/SpringFaces.js b/spring-webflow/src/main/java/org/springframework/faces/ui/SpringFaces.js
new file mode 100644
index 00000000..fb4b6155
--- /dev/null
+++ b/spring-webflow/src/main/java/org/springframework/faces/ui/SpringFaces.js
@@ -0,0 +1,48 @@
+SpringFaces = {};
+
+SpringFaces.advisors = [];
+
+SpringFaces.ExtGenericFieldAdvisor = function(config){
+
+ Ext.apply(this, config);
+};
+
+SpringFaces.ExtGenericFieldAdvisor.prototype = {
+
+ targetElId : "",
+ msgElId : "",
+ decoratorType : "",
+ decorator : null,
+ decoratorAttrs : "",
+
+ apply : function(){
+
+ var target = document.getElementById(this.targetElId);
+ var msgEl = document.getElementById(this.msgElId);
+
+ this.decorator = eval("new "+ this.decoratorType + "(" + this.decoratorAttrs +");" );
+
+ this.decorator.msgTarget=msgEl;
+ this.decorator.applyTo(target);
+ }
+};
+
+SpringFaces.applyAdvisors = function(){
+
+ for (x in SpringFaces.advisors) {
+ SpringFaces.advisors[x].apply();
+ }
+};
+
+SpringFaces.validateAll = function(){
+ var valid = true;
+ for(x in SpringFaces.advisors) {
+ if (SpringFaces.advisors[x].decorator &&
+ !SpringFaces.advisors[x].decorator.validate()) {
+ valid = false;
+ }
+ }
+ return valid;
+};
+
+Ext.onReady(SpringFaces.applyAdvisors);
\ No newline at end of file
diff --git a/spring-webflow/src/main/java/org/springframework/faces/ui/ext/ext.js b/spring-webflow/src/main/java/org/springframework/faces/ui/ext/ext.js
new file mode 100644
index 00000000..ce402120
--- /dev/null
+++ b/spring-webflow/src/main/java/org/springframework/faces/ui/ext/ext.js
@@ -0,0 +1,183 @@
+/*
+ * Ext JS Library 1.1 RC 1
+ * Copyright(c) 2006-2007, Ext JS, LLC.
+ * licensing@extjs.com
+ *
+ * http://www.extjs.com/license
+ */
+
+
+
+Ext={};window["undefined"]=window["undefined"];Ext.apply=function(o,c,_3){if(_3){Ext.apply(o,_3);}if(o&&c&&typeof c=="object"){for(var p in c){o[p]=c[p];}}return o;};(function(){var _5=0;var ua=navigator.userAgent.toLowerCase();var _7=document.compatMode=="CSS1Compat",_8=ua.indexOf("opera")>-1,_9=(/webkit|khtml/).test(ua),_a=ua.indexOf("msie")>-1,_b=ua.indexOf("msie 7")>-1,_c=!_9&&ua.indexOf("gecko")>-1,_d=_a&&!_7,_e=(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1),_f=(ua.indexOf("macintosh")!=-1||ua.indexOf("mac os x")!=-1),_10=(ua.indexOf("linux")!=-1),_11=window.location.href.toLowerCase().indexOf("https")===0;if(_a&&!_b){try{document.execCommand("BackgroundImageCache",false,true);}catch(e){}}Ext.apply(Ext,{isStrict:_7,isSecure:_11,isReady:false,enableGarbageCollector:true,enableListenerCollection:false,SSL_SECURE_URL:"javascript:false",BLANK_IMAGE_URL:"http:/"+"/extjs.com/s.gif",emptyFn:function(){},applyIf:function(o,c){if(o&&c){for(var p in c){if(typeof o[p]=="undefined"){o[p]=c[p];}}}return o;},addBehaviors:function(o){if(!Ext.isReady){Ext.onReady(function(){Ext.addBehaviors(o);});return;}var _16={};for(var b in o){var _18=b.split("@");if(_18[1]){var s=_18[0];if(!_16[s]){_16[s]=Ext.select(s);}_16[s].on(_18[1],o[b]);}}_16=null;},id:function(el,_1b){_1b=_1b||"ext-gen";el=Ext.getDom(el);var id=_1b+(++_5);return el?(el.id?el.id:(el.id=id)):id;},extend:function(){var io=function(o){for(var m in o){this[m]=o[m];}};return function(sb,sp,_22){if(typeof sp=="object"){_22=sp;sp=sb;sb=function(){sp.apply(this,arguments);};}var F=function(){},sbp,spp=sp.prototype;F.prototype=spp;sbp=sb.prototype=new F();sbp.constructor=sb;sb.superclass=spp;if(spp.constructor==Object.prototype.constructor){spp.constructor=sp;}sb.override=function(o){Ext.override(sb,o);};sbp.override=io;Ext.override(sb,_22);return sb;};}(),override:function(_27,_28){if(_28){var p=_27.prototype;for(var _2a in _28){p[_2a]=_28[_2a];}}},namespace:function(){var a=arguments,o=null,i,j,d,rt;for(i=0;i=0){_3d=_24[_3e];}if(!el||!_3d){return false;}this.doRemove(el,_38,_3d[this.WFN],false);delete _24[_3e][this.WFN];delete _24[_3e][this.FN];_24.splice(_3e,1);return true;},getTarget:function(ev,_40){ev=ev.browserEvent||ev;var t=ev.target||ev.srcElement;return this.resolveTextNode(t);},resolveTextNode:function(_42){if(Ext.isSafari&&_42&&3==_42.nodeType){return _42.parentNode;}else{return _42;}},getPageX:function(ev){ev=ev.browserEvent||ev;var x=ev.pageX;if(!x&&0!==x){x=ev.clientX||0;if(Ext.isIE){x+=this.getScroll()[1];}}return x;},getPageY:function(ev){ev=ev.browserEvent||ev;var y=ev.pageY;if(!y&&0!==y){y=ev.clientY||0;if(Ext.isIE){y+=this.getScroll()[0];}}return y;},getXY:function(ev){ev=ev.browserEvent||ev;return[this.getPageX(ev),this.getPageY(ev)];},getRelatedTarget:function(ev){ev=ev.browserEvent||ev;var t=ev.relatedTarget;if(!t){if(ev.type=="mouseout"){t=ev.toElement;}else{if(ev.type=="mouseover"){t=ev.fromElement;}}}return this.resolveTextNode(t);},getTime:function(ev){ev=ev.browserEvent||ev;if(!ev.time){var t=new Date().getTime();try{ev.time=t;}catch(ex){this.lastError=ex;return t;}}return ev.time;},stopEvent:function(ev){this.stopPropagation(ev);this.preventDefault(ev);},stopPropagation:function(ev){ev=ev.browserEvent||ev;if(ev.stopPropagation){ev.stopPropagation();}else{ev.cancelBubble=true;}},preventDefault:function(ev){ev=ev.browserEvent||ev;if(ev.preventDefault){ev.preventDefault();}else{ev.returnValue=false;}},getEvent:function(e){var ev=e||window.event;if(!ev){var c=this.getEvent.caller;while(c){ev=c.arguments[0];if(ev&&Event==ev.constructor){break;}c=c.caller;}}return ev;},getCharCode:function(ev){ev=ev.browserEvent||ev;return ev.charCode||ev.keyCode||0;},_getCacheIndex:function(el,_54,fn){for(var i=0,len=_24.length;i0);}var _5d=[];for(var i=0,len=_27.length;i0){for(var i=0,len=_6f.length;i0){j=_24.length;while(j){_79=j-1;l=_24[_79];if(l){EU.removeListener(l[EU.EL],l[EU.TYPE],l[EU.FN],_79);}j=j-1;}l=null;EU.clearCache();}EU.doRemove(window,"unload",EU._unload);},getScroll:function(){var dd=document.documentElement,db=document.body;if(dd&&(dd.scrollTop||dd.scrollLeft)){return[dd.scrollTop,dd.scrollLeft];}else{if(db){return[db.scrollTop,db.scrollLeft];}else{return[0,0];}}},doAdd:function(){if(window.addEventListener){return function(el,_7e,fn,_80){el.addEventListener(_7e,fn,(_80));};}else{if(window.attachEvent){return function(el,_82,fn,_84){el.attachEvent("on"+_82,fn);};}else{return function(){};}}}(),doRemove:function(){if(window.removeEventListener){return function(el,_86,fn,_88){el.removeEventListener(_86,fn,(_88));};}else{if(window.detachEvent){return function(el,_8a,fn){el.detachEvent("on"+_8a,fn);};}else{return function(){};}}}()};}();var E=Ext.lib.Event;E.on=E.addListener;E.un=E.removeListener;if(document&&document.body){E._load();}else{E.doAdd(window,"load",E._load);}E.doAdd(window,"unload",E._unload);E._tryPreloadAttach();Ext.lib.Ajax={request:function(_8d,uri,cb,_90,_91){if(_91){var hs=_91.headers;if(hs){for(var h in hs){if(hs.hasOwnProperty(h)){this.initHeader(h,hs[h],false);}}}if(_91.xmlData){this.initHeader("Content-Type","text/xml",false);_8d="POST";_90=_91.xmlData;}}return this.asyncRequest(_8d,uri,cb,_90);},serializeForm:function(_94){if(typeof _94=="string"){_94=(document.getElementById(_94)||document.forms[_94]);}var el,_96,val,_98,_99="",_9a=false;for(var i=0;i<_94.elements.length;i++){el=_94.elements[i];_98=_94.elements[i].disabled;_96=_94.elements[i].name;val=_94.elements[i].value;if(!_98&&_96){switch(el.type){case"select-one":case"select-multiple":for(var j=0;j=200&&_b2<300){_b3=this.createResponseObject(o,_b0.argument);if(_b0.success){if(!_b0.scope){_b0.success(_b3);}else{_b0.success.apply(_b0.scope,[_b3]);}}}else{switch(_b2){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:_b3=this.createExceptionObject(o.tId,_b0.argument,(_b1?_b1:false));if(_b0.failure){if(!_b0.scope){_b0.failure(_b3);}else{_b0.failure.apply(_b0.scope,[_b3]);}}break;default:_b3=this.createResponseObject(o,_b0.argument);if(_b0.failure){if(!_b0.scope){_b0.failure(_b3);}else{_b0.failure.apply(_b0.scope,[_b3]);}}}}this.releaseObject(o);_b3=null;},createResponseObject:function(o,_b5){var obj={};var _b7={};try{var _b8=o.conn.getAllResponseHeaders();var _b9=_b8.split("\n");for(var i=0;i<_b9.length;i++){var _bb=_b9[i].indexOf(":");if(_bb!=-1){_b7[_b9[i].substring(0,_bb)]=_b9[i].substring(_bb+2);}}}catch(e){}obj.tId=o.tId;obj.status=o.conn.status;obj.statusText=o.conn.statusText;obj.getResponseHeader=_b7;obj.getAllResponseHeaders=_b8;obj.responseText=o.conn.responseText;obj.responseXML=o.conn.responseXML;if(typeof _b5!==undefined){obj.argument=_b5;}return obj;},createExceptionObject:function(tId,_bd,_be){var _bf=0;var _c0="communication failure";var _c1=-1;var _c2="transaction aborted";var obj={};obj.tId=tId;if(_be){obj.status=_c1;obj.statusText=_c2;}else{obj.status=_bf;obj.statusText=_c0;}if(_bd){obj.argument=_bd;}return obj;},initHeader:function(_c4,_c5,_c6){var _c7=(_c6)?this.defaultHeaders:this.headers;if(_c7[_c4]===undefined){_c7[_c4]=_c5;}else{_c7[_c4]=_c5+","+_c7[_c4];}if(_c6){this.hasDefaultHeaders=true;}else{this.hasHeaders=true;}},setHeader:function(o){if(this.hasDefaultHeaders){for(var _c9 in this.defaultHeaders){if(this.defaultHeaders.hasOwnProperty(_c9)){o.conn.setRequestHeader(_c9,this.defaultHeaders[_c9]);}}}if(this.hasHeaders){for(var _c9 in this.headers){if(this.headers.hasOwnProperty(_c9)){o.conn.setRequestHeader(_c9,this.headers[_c9]);}}this.headers={};this.hasHeaders=false;}},resetDefaultHeaders:function(){delete this.defaultHeaders;this.defaultHeaders={};this.hasDefaultHeaders=false;},abort:function(o,_cb,_cc){if(this.isCallInProgress(o)){o.conn.abort();window.clearInterval(this.poll[o.tId]);delete this.poll[o.tId];if(_cc){delete this.timeout[o.tId];}this.handleTransactionResponse(o,_cb,true);return true;}else{return false;}},isCallInProgress:function(o){if(o&&o.conn){return o.conn.readyState!=4&&o.conn.readyState!=0;}else{return false;}},releaseObject:function(o){o.conn=null;o=null;},activeX:["MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"]};Ext.lib.Region=function(t,r,b,l){this.top=t;this[1]=t;this.right=r;this.bottom=b;this.left=l;this[0]=l;};Ext.lib.Region.prototype={contains:function(_d3){return(_d3.left>=this.left&&_d3.right<=this.right&&_d3.top>=this.top&&_d3.bottom<=this.bottom);},getArea:function(){return((this.bottom-this.top)*(this.right-this.left));},intersect:function(_d4){var t=Math.max(this.top,_d4.top);var r=Math.min(this.right,_d4.right);var b=Math.min(this.bottom,_d4.bottom);var l=Math.max(this.left,_d4.left);if(b>=t&&r>=l){return new Ext.lib.Region(t,r,b,l);}else{return null;}},union:function(_d9){var t=Math.min(this.top,_d9.top);var r=Math.max(this.right,_d9.right);var b=Math.max(this.bottom,_d9.bottom);var l=Math.min(this.left,_d9.left);return new Ext.lib.Region(t,r,b,l);},adjust:function(t,l,b,r){this.top+=t;this.left+=l;this.right+=r;this.bottom+=b;return this;}};Ext.lib.Region.getRegion=function(el){var p=Ext.lib.Dom.getXY(el);var t=p[1];var r=p[0]+el.offsetWidth;var b=p[1]+el.offsetHeight;var l=p[0];return new Ext.lib.Region(t,r,b,l);};Ext.lib.Point=function(x,y){if(x instanceof Array){y=x[1];x=x[0];}this.x=this.right=this.left=this[0]=x;this.y=this.top=this.bottom=this[1]=y;};Ext.lib.Point.prototype=new Ext.lib.Region();Ext.lib.Anim={scroll:function(el,_eb,_ec,_ed,cb,_ef){this.run(el,_eb,_ec,_ed,cb,_ef,Ext.lib.Scroll);},motion:function(el,_f1,_f2,_f3,cb,_f5){this.run(el,_f1,_f2,_f3,cb,_f5,Ext.lib.Motion);},color:function(el,_f7,_f8,_f9,cb,_fb){this.run(el,_f7,_f8,_f9,cb,_fb,Ext.lib.ColorAnim);},run:function(el,_fd,_fe,_ff,cb,_101,type){type=type||Ext.lib.AnimBase;if(typeof _ff=="string"){_ff=Ext.lib.Easing[_ff];}var anim=new type(el,_fd,_fe,_ff);anim.animateX(function(){Ext.callback(cb,_101);});return anim;}};function fly(el){if(!_1){_1=new Ext.Element.Flyweight();}_1.dom=el;return _1;}if(Ext.isIE){function fnCleanUp(){var p=Function.prototype;delete p.createSequence;delete p.defer;delete p.createDelegate;delete p.createCallback;delete p.createInterceptor;window.detachEvent("onunload",fnCleanUp);}window.attachEvent("onunload",fnCleanUp);}Ext.lib.AnimBase=function(el,_107,_108,_109){if(el){this.init(el,_107,_108,_109);}};Ext.lib.AnimBase.prototype={toString:function(){var el=this.getEl();var id=el.id||el.tagName;return("Anim "+id);},patterns:{noNegatives:/width|height|opacity|padding/i,offsetAttribute:/^((width|height)|(top|left))$/,defaultUnit:/width|height|top$|bottom$|left$|right$/i,offsetUnit:/\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i},doMethod:function(attr,_10d,end){return this.method(this.currentFrame,_10d,end-_10d,this.totalFrames);},setAttribute:function(attr,val,unit){if(this.patterns.noNegatives.test(attr)){val=(val>0)?val:0;}Ext.fly(this.getEl(),"_anim").setStyle(attr,val+unit);},getAttribute:function(attr){var el=this.getEl();var val=fly(el).getStyle(attr);if(val!=="auto"&&!this.patterns.offsetUnit.test(val)){return parseFloat(val);}var a=this.patterns.offsetAttribute.exec(attr)||[];var pos=!!(a[3]);var box=!!(a[2]);if(box||(fly(el).getStyle("position")=="absolute"&&pos)){val=el["offset"+a[0].charAt(0).toUpperCase()+a[0].substr(1)];}else{val=0;}return val;},getDefaultUnit:function(attr){if(this.patterns.defaultUnit.test(attr)){return"px";}return"";},animateX:function(_119,_11a){var f=function(){this.onComplete.removeListener(f);if(typeof _119=="function"){_119.call(_11a||this,this);}};this.onComplete.addListener(f,this);this.animate();},setRuntimeAttribute:function(attr){var _11d;var end;var _11f=this.attributes;this.runtimeAttributes[attr]={};var _120=function(prop){return(typeof prop!=="undefined");};if(!_120(_11f[attr]["to"])&&!_120(_11f[attr]["by"])){return false;}_11d=(_120(_11f[attr]["from"]))?_11f[attr]["from"]:this.getAttribute(attr);if(_120(_11f[attr]["to"])){end=_11f[attr]["to"];}else{if(_120(_11f[attr]["by"])){if(_11d.constructor==Array){end=[];for(var i=0,len=_11d.length;i0&&isFinite(_14b)){if(_146.currentFrame+_14b>=_147){_14b=_147-(_148+1);}_146.currentFrame+=_14b;}};};Ext.lib.Bezier=new function(){this.getPosition=function(_14c,t){var n=_14c.length;var tmp=[];for(var i=0;i0&&!(_1d0[0]instanceof Array)){_1d0=[_1d0];}else{var tmp=[];for(i=0,len=_1d0.length;i0){this.runtimeAttributes[attr]=this.runtimeAttributes[attr].concat(_1d0);}this.runtimeAttributes[attr][this.runtimeAttributes[attr].length]=end;}else{_1be.setRuntimeAttribute.call(this,attr);}};var _1d6=function(val,_1d9){var _1da=Ext.lib.Dom.getXY(this.getEl());val=[val[0]-_1da[0]+_1d9[0],val[1]-_1da[1]+_1d9[1]];return val;};var _1d5=function(prop){return(typeof prop!=="undefined");};})();(function(){Ext.lib.Scroll=function(el,_1dd,_1de,_1df){if(el){Ext.lib.Scroll.superclass.constructor.call(this,el,_1dd,_1de,_1df);}};Ext.extend(Ext.lib.Scroll,Ext.lib.ColorAnim);var Y=Ext.lib;var _1e1=Y.Scroll.superclass;var _1e2=Y.Scroll.prototype;_1e2.toString=function(){var el=this.getEl();var id=el.id||el.tagName;return("Scroll "+id);};_1e2.doMethod=function(attr,_1e6,end){var val=null;if(attr=="scroll"){val=[this.method(this.currentFrame,_1e6[0],end[0]-_1e6[0],this.totalFrames),this.method(this.currentFrame,_1e6[1],end[1]-_1e6[1],this.totalFrames)];}else{val=_1e1.doMethod.call(this,attr,_1e6,end);}return val;};_1e2.getAttribute=function(attr){var val=null;var el=this.getEl();if(attr=="scroll"){val=[el.scrollLeft,el.scrollTop];}else{val=_1e1.getAttribute.call(this,attr);}return val;};_1e2.setAttribute=function(attr,val,unit){var el=this.getEl();if(attr=="scroll"){el.scrollLeft=val[0];el.scrollTop=val[1];}else{_1e1.setAttribute.call(this,attr,val,unit);}};})();})();
+
+
+
+Ext.DomHelper=function(){var _1=null;var _2=/^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i;var _3=/^table|tbody|tr|td$/i;var _4=function(o){if(typeof o=="string"){return o;}var b="";if(!o.tag){o.tag="div";}b+="<"+o.tag;for(var _7 in o){if(_7=="tag"||_7=="children"||_7=="cn"||_7=="html"||typeof o[_7]=="function"){continue;}if(_7=="style"){var s=o["style"];if(typeof s=="function"){s=s.call();}if(typeof s=="string"){b+=" style=\""+s+"\"";}else{if(typeof s=="object"){b+=" style=\"";for(var _9 in s){if(typeof s[_9]!="function"){b+=_9+":"+s[_9]+";";}}b+="\"";}}}else{if(_7=="cls"){b+=" class=\""+o["cls"]+"\"";}else{if(_7=="htmlFor"){b+=" for=\""+o["htmlFor"]+"\"";}else{b+=" "+_7+"=\""+o[_7]+"\"";}}}}if(_2.test(o.tag)){b+="/>";}else{b+=">";var cn=o.children||o.cn;if(cn){if(cn instanceof Array){for(var i=0,_c=cn.length;i<_c;i++){b+=_4(cn[i],b);}}else{b+=_4(cn,b);}}if(o.html){b+=o.html;}b+=""+o.tag+">";}return b;};var _d=function(o,_f){var el=document.createElement(o.tag||"div");var _11=el.setAttribute?true:false;for(var _12 in o){if(_12=="tag"||_12=="children"||_12=="cn"||_12=="html"||_12=="style"||typeof o[_12]=="function"){continue;}if(_12=="cls"){el.className=o["cls"];}else{if(_11){el.setAttribute(_12,o[_12]);}else{el[_12]=o[_12];}}}Ext.DomHelper.applyStyles(el,o.style);var cn=o.children||o.cn;if(cn){if(cn instanceof Array){for(var i=0,len=cn.length;i",tbs=ts+"",tbe=""+te,trs=tbs+"",tre="
"+tbe;var _23=function(tag,_25,el,_27){if(!_1){_1=document.createElement("div");}var _28;var _29=null;if(tag=="td"){if(_25=="afterbegin"||_25=="beforeend"){return;}if(_25=="beforebegin"){_29=el;el=el.parentNode;}else{_29=el.nextSibling;el=el.parentNode;}_28=_16(4,trs,_27,tre);}else{if(tag=="tr"){if(_25=="beforebegin"){_29=el;el=el.parentNode;_28=_16(3,tbs,_27,tbe);}else{if(_25=="afterend"){_29=el.nextSibling;el=el.parentNode;_28=_16(3,tbs,_27,tbe);}else{if(_25=="afterbegin"){_29=el.firstChild;}_28=_16(4,trs,_27,tre);}}}else{if(tag=="tbody"){if(_25=="beforebegin"){_29=el;el=el.parentNode;_28=_16(2,ts,_27,te);}else{if(_25=="afterend"){_29=el.nextSibling;el=el.parentNode;_28=_16(2,ts,_27,te);}else{if(_25=="afterbegin"){_29=el.firstChild;}_28=_16(3,tbs,_27,tbe);}}}else{if(_25=="beforebegin"||_25=="afterend"){return;}if(_25=="afterbegin"){_29=el.firstChild;}_28=_16(2,ts,_27,te);}}}el.insertBefore(_28,_29);return _28;};return{useDom:false,markup:function(o){return _4(o);},applyStyles:function(el,_2c){if(_2c){el=Ext.fly(el);if(typeof _2c=="string"){var re=/\s?([a-z\-]*)\:\s?([^;]*);?/gi;var _2e;while((_2e=re.exec(_2c))!=null){el.setStyle(_2e[1],_2e[2]);}}else{if(typeof _2c=="object"){for(var _2f in _2c){el.setStyle(_2f,_2c[_2f]);}}else{if(typeof _2c=="function"){Ext.DomHelper.applyStyles(el,_2c.call());}}}}},insertHtml:function(_30,el,_32){_30=_30.toLowerCase();if(el.insertAdjacentHTML){if(_3.test(el.tagName)){var rs;if(rs=_23(el.tagName.toLowerCase(),_30,el,_32)){return rs;}}switch(_30){case"beforebegin":el.insertAdjacentHTML("BeforeBegin",_32);return el.previousSibling;case"afterbegin":el.insertAdjacentHTML("AfterBegin",_32);return el.firstChild;case"beforeend":el.insertAdjacentHTML("BeforeEnd",_32);return el.lastChild;case"afterend":el.insertAdjacentHTML("AfterEnd",_32);return el.nextSibling;}throw"Illegal insertion point -> \""+_30+"\"";}var _34=el.ownerDocument.createRange();var _35;switch(_30){case"beforebegin":_34.setStartBefore(el);_35=_34.createContextualFragment(_32);el.parentNode.insertBefore(_35,el);return el.previousSibling;case"afterbegin":if(el.firstChild){_34.setStartBefore(el.firstChild);_35=_34.createContextualFragment(_32);el.insertBefore(_35,el.firstChild);return el.firstChild;}else{el.innerHTML=_32;return el.firstChild;}case"beforeend":if(el.lastChild){_34.setStartAfter(el.lastChild);_35=_34.createContextualFragment(_32);el.appendChild(_35);return el.lastChild;}else{el.innerHTML=_32;return el.lastChild;}case"afterend":_34.setStartAfter(el);_35=_34.createContextualFragment(_32);el.parentNode.insertBefore(_35,el.nextSibling);return el.nextSibling;}throw"Illegal insertion point -> \""+_30+"\"";},insertBefore:function(el,o,_38){return this.doInsert(el,o,_38,"beforeBegin");},insertAfter:function(el,o,_3b){return this.doInsert(el,o,_3b,"afterEnd","nextSibling");},insertFirst:function(el,o,_3e){return this.doInsert(el,o,_3e,"afterBegin");},doInsert:function(el,o,_41,pos,_43){el=Ext.getDom(el);var _44;if(this.useDom){_44=_d(o,null);el.parentNode.insertBefore(_44,_43?el[_43]:el);}else{var _45=_4(o);_44=this.insertHtml(pos,el,_45);}return _41?Ext.get(_44,true):_44;},append:function(el,o,_48){el=Ext.getDom(el);var _49;if(this.useDom){_49=_d(o,null);el.appendChild(_49);}else{var _4a=_4(o);_49=this.insertHtml("beforeEnd",el,_4a);}return _48?Ext.get(_49,true):_49;},overwrite:function(el,o,_4d){el=Ext.getDom(el);el.innerHTML=_4(o);return _4d?Ext.get(el.firstChild,true):el.firstChild;},createTemplate:function(o){var _4f=_4(o);return new Ext.Template(_4f);}};}();
+
+
+
+Ext.Template=function(_1){if(_1 instanceof Array){_1=_1.join("");}else{if(arguments.length>1){_1=Array.prototype.join.call(arguments,"");}}this.html=_1;};Ext.Template.prototype={applyTemplate:function(_2){if(this.compiled){return this.compiled(_2);}var _3=this.disableFormats!==true;var fm=Ext.util.Format,_5=this;var fn=function(m,_8,_9,_a){if(_9&&_3){if(_9.substr(0,5)=="this."){return _5.call(_9.substr(5),_2[_8],_2);}else{if(_a){var re=/^\s*['"](.*)["']\s*$/;_a=_a.split(",");for(var i=0,_d=_a.length;i<_d;i++){_a[i]=_a[i].replace(re,"$1");}_a=[_2[_8]].concat(_a);}else{_a=[_2[_8]];}return fm[_9].apply(fm,_a);}}else{return _2[_8]!==undefined?_2[_8]:"";}};return this.html.replace(this.re,fn);},set:function(_e,_f){this.html=_e;this.compiled=null;if(_f){this.compile();}return this;},disableFormats:false,re:/\{([\w-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,compile:function(){var fm=Ext.util.Format;var _11=this.disableFormats!==true;var sep=Ext.isGecko?"+":",";var fn=function(m,_15,_16,_17){if(_16&&_11){_17=_17?","+_17:"";if(_16.substr(0,5)!="this."){_16="fm."+_16+"(";}else{_16="this.call(\""+_16.substr(5)+"\", ";_17=", values";}}else{_17="";_16="(values['"+_15+"'] == undefined ? '' : ";}return"'"+sep+_16+"values['"+_15+"']"+_17+")"+sep+"'";};var _18;if(Ext.isGecko){_18="this.compiled = function(values){ return '"+this.html.replace(/(\r\n|\n)/g,"\\n").replace(/'/g,"\\'").replace(this.re,fn)+"';};";}else{_18=["this.compiled = function(values){ return ['"];_18.push(this.html.replace(/(\r\n|\n)/g,"\\n").replace(/'/g,"\\'").replace(this.re,fn));_18.push("'].join('');};");_18=_18.join("");}eval(_18);return this;},call:function(_19,_1a,_1b){return this[_19](_1a,_1b);},insertFirst:function(el,_1d,_1e){return this.doInsert("afterBegin",el,_1d,_1e);},insertBefore:function(el,_20,_21){return this.doInsert("beforeBegin",el,_20,_21);},insertAfter:function(el,_23,_24){return this.doInsert("afterEnd",el,_23,_24);},append:function(el,_26,_27){return this.doInsert("beforeEnd",el,_26,_27);},doInsert:function(_28,el,_2a,_2b){el=Ext.getDom(el);var _2c=Ext.DomHelper.insertHtml(_28,el,this.applyTemplate(_2a));return _2b?Ext.get(_2c,true):_2c;},overwrite:function(el,_2e,_2f){el=Ext.getDom(el);el.innerHTML=this.applyTemplate(_2e);return _2f?Ext.get(el.firstChild,true):el.firstChild;}};Ext.Template.prototype.apply=Ext.Template.prototype.applyTemplate;Ext.DomHelper.Template=Ext.Template;Ext.Template.from=function(el){el=Ext.getDom(el);return new Ext.Template(el.value||el.innerHTML);};
+
+
+
+Ext.DomQuery=function(){var _1={},_2={},_3={};var _4=/\S/;var _5=/^\s+|\s+$/g;var _6=/\{(\d+)\}/g;var _7=/^(\s?[\/>+~]\s?|\s|$)/;var _8=/^(#)?([\w-\*]+)/;var _9=/(\d*)n\+?(\d*)/,_a=/\D/;function child(p,_c){var i=0;var n=p.firstChild;while(n){if(n.nodeType==1){if(++i==_c){return n;}}n=n.nextSibling;}return null;}function next(n){while((n=n.nextSibling)&&n.nodeType!=1){}return n;}function prev(n){while((n=n.previousSibling)&&n.nodeType!=1){}return n;}function children(d){var n=d.firstChild,ni=-1;while(n){var nx=n.nextSibling;if(n.nodeType==3&&!_4.test(n.nodeValue)){d.removeChild(n);}else{n.nodeIndex=++ni;}n=nx;}return this;}function byClassName(c,a,v){if(!v){return c;}var r=[],ri=-1,cn;for(var i=0,ci;ci=c[i];i++){if((" "+ci.className+" ").indexOf(v)!=-1){r[++ri]=ci;}}return r;}function attrValue(n,_1e){if(!n.tagName&&typeof n.length!="undefined"){n=n[0];}if(!n){return null;}if(_1e=="for"){return n.htmlFor;}if(_1e=="class"||_1e=="className"){return n.className;}return n.getAttribute(_1e)||n[_1e];}function getNodes(ns,_20,_21){var _22=[],ri=-1,cs;if(!ns){return _22;}_21=_21||"*";if(typeof ns.getElementsByTagName!="undefined"){ns=[ns];}if(!_20){for(var i=0,ni;ni=ns[i];i++){cs=ni.getElementsByTagName(_21);for(var j=0,ci;ci=cs[j];j++){_22[++ri]=ci;}}}else{if(_20=="/"||_20==">"){var _29=_21.toUpperCase();for(var i=0,ni,cn;ni=ns[i];i++){cn=ni.children||ni.childNodes;for(var j=0,cj;cj=cn[j];j++){if(cj.nodeName==_29||cj.nodeName==_21||_21=="*"){_22[++ri]=cj;}}}}else{if(_20=="+"){var _29=_21.toUpperCase();for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(n&&(n.nodeName==_29||n.nodeName==_21||_21=="*")){_22[++ri]=n;}}}else{if(_20=="~"){for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)&&(n.nodeType!=1||(_21=="*"||n.tagName.toLowerCase()!=_21))){}if(n){_22[++ri]=n;}}}}}}return _22;}function concat(a,b){if(b.slice){return a.concat(b);}for(var i=0,l=b.length;i1){return nodup(_87);}return _87;},selectNode:function(_8c,_8d){return Ext.DomQuery.select(_8c,_8d)[0];},selectValue:function(_8e,_8f,_90){_8e=_8e.replace(_5,"");if(!_3[_8e]){_3[_8e]=Ext.DomQuery.compile(_8e,"select");}var n=_3[_8e](_8f);n=n[0]?n[0]:n;var v=(n&&n.firstChild?n.firstChild.nodeValue:null);return((v===null||v===undefined||v==="")?_90:v);},selectNumber:function(_93,_94,_95){var v=Ext.DomQuery.selectValue(_93,_94,_95||0);return parseFloat(v);},is:function(el,ss){if(typeof el=="string"){el=document.getElementById(el);}var _99=(el instanceof Array);var _9a=Ext.DomQuery.filter(_99?el:[el],ss);return _99?(_9a.length==el.length):(_9a.length>0);},filter:function(els,ss,_9d){ss=ss.replace(_5,"");if(!_2[ss]){_2[ss]=Ext.DomQuery.compile(ss,"simple");}var _9e=_2[ss](els);return _9d?quickDiff(_9e,els):_9e;},matchers:[{re:/^\.([\w-]+)/,select:"n = byClassName(n, null, \" {1} \");"},{re:/^\:([\w-]+)(?:\(((?:[^\s>\/]*|.*?))\))?/,select:"n = byPseudo(n, \"{1}\", \"{2}\");"},{re:/^(?:([\[\{])(?:@)?([\w-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]\}])/,select:"n = byAttribute(n, \"{2}\", \"{4}\", \"{3}\", \"{1}\");"},{re:/^#([\w-]+)/,select:"n = byId(n, null, \"{1}\");"},{re:/^@([\w-]+)/,select:"return {firstChild:{nodeValue:attrValue(n, \"{1}\")}};"}],operators:{"=":function(a,v){return a==v;},"!=":function(a,v){return a!=v;},"^=":function(a,v){return a&&a.substr(0,v.length)==v;},"$=":function(a,v){return a&&a.substr(a.length-v.length)==v;},"*=":function(a,v){return a&&a.indexOf(v)!==-1;},"%=":function(a,v){return(a%v)==0;},"|=":function(a,v){return a&&(a==v||a.substr(0,v.length+1)==v+"-");},"~=":function(a,v){return a&&(" "+a+" ").indexOf(" "+v+" ")!=-1;}},pseudos:{"first-child":function(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.previousSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci;}}return r;},"last-child":function(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci;}}return r;},"nth-child":function(c,a){var r=[],ri=-1;var m=_9.exec(a=="even"&&"2n"||a=="odd"&&"2n+1"||!_a.test(a)&&"n+"+a||a);var f=(m[1]||1)-0,l=m[2]-0;for(var i=0,n;n=c[i];i++){var pn=n.parentNode;if(batch!=pn._batch){var j=0;for(var cn=pn.firstChild;cn;cn=cn.nextSibling){if(cn.nodeType==1){cn.nodeIndex=++j;}}pn._batch=batch;}if(f==1){if(l==0||n.nodeIndex==l){r[++ri]=n;}}else{if((n.nodeIndex+l)%f==0){r[++ri]=n;}}}return r;},"only-child":function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(!prev(ci)&&!next(ci)){r[++ri]=ci;}}return r;},"empty":function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var cns=ci.childNodes,j=0,cn,_d4=true;while(cn=cns[j]){++j;if(cn.nodeType==1||cn.nodeType==3){_d4=false;break;}}if(_d4){r[++ri]=ci;}}return r;},"contains":function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if((ci.textContent||ci.innerText||"").indexOf(v)!=-1){r[++ri]=ci;}}return r;},"nodeValue":function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(ci.firstChild&&ci.firstChild.nodeValue==v){r[++ri]=ci;}}return r;},"checked":function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(ci.checked==true){r[++ri]=ci;}}return r;},"not":function(c,ss){return Ext.DomQuery.filter(c,ss,true);},"odd":function(c){return this["nth-child"](c,"odd");},"even":function(c){return this["nth-child"](c,"even");},"nth":function(c,a){return c[a-1]||[];},"first":function(c){return c[0]||[];},"last":function(c){return c[c.length-1]||[];},"has":function(c,ss){var s=Ext.DomQuery.select;var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(s(ss,ci).length>0){r[++ri]=ci;}}return r;},"next":function(c,ss){var is=Ext.DomQuery.is;var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=next(ci);if(n&&is(n,ss)){r[++ri]=ci;}}return r;},"prev":function(c,ss){var is=Ext.DomQuery.is;var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=prev(ci);if(n&&is(n,ss)){r[++ri]=ci;}}return r;}}};}();Ext.query=Ext.DomQuery.select;
+
+
+
+Ext.util.Observable=function(){if(this.listeners){this.on(this.listeners);delete this.listeners;}};Ext.util.Observable.prototype={fireEvent:function(){var ce=this.events[arguments[0].toLowerCase()];if(typeof ce=="object"){return ce.fire.apply(ce,Array.prototype.slice.call(arguments,1));}else{return true;}},filterOptRe:/^(?:scope|delay|buffer|single)$/,addListener:function(_2,fn,_4,o){if(typeof _2=="object"){o=_2;for(var e in o){if(this.filterOptRe.test(e)){continue;}if(typeof o[e]=="function"){this.addListener(e,o[e],o.scope,o);}else{this.addListener(e,o[e].fn,o[e].scope,o[e]);}}return;}o=(!o||typeof o=="boolean")?{}:o;_2=_2.toLowerCase();var ce=this.events[_2]||true;if(typeof ce=="boolean"){ce=new Ext.util.Event(this,_2);this.events[_2]=ce;}ce.addListener(fn,_4,o);},removeListener:function(_8,fn,_a){var ce=this.events[_8.toLowerCase()];if(typeof ce=="object"){ce.removeListener(fn,_a);}},purgeListeners:function(){for(var _c in this.events){if(typeof this.events[_c]=="object"){this.events[_c].clearListeners();}}},relayEvents:function(o,_e){var _f=function(_10){return function(){return this.fireEvent.apply(this,Ext.combine(_10,Array.prototype.slice.call(arguments,0)));};};for(var i=0,len=_e.length;i0;}};Ext.util.Observable.prototype.on=Ext.util.Observable.prototype.addListener;Ext.util.Observable.prototype.un=Ext.util.Observable.prototype.removeListener;Ext.util.Observable.capture=function(o,fn,_19){o.fireEvent=o.fireEvent.createInterceptor(fn,_19);};Ext.util.Observable.releaseCapture=function(o){o.fireEvent=Ext.util.Observable.prototype.fireEvent;};(function(){var _1b=function(h,o,_1e){var _1f=new Ext.util.DelayedTask();return function(){_1f.delay(o.buffer,h,_1e,Array.prototype.slice.call(arguments,0));};};var _20=function(h,e,fn,_24){return function(){e.removeListener(fn,_24);return h.apply(_24,arguments);};};var _25=function(h,o,_28){return function(){var _29=Array.prototype.slice.call(arguments,0);setTimeout(function(){h.apply(_28,_29);},o.delay||10);};};Ext.util.Event=function(obj,_2b){this.name=_2b;this.obj=obj;this.listeners=[];};Ext.util.Event.prototype={addListener:function(fn,_2d,_2e){var o=_2e||{};_2d=_2d||this.obj;if(!this.isListening(fn,_2d)){var l={fn:fn,scope:_2d,options:o};var h=fn;if(o.delay){h=_25(h,o,_2d);}if(o.single){h=_20(h,this,fn,_2d);}if(o.buffer){h=_1b(h,o,_2d);}l.fireFn=h;if(!this.firing){this.listeners.push(l);}else{this.listeners=this.listeners.slice(0);this.listeners.push(l);}}},findListener:function(fn,_33){_33=_33||this.obj;var ls=this.listeners;for(var i=0,len=ls.length;i0){this.firing=true;var _40=Array.prototype.slice.call(arguments,0);for(var i=0;i");var _c=document.getElementById("ie-deferred-loader");_c.onreadystatechange=function(){if(this.readyState=="complete"){_a();_c.onreadystatechange=null;_c.parentNode.removeChild(_c);}};}else{if(Ext.isSafari){_2=setInterval(function(){var rs=document.readyState;if(rs=="complete"){_a();}},10);}}}E.on(window,"load",_a);};var _e=function(h,o){var _11=new Ext.util.DelayedTask(h);return function(e){e=new Ext.EventObjectImpl(e);_11.delay(o.buffer,h,null,[e]);};};var _13=function(h,el,_16,fn){return function(e){Ext.EventManager.removeListener(el,_16,fn);h(e);};};var _19=function(h,o){return function(e){e=new Ext.EventObjectImpl(e);setTimeout(function(){h(e);},o.delay||10);};};var _1d=function(_1e,_1f,opt,fn,_22){var o=(!opt||typeof opt=="boolean")?{}:opt;fn=fn||o.fn;_22=_22||o.scope;var el=Ext.getDom(_1e);if(!el){throw"Error listening for \""+_1f+"\". Element \""+_1e+"\" doesn't exist.";}var h=function(e){e=Ext.EventObject.setEvent(e);var t;if(o.delegate){t=e.getTarget(o.delegate,el);if(!t){return;}}else{t=e.target;}if(o.stopEvent===true){e.stopEvent();}if(o.preventDefault===true){e.preventDefault();}if(o.stopPropagation===true){e.stopPropagation();}if(o.normalized===false){e=e.browserEvent;}fn.call(_22||el,e,t,o);};if(o.delay){h=_19(h,o);}if(o.single){h=_13(h,el,_1f,fn);}if(o.buffer){h=_e(h,o);}fn._handlers=fn._handlers||[];fn._handlers.push([Ext.id(el),_1f,h]);E.on(el,_1f,h);if(_1f=="mousewheel"&&el.addEventListener){el.addEventListener("DOMMouseScroll",h,false);E.on(window,"unload",function(){el.removeEventListener("DOMMouseScroll",h,false);});}if(_1f=="mousedown"&&el==document){Ext.EventManager.stoppedMouseDownEvent.addListener(h);}return h;};var _28=function(el,_2a,fn){var id=Ext.id(el),hds=fn._handlers,hd=fn;if(hds){for(var i=0,len=hds.length;i=33&&k<=40)||k==this.RETURN||k==this.TAB||k==this.ESC;},isSpecialKey:function(){var k=this.keyCode;return(this.type=="keypress"&&this.ctrlKey)||k==9||k==13||k==40||k==27||(k==16)||(k==17)||(k>=18&&k<=20)||(k>=33&&k<=35)||(k>=36&&k<=39)||(k>=44&&k<=45);},stopPropagation:function(){if(this.browserEvent){if(this.type=="mousedown"){Ext.EventManager.stoppedMouseDownEvent.fire(this);}E.stopPropagation(this.browserEvent);}},getCharCode:function(){return this.charCode||this.keyCode;},getKey:function(){var k=this.keyCode||this.charCode;return Ext.isSafari?(_52[k]||k):k;},getPageX:function(){return this.xy[0];},getPageY:function(){return this.xy[1];},getTime:function(){if(this.browserEvent){return E.getTime(this.browserEvent);}return null;},getXY:function(){return this.xy;},getTarget:function(_59,_5a,_5b){return _59?Ext.fly(this.target).findParent(_59,_5a,_5b):this.target;},getRelatedTarget:function(){if(this.browserEvent){return E.getRelatedTarget(this.browserEvent);}return null;},getWheelDelta:function(){var e=this.browserEvent;var _5d=0;if(e.wheelDelta){_5d=e.wheelDelta/120;if(window.opera){_5d=-_5d;}}else{if(e.detail){_5d=-e.detail/3;}}return _5d;},hasModifier:function(){return!!((this.ctrlKey||this.altKey)||this.shiftKey);},within:function(el,_5f){var t=this[_5f?"getRelatedTarget":"getTarget"]();return t&&Ext.fly(el).contains(t);},getPoint:function(){return new Ext.lib.Point(this.xy[0],this.xy[1]);}};return new Ext.EventObjectImpl();}();
+
+
+
+(function(){var D=Ext.lib.Dom;var E=Ext.lib.Event;var A=Ext.lib.Anim;var _4={};var _5=/(-[a-z])/gi;var _6=function(m,a){return a.charAt(1).toUpperCase();};var _9=document.defaultView;Ext.Element=function(_a,_b){var _c=typeof _a=="string"?document.getElementById(_a):_a;if(!_c){return null;}var id=_c.id;if(_b!==true&&id&&Ext.Element.cache[id]){return Ext.Element.cache[id];}this.dom=_c;this.id=id||Ext.id(_c);};var El=Ext.Element;El.prototype={originalDisplay:"",visibilityMode:1,defaultUnit:"px",setVisibilityMode:function(_f){this.visibilityMode=_f;return this;},enableDisplayMode:function(_10){this.setVisibilityMode(El.DISPLAY);if(typeof _10!="undefined"){this.originalDisplay=_10;}return this;},findParent:function(_11,_12,_13){var p=this.dom,b=document.body,_16=0,dq=Ext.DomQuery,_18;_12=_12||50;if(typeof _12!="number"){_18=Ext.getDom(_12);_12=10;}while(p&&p.nodeType==1&&_16<_12&&p!=b&&p!=_18){if(dq.is(p,_11)){return _13?Ext.get(p):p;}_16++;p=p.parentNode;}return null;},findParentNode:function(_19,_1a,_1b){var p=Ext.fly(this.dom.parentNode,"_internal");return p?p.findParent(_19,_1a,_1b):null;},up:function(_1d,_1e){return this.findParentNode(_1d,_1e,true);},is:function(_1f){return Ext.DomQuery.is(this.dom,_1f);},animate:function(_20,_21,_22,_23,_24){this.anim(_20,{duration:_21,callback:_22,easing:_23},_24);return this;},anim:function(_25,opt,_27,_28,_29,cb){_27=_27||"run";opt=opt||{};var _2b=Ext.lib.Anim[_27](this.dom,_25,(opt.duration||_28)||0.35,(opt.easing||_29)||"easeOut",function(){Ext.callback(cb,this);Ext.callback(opt.callback,opt.scope||this,[this,opt]);},this);opt.anim=_2b;return _2b;},preanim:function(a,i){return!a[i]?false:(typeof a[i]=="object"?a[i]:{duration:a[i+1],callback:a[i+2],easing:a[i+3]});},clean:function(_2e){if(this.isCleaned&&_2e!==true){return this;}var ns=/\S/;var d=this.dom,n=d.firstChild,ni=-1;while(n){var nx=n.nextSibling;if(n.nodeType==3&&!ns.test(n.nodeValue)){d.removeChild(n);}else{n.nodeIndex=++ni;}n=nx;}this.isCleaned=true;return this;},calcOffsetsTo:function(el){el=Ext.get(el);var d=el.dom;var _36=false;if(el.getStyle("position")=="static"){el.position("relative");_36=true;}var x=0,y=0;var op=this.dom;while(op&&op!=d&&op.tagName!="HTML"){x+=op.offsetLeft;y+=op.offsetTop;op=op.offsetParent;}if(_36){el.position("static");}return[x,y];},scrollIntoView:function(_3a,_3b){var c=Ext.getDom(_3a)||document.body;var el=this.dom;var o=this.calcOffsetsTo(c),l=o[0],t=o[1],b=t+el.offsetHeight,r=l+el.offsetWidth;var ch=c.clientHeight;var ct=parseInt(c.scrollTop,10);var cl=parseInt(c.scrollLeft,10);var cb=ct+ch;var cr=cl+c.clientWidth;if(tcb){c.scrollTop=b-ch;}}if(_3b!==false){if(lcr){c.scrollLeft=r-c.clientWidth;}}}return this;},scrollChildIntoView:function(_48,_49){Ext.fly(_48,"_scrollChildIntoView").scrollIntoView(this,_49);},autoHeight:function(_4a,_4b,_4c,_4d){var _4e=this.getHeight();this.clip();this.setHeight(1);setTimeout(function(){var _4f=parseInt(this.dom.scrollHeight,10);if(!_4a){this.setHeight(_4f);this.unclip();if(typeof _4c=="function"){_4c();}}else{this.setHeight(_4e);this.setHeight(_4f,_4a,_4b,function(){this.unclip();if(typeof _4c=="function"){_4c();}}.createDelegate(this),_4d);}}.createDelegate(this),0);return this;},contains:function(el){if(!el){return false;}return D.isAncestor(this.dom,el.dom?el.dom:el);},isVisible:function(_51){var vis=!(this.getStyle("visibility")=="hidden"||this.getStyle("display")=="none");if(_51!==true||!vis){return vis;}var p=this.dom.parentNode;while(p&&p.tagName.toLowerCase()!="body"){if(!Ext.fly(p,"_isVisible").isVisible()){return false;}p=p.parentNode;}return true;},select:function(_54,_55){return El.select(_54,_55,this.dom);},query:function(_56,_57){return Ext.DomQuery.select(_56,this.dom);},child:function(_58,_59){var n=Ext.DomQuery.selectNode(_58,this.dom);return _59?n:Ext.get(n);},down:function(_5b,_5c){var n=Ext.DomQuery.selectNode(" > "+_5b,this.dom);return _5c?n:Ext.get(n);},initDD:function(_5e,_5f,_60){var dd=new Ext.dd.DD(Ext.id(this.dom),_5e,_5f);return Ext.apply(dd,_60);},initDDProxy:function(_62,_63,_64){var dd=new Ext.dd.DDProxy(Ext.id(this.dom),_62,_63);return Ext.apply(dd,_64);},initDDTarget:function(_66,_67,_68){var dd=new Ext.dd.DDTarget(Ext.id(this.dom),_66,_67);return Ext.apply(dd,_68);},setVisible:function(_6a,_6b){if(!_6b||!A){if(this.visibilityMode==El.DISPLAY){this.setDisplayed(_6a);}else{this.fixDisplay();this.dom.style.visibility=_6a?"visible":"hidden";}}else{var dom=this.dom;var _6d=this.visibilityMode;if(_6a){this.setOpacity(0.01);this.setVisible(true);}this.anim({opacity:{to:(_6a?1:0)}},this.preanim(arguments,1),null,0.35,"easeIn",function(){if(!_6a){if(_6d==El.DISPLAY){dom.style.display="none";}else{dom.style.visibility="hidden";}Ext.get(dom).setOpacity(1);}});}return this;},isDisplayed:function(){return this.getStyle("display")!="none";},toggle:function(_6e){this.setVisible(!this.isVisible(),this.preanim(arguments,0));return this;},setDisplayed:function(_6f){if(typeof _6f=="boolean"){_6f=_6f?this.originalDisplay:"none";}this.setStyle("display",_6f);return this;},focus:function(){try{this.dom.focus();}catch(e){}return this;},blur:function(){try{this.dom.blur();}catch(e){}return this;},addClass:function(_70){if(_70 instanceof Array){for(var i=0,len=_70.length;idw+_105){x=_103?r.left-w:dw+_105-w;}if(x<_105){x=_103?r.right:_105;}if((y+h)>dh+_106){y=_102?r.top-h:dh+_106-h;}if(y<_106){y=_102?r.bottom:_106;}}return[x,y];},getConstrainToXY:function(){var os={top:0,left:0,bottom:0,right:0};return function(el,_109,_10a,_10b){el=Ext.get(el);_10a=_10a?Ext.applyIf(_10a,os):os;var vw,vh,vx=0,vy=0;if(el.dom==document.body||el.dom==document){vw=Ext.lib.Dom.getViewWidth();vh=Ext.lib.Dom.getViewHeight();}else{vw=el.dom.clientWidth;vh=el.dom.clientHeight;if(!_109){var vxy=el.getXY();vx=vxy[0];vy=vxy[1];}}var s=el.getScroll();vx+=_10a.left+s.left;vy+=_10a.top+s.top;vw-=_10a.right;vh-=_10a.bottom;var vr=vx+vw;var vb=vy+vh;var xy=_10b||(!_109?this.getXY():[this.getLeft(true),this.getTop(true)]);var x=xy[0],y=xy[1];var w=this.dom.offsetWidth,h=this.dom.offsetHeight;var _119=false;if((x+w)>vr){x=vr-w;_119=true;}if((y+h)>vb){y=vb-h;_119=true;}if(x";E.onAvailable(id,function(){var hd=document.getElementsByTagName("head")[0];var re=/(?: