JBoss Rich Faces SVN: r21903 - modules/docs/trunk/Component_Reference/src/main/docbook/en-US.
by richfaces-svn-commits@lists.jboss.org
Author: SeanRogers
Date: 2011-02-23 20:13:55 -0500 (Wed, 23 Feb 2011)
New Revision: 21903
Modified:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Validation.xml
Log:
Completed review of validation RFPL-990
Modified: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Validation.xml
===================================================================
--- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Validation.xml 2011-02-23 23:17:15 UTC (rev 21902)
+++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Validation.xml 2011-02-24 01:13:55 UTC (rev 21903)
@@ -112,16 +112,6 @@
<parameter>component-family</parameter>: <classname>org.richfaces.validator</classname>
</para>
</listitem>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/figu-Component_Reference-richvalidator-Messages.png" format="PNG" />
- </imageobject>
- <textobject>
- <para>
- Failed validation checks are reported using <sgmltag><rich:message></sgmltag> components.
- </para>
- </textobject>
- </mediaobject>
<listitem>
<para>
<parameter>renderer-type</parameter>: <classname>org.richfaces.validatorRenderer</classname>
@@ -139,7 +129,7 @@
<section id="sect-Component_Reference-Validation-richgraphValidator">
<title><sgmltag><rich:graphValidator></sgmltag> object validation</title>
<para>
- The <sgmltag><rich:graphValidator></sgmltag> component is used to wrap a set of input components related to one object. The input values can then be completely validated, including any properties which are not bound to the individual components. This object validation allows for cross-field validation in complex forms.
+ The <sgmltag><rich:graphValidator></sgmltag> component is used to wrap a set of input components related to one object. The object defined by the <sgmltag><rich:graphValidator></sgmltag> component can then be completely validated. The validation includes all object properties, even those which are not bound to the individual form components. Validation performed in this way allows for cross-field validation in complex forms.
</para>
<note>
<title>Validation without model updates</title>
@@ -164,8 +154,11 @@
</para>
<programlisting language="XML" role="XML"><xi:include parse="text" href="extras/exam-Component_Reference-richgraphValidator-Basic_usage.js" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
<para>
- If the entered passwords do not match, the error message is displayed:
+ When validation occurs, the whole object is validated against the annotation contstraints. The <varname>@AssertTrue</varname> annotation relies on the <methodname>isPasswordsEqual()</methodname> function to check whether the two entered passwords are equal.
</para>
+ <para>
+ If the entered passwords do not match, an error message is displayed:
+ </para>
<mediaobject>
<imageobject>
<imagedata fileref="images/figu-Component_Reference-richgraphValidator-Basic_usage.png" format="PNG" />
13 years, 2 months
JBoss Rich Faces SVN: r21902 - modules/docs/trunk/Component_Reference/src/main/docbook/en-US.
by richfaces-svn-commits@lists.jboss.org
Author: SeanRogers
Date: 2011-02-23 18:17:15 -0500 (Wed, 23 Feb 2011)
New Revision: 21902
Modified:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Menus_and_toolbars.xml
Log:
Completed review of panelMenu RFPL-986
Modified: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Menus_and_toolbars.xml
===================================================================
--- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Menus_and_toolbars.xml 2011-02-23 20:10:53 UTC (rev 21901)
+++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Menus_and_toolbars.xml 2011-02-23 23:17:15 UTC (rev 21902)
@@ -307,9 +307,11 @@
<para>
Icons can be added to menu groups through the use of two icon attributes. The <varname>icon</varname> attribute specifies the normal icon, while the <varname>iconDisabled</varname> attribute specifies the icon for a disabled group.
</para>
+ <!--
<para>
Alternatively, define facets with the names <literal>icon</literal> and <literal>iconDisabled</literal> to set the icons. If facets are defined, the <varname>icon</varname> and <varname>iconDisabled</varname> attributes are ignored.
</para>
+ -->
<para>
The <sgmltag><rich:menuGroup></sgmltag> component can be positioned using the <varname>jointPoint</varname> and <varname>direction</varname> attributes, the same as the parent menu control. For details on the <varname>jointPoint</varname> and <varname>direction</varname> attributes, refer to <xref linkend="sect-Component_Reference-richdropDownMenu-Appearance"/>.
</para>
@@ -470,7 +472,7 @@
<section id="sect-Component_Reference-richpanelMenu-Appearance">
<title>Appearance</title>
<para>
- Icons for the panel menu can be chosen from a set of standard icons. Icons can be set for the top panel menu, child panel menus, and child item. There are three different menu states that the icon represents, as well as icons for both the left and right side of the item title. The icons can also be managed using facets.
+ Icons for the panel menu can be chosen from a set of standard icons. Icons can be set for the top panel menu, child panel menus, and child item. There are three different menu states that the icon represents, as well as icons for both the left and right side of the item title.
</para>
<variablelist>
<varlistentry>
@@ -478,7 +480,8 @@
<term><varname>topGroupExpandedRightIcon</varname></term>
<listitem>
<para>
- These attributes determine the icons for the top level menu when it is expanded. The related facet is the <literal>topGroupExpandedClass</literal> facet.
+ These attributes determine the icons for the top level menu when it is expanded.
+ <!--The related facet is the <literal>topGroupExpandedClass</literal> facet.-->
</para>
</listitem>
</varlistentry>
@@ -487,7 +490,8 @@
<term><varname>topGroupCollapsedRightIcon</varname></term>
<listitem>
<para>
- These attributes determine the icons for the top level menu when it is collapsed. The related facet is the <literal>topGroupCollapsedClass</literal> facet.
+ These attributes determine the icons for the top level menu when it is collapsed.
+ <!--The related facet is the <literal>topGroupCollapsedClass</literal> facet.-->
</para>
</listitem>
</varlistentry>
@@ -496,7 +500,8 @@
<term><varname>topGroupDisabledRightIcon</varname></term>
<listitem>
<para>
- These attributes determine the icons for the top level menu when it is disabled. The related facet is the <literal>topGroupDisabledClass</literal> facet.
+ These attributes determine the icons for the top level menu when it is disabled.
+ <!--The related facet is the <literal>topGroupDisabledClass</literal> facet.-->
</para>
</listitem>
</varlistentry>
@@ -505,7 +510,8 @@
<term><varname>topItemRightIcon</varname></term>
<listitem>
<para>
- These attributes determine the icons for a top level menu item. The related facet is the <literal>topItemClass</literal> facet.
+ These attributes determine the icons for a top level menu item.
+ <!--The related facet is the <literal>topItemClass</literal> facet.-->
</para>
</listitem>
</varlistentry>
@@ -514,7 +520,8 @@
<term><varname>topItemDisabledRightIcon</varname></term>
<listitem>
<para>
- These attributes determine the icons for a top level menu item when it is disabled. The related facet is the <literal>topItemDisabledClass</literal> facet.
+ These attributes determine the icons for a top level menu item when it is disabled.
+ <!--The related facet is the <literal>topItemDisabledClass</literal> facet.-->
</para>
</listitem>
</varlistentry>
@@ -523,7 +530,8 @@
<term><varname>groupExpandedRightIcon</varname></term>
<listitem>
<para>
- These attributes determine the icons for sub-menus that are not the top-level menu when they are expanded. The related facet is the <literal>groupExpandedClass</literal> facet.
+ These attributes determine the icons for sub-menus that are not the top-level menu when they are expanded.
+ <!--The related facet is the <literal>groupExpandedClass</literal> facet.-->
</para>
</listitem>
</varlistentry>
@@ -532,7 +540,8 @@
<term><varname>groupCollapsedRightIcon</varname></term>
<listitem>
<para>
- These attributes determine the icons for sub-menus that are not the top-level menu when they are collapsed. The related facet is the <literal>groupCollapsedClass</literal> facet.
+ These attributes determine the icons for sub-menus that are not the top-level menu when they are collapsed.
+ <!--The related facet is the <literal>groupCollapsedClass</literal> facet.-->
</para>
</listitem>
</varlistentry>
@@ -541,7 +550,8 @@
<term><varname>groupDisabledRightIcon</varname></term>
<listitem>
<para>
- These attributes determine the icons for sub-menus that are not the top-level menu when they are disabled. The related facet is the <literal>groupDisabledClass</literal> facet.
+ These attributes determine the icons for sub-menus that are not the top-level menu when they are disabled.
+ <!--The related facet is the <literal>groupDisabledClass</literal> facet.-->
</para>
</listitem>
</varlistentry>
@@ -550,7 +560,8 @@
<term><varname>itemRightIcon</varname></term>
<listitem>
<para>
- These attributes determine the icons for items in the menus. The related facet is the <literal>itemClass</literal> facet.
+ These attributes determine the icons for items in the menus.
+ <!--The related facet is the <literal>itemClass</literal> facet.-->
</para>
</listitem>
</varlistentry>
@@ -559,7 +570,8 @@
<term><varname>itemDisabledRightIcon</varname></term>
<listitem>
<para>
- These attributes determine the icons for items in the menus when they are disabled. The related facet is the <literal>itemDisabledClass</literal> facet.
+ These attributes determine the icons for items in the menus when they are disabled.
+ <!--The related facet is the <literal>itemDisabledClass</literal> facet.-->
</para>
</listitem>
</varlistentry>
13 years, 2 months
JBoss Rich Faces SVN: r21901 - in branches/4.0.X/ui/input/ui/src/main: resources/META-INF and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2011-02-23 15:10:53 -0500 (Wed, 23 Feb 2011)
New Revision: 21901
Added:
branches/4.0.X/ui/input/ui/src/main/resources/META-INF/cdk/
branches/4.0.X/ui/input/ui/src/main/resources/META-INF/cdk/attributes/
branches/4.0.X/ui/input/ui/src/main/resources/META-INF/cdk/attributes/fileUploadListener-props.xml
Modified:
branches/4.0.X/ui/input/ui/src/main/java/org/richfaces/component/AbstractFileUpload.java
Log:
RF-9955
Modified: branches/4.0.X/ui/input/ui/src/main/java/org/richfaces/component/AbstractFileUpload.java
===================================================================
--- branches/4.0.X/ui/input/ui/src/main/java/org/richfaces/component/AbstractFileUpload.java 2011-02-23 20:03:53 UTC (rev 21900)
+++ branches/4.0.X/ui/input/ui/src/main/java/org/richfaces/component/AbstractFileUpload.java 2011-02-23 20:10:53 UTC (rev 21901)
@@ -46,7 +46,7 @@
*/
@JsfComponent(tag = @Tag(handler = "org.richfaces.view.facelets.FileUploadHandler"),
renderer = @JsfRenderer(type = "org.richfaces.FileUploadRenderer"),
- attributes = {"events-props.xml", "core-props.xml", "ajax-props.xml", "i18n-props.xml"})
+ attributes = {"events-props.xml", "core-props.xml", "ajax-props.xml", "i18n-props.xml", "fileUploadListener-props.xml"})
@ListenerFor(systemEventClass = PostAddToViewEvent.class)
public abstract class AbstractFileUpload extends UIComponentBase {
Added: branches/4.0.X/ui/input/ui/src/main/resources/META-INF/cdk/attributes/fileUploadListener-props.xml
===================================================================
--- branches/4.0.X/ui/input/ui/src/main/resources/META-INF/cdk/attributes/fileUploadListener-props.xml (rev 0)
+++ branches/4.0.X/ui/input/ui/src/main/resources/META-INF/cdk/attributes/fileUploadListener-props.xml 2011-02-23 20:10:53 UTC (rev 21901)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- JBoss, Home of Professional Open Source Copyright ${year}, Red Hat,
+ Inc. and individual contributors by the @authors tag. See the copyright.txt
+ in the distribution for a full listing of individual contributors. This is
+ free software; you can redistribute it and/or modify it under the terms of
+ the GNU Lesser General Public License as published by the Free Software Foundation;
+ either version 2.1 of the License, or (at your option) any later version.
+ This software is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ details. You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the
+ FSF site: http://www.fsf.org. -->
+<cdk:properties xmlns:cdk="http://jboss.org/schema/richfaces/cdk/extensions" xmlns="http://java.sun.com/xml/ns/javaee">
+ <property>
+ <property-name>fileUploadListener</property-name>
+ <property-class>javax.el.MethodExpression</property-class>
+ </property>
+</cdk:properties>
13 years, 2 months
JBoss Rich Faces SVN: r21900 - in branches/4.0.0.CR1/ui/validator/ui/src/main/java/org/richfaces: view/facelets/html and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2011-02-23 15:03:53 -0500 (Wed, 23 Feb 2011)
New Revision: 21900
Added:
branches/4.0.0.CR1/ui/validator/ui/src/main/java/org/richfaces/view/facelets/html/GraphValidatorHandler.java
Modified:
branches/4.0.0.CR1/ui/validator/ui/src/main/java/org/richfaces/component/AbstractGraphValidator.java
Log:
https://issues.jboss.org/browse/RF-10456
Modified: branches/4.0.0.CR1/ui/validator/ui/src/main/java/org/richfaces/component/AbstractGraphValidator.java
===================================================================
--- branches/4.0.0.CR1/ui/validator/ui/src/main/java/org/richfaces/component/AbstractGraphValidator.java 2011-02-23 19:09:16 UTC (rev 21899)
+++ branches/4.0.0.CR1/ui/validator/ui/src/main/java/org/richfaces/component/AbstractGraphValidator.java 2011-02-23 20:03:53 UTC (rev 21900)
@@ -20,19 +20,15 @@
*/
package org.richfaces.component;
-import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.Collection;
-import java.util.Iterator;
import javax.el.ELContext;
import javax.el.ValueExpression;
import javax.faces.FacesException;
import javax.faces.application.FacesMessage;
-import javax.faces.component.EditableValueHolder;
-import javax.faces.component.UIComponent;
import javax.faces.component.UIComponentBase;
import javax.faces.context.FacesContext;
import javax.faces.validator.Validator;
@@ -51,7 +47,7 @@
* JSF component class
*
*/
-@JsfComponent(tag=@Tag(name="graphValidator",type=TagType.Facelets))
+@JsfComponent(tag=@Tag(name="graphValidator",type=TagType.Facelets, handler = "org.richfaces.view.facelets.html.GraphValidatorHandler"))
public abstract class AbstractGraphValidator extends UIComponentBase {
public static final String COMPONENT_TYPE = "org.richfaces.GraphValidator";
@@ -231,9 +227,7 @@
}
}
- @Override
- public void encodeBegin(FacesContext context) throws IOException {
- super.encodeBegin(context);
+ public Validator createChildrenValidator(FacesContext context) {
FacesBeanValidator validator = (FacesBeanValidator) context.getApplication().createValidator(getType());
validator.setSummary(getSummary());
ValueExpression expression = getValueExpression("groups");
@@ -242,48 +236,7 @@
} else {
validator.setGroups(getGroups());
}
- setupValidators(this, validator);
+ return validator;
}
-
- @Override
- public void encodeChildren(FacesContext context) throws IOException {
- if (isRendered()) {
- for (UIComponent child : getChildren()) {
- if (child.isRendered()) {
- child.encodeAll(context);
- }
- }
- }
- }
-
- private void setupValidators(UIComponent component, Validator validator) {
- Iterator<UIComponent> facetsAndChildren = component.getFacetsAndChildren();
- while (facetsAndChildren.hasNext()) {
- UIComponent child = facetsAndChildren.next();
- if (child instanceof EditableValueHolder) {
- EditableValueHolder input = (EditableValueHolder) child;
- setupValidator(input, validator);
- }
- setupValidators(child, validator);
- }
- }
-
- /**
- * @param input
- */
- private void setupValidator(EditableValueHolder input, Validator validator) {
- Validator[] validators = input.getValidators();
- for (int i = 0; i < validators.length; i++) {
- if (validators[i].getClass().equals(validator.getClass())) {
- return;
- }
- }
- input.addValidator(validator);
- }
-
- @Override
- public boolean getRendersChildren() {
- return true;
- }
-
+
}
Added: branches/4.0.0.CR1/ui/validator/ui/src/main/java/org/richfaces/view/facelets/html/GraphValidatorHandler.java
===================================================================
--- branches/4.0.0.CR1/ui/validator/ui/src/main/java/org/richfaces/view/facelets/html/GraphValidatorHandler.java (rev 0)
+++ branches/4.0.0.CR1/ui/validator/ui/src/main/java/org/richfaces/view/facelets/html/GraphValidatorHandler.java 2011-02-23 20:03:53 UTC (rev 21900)
@@ -0,0 +1,125 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.richfaces.view.facelets.html;
+
+import java.io.IOException;
+import java.util.Iterator;
+
+import javax.el.ELException;
+import javax.faces.FacesException;
+import javax.faces.component.EditableValueHolder;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.validator.BeanValidator;
+import javax.faces.validator.Validator;
+import javax.faces.view.facelets.ComponentConfig;
+import javax.faces.view.facelets.ComponentHandler;
+import javax.faces.view.facelets.FaceletContext;
+
+import org.richfaces.component.AbstractGraphValidator;
+
+/**
+ * @author Nick Belaevski
+ *
+ */
+public class GraphValidatorHandler extends ComponentHandler {
+
+ private static final String BUILT_IN_BEAN_VALIDATOR_ATTRIBUTE_NAME = GraphValidatorHandler.class.getName()
+ + ":BUILT_IN_BEAN_VALIDATOR_ATTRIBUTE_NAME";
+
+ public GraphValidatorHandler(ComponentConfig config) {
+ super(config);
+ }
+
+ private Validator getBuiltInBeanValidator(FacesContext context) {
+ Validator result = (Validator) context.getAttributes().get(BUILT_IN_BEAN_VALIDATOR_ATTRIBUTE_NAME);
+
+ if (result == null) {
+ result = context.getApplication().createValidator(BeanValidator.VALIDATOR_ID);
+ context.getAttributes().put(BUILT_IN_BEAN_VALIDATOR_ATTRIBUTE_NAME, result);
+ }
+
+ return result;
+ }
+
+ private void setupValidators(FacesContext context, UIComponent component, Validator validator) {
+ if (component.getChildCount() == 0 && component.getFacetCount() == 0) {
+ return;
+ }
+
+ Iterator<UIComponent> facetsAndChildren = component.getFacetsAndChildren();
+ while (facetsAndChildren.hasNext()) {
+ UIComponent child = facetsAndChildren.next();
+ if (child instanceof EditableValueHolder) {
+ EditableValueHolder input = (EditableValueHolder) child;
+ setupValidator(context, input, validator);
+ }
+
+ if (!(child instanceof AbstractGraphValidator)) {
+ //don't setup validators for nested GVs
+ setupValidators(context, child, validator);
+ }
+
+ }
+ }
+
+ /**
+ * @param context TODO
+ * @param input
+ */
+ private void setupValidator(FacesContext context, EditableValueHolder input, Validator beanValidator) {
+ boolean addBeanValidator = true;
+ Class<?> validatorToRemoveClass = getBuiltInBeanValidator(context).getClass();
+ Validator validatorToRemove = null;
+
+ Validator[] validators = input.getValidators();
+ for (int i = 0; i < validators.length; i++) {
+ Validator nextValidator = validators[i];
+ if (nextValidator.getClass().equals(beanValidator.getClass())) {
+ addBeanValidator = false;
+ continue;
+ }
+
+ if (nextValidator.getClass().equals(validatorToRemoveClass)) {
+ validatorToRemove = nextValidator;
+ }
+ }
+
+ if (validatorToRemove != null) {
+ input.removeValidator(validatorToRemove);
+ }
+
+ if (addBeanValidator) {
+ input.addValidator(beanValidator);
+ }
+ }
+
+ @Override
+ public void applyNextHandler(FaceletContext ctx, UIComponent c) throws IOException, FacesException, ELException {
+ super.applyNextHandler(ctx, c);
+
+ AbstractGraphValidator graphValidator = (AbstractGraphValidator) c;
+ Validator childrenValidator = graphValidator.createChildrenValidator(ctx.getFacesContext());
+
+ setupValidators(ctx.getFacesContext(), graphValidator, childrenValidator);
+ }
+}
13 years, 2 months
JBoss Rich Faces SVN: r21899 - in branches/4.0.0.CR1: cdk/generator/src/main/java/org/richfaces/cdk/model and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2011-02-23 14:09:16 -0500 (Wed, 23 Feb 2011)
New Revision: 21899
Added:
branches/4.0.0.CR1/cdk/generator/src/main/java/org/richfaces/cdk/generate/taglib/ListenerAttributes.java
branches/4.0.0.CR1/examples/iteration-demo/src/main/java/org/richfaces/demo/SelectionChangeActionListenerImpl.java
branches/4.0.0.CR1/examples/iteration-demo/src/main/java/org/richfaces/demo/ToggleActionListenerImpl.java
Modified:
branches/4.0.0.CR1/cdk/generator/src/main/java/org/richfaces/cdk/generate/taglib/TaglibGeneratorVisitor.java
branches/4.0.0.CR1/cdk/generator/src/main/java/org/richfaces/cdk/model/AttributeModel.java
branches/4.0.0.CR1/examples/iteration-demo/src/main/java/org/richfaces/demo/TreeBean.java
branches/4.0.0.CR1/examples/iteration-demo/src/main/webapp/tree.xhtml
Log:
RF-9958: @for, @binding, and @type were added for itemChangeListener, panelToggleListener, treeToggleListener, treeSelectionChangeListener components.
Added: branches/4.0.0.CR1/cdk/generator/src/main/java/org/richfaces/cdk/generate/taglib/ListenerAttributes.java
===================================================================
--- branches/4.0.0.CR1/cdk/generator/src/main/java/org/richfaces/cdk/generate/taglib/ListenerAttributes.java (rev 0)
+++ branches/4.0.0.CR1/cdk/generator/src/main/java/org/richfaces/cdk/generate/taglib/ListenerAttributes.java 2011-02-23 19:09:16 UTC (rev 21899)
@@ -0,0 +1,28 @@
+package org.richfaces.cdk.generate.taglib;
+
+import org.richfaces.cdk.model.AttributeModel;
+import org.richfaces.cdk.model.ClassName;
+import org.richfaces.cdk.model.PropertyBase;
+
+import javax.el.ValueExpression;
+
+/**
+ * User: Gleb Galkin
+ * Date: 23.02.11
+ */
+public enum ListenerAttributes {
+ FOR(new AttributeModel("for", false, ClassName.get(String.class))),
+ BINDING(new AttributeModel("binding", false, ClassName.get(ValueExpression.class))),
+ LISTENER(new AttributeModel("listener", false, ClassName.get(ValueExpression.class))),
+ TYPE(new AttributeModel("type", false, ClassName.get(ValueExpression.class)));
+
+ private PropertyBase attribute;
+
+ ListenerAttributes(PropertyBase attribute) {
+ this.attribute = attribute;
+ }
+
+ public PropertyBase getAttribute() {
+ return attribute;
+ }
+}
Modified: branches/4.0.0.CR1/cdk/generator/src/main/java/org/richfaces/cdk/generate/taglib/TaglibGeneratorVisitor.java
===================================================================
--- branches/4.0.0.CR1/cdk/generator/src/main/java/org/richfaces/cdk/generate/taglib/TaglibGeneratorVisitor.java 2011-02-23 18:26:27 UTC (rev 21898)
+++ branches/4.0.0.CR1/cdk/generator/src/main/java/org/richfaces/cdk/generate/taglib/TaglibGeneratorVisitor.java 2011-02-23 19:09:16 UTC (rev 21899)
@@ -26,19 +26,7 @@
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
import org.richfaces.cdk.annotations.TagType;
-import org.richfaces.cdk.model.BeanModelBase;
-import org.richfaces.cdk.model.BehaviorModel;
-import org.richfaces.cdk.model.ComponentLibrary;
-import org.richfaces.cdk.model.ComponentModel;
-import org.richfaces.cdk.model.ConverterModel;
-import org.richfaces.cdk.model.DescriptionGroup;
-import org.richfaces.cdk.model.EventModel;
-import org.richfaces.cdk.model.FacesId;
-import org.richfaces.cdk.model.FunctionModel;
-import org.richfaces.cdk.model.PropertyBase;
-import org.richfaces.cdk.model.SimpleVisitor;
-import org.richfaces.cdk.model.TagModel;
-import org.richfaces.cdk.model.ValidatorModel;
+import org.richfaces.cdk.model.*;
import org.richfaces.cdk.util.Strings;
/**
@@ -262,11 +250,18 @@
if (isFaceletsTag(tagModel)) {
Element tag = createTag(tagModel.getName());
addTagHandler(tag, tagModel);
+ appendAttributesForListener(tag);
}
}
return null;
}
+ private void appendAttributesForListener(Element tag) {
+ for (ListenerAttributes attribute : ListenerAttributes.values()) {
+ createAttributeElement(tag, attribute.getAttribute().getName(), attribute.getAttribute());
+ }
+ }
+
private boolean isFaceletsTag(TagType type) {
return TagType.Facelets.equals(type) || TagType.All.equals(type);
@@ -281,7 +276,7 @@
* Add common description elements.
* </p>
*
- * @param parant
+ * @param parent
* @param model
*/
private void addDescription(Element parent, DescriptionGroup model) {
Modified: branches/4.0.0.CR1/cdk/generator/src/main/java/org/richfaces/cdk/model/AttributeModel.java
===================================================================
--- branches/4.0.0.CR1/cdk/generator/src/main/java/org/richfaces/cdk/model/AttributeModel.java 2011-02-23 18:26:27 UTC (rev 21898)
+++ branches/4.0.0.CR1/cdk/generator/src/main/java/org/richfaces/cdk/model/AttributeModel.java 2011-02-23 19:09:16 UTC (rev 21899)
@@ -32,4 +32,15 @@
*/
public class AttributeModel extends PropertyBase {
+ public AttributeModel() {
+ super();
+ }
+
+ public AttributeModel(String name, boolean required, ClassName type) {
+ super();
+ setName(name);
+ setRequired(required);
+ setType(type);
+ }
+
}
Added: branches/4.0.0.CR1/examples/iteration-demo/src/main/java/org/richfaces/demo/SelectionChangeActionListenerImpl.java
===================================================================
--- branches/4.0.0.CR1/examples/iteration-demo/src/main/java/org/richfaces/demo/SelectionChangeActionListenerImpl.java (rev 0)
+++ branches/4.0.0.CR1/examples/iteration-demo/src/main/java/org/richfaces/demo/SelectionChangeActionListenerImpl.java 2011-02-23 19:09:16 UTC (rev 21899)
@@ -0,0 +1,17 @@
+package org.richfaces.demo;
+
+import org.richfaces.event.TreeSelectionChangeEvent;
+import org.richfaces.event.TreeSelectionChangeListener;
+
+import javax.faces.event.AbortProcessingException;
+
+/**
+ * User: Gleb Galkin
+ * Date: 23.02.11
+ */
+public class SelectionChangeActionListenerImpl implements TreeSelectionChangeListener {
+
+ public void processSelectionChange(TreeSelectionChangeEvent event) throws AbortProcessingException {
+ System.out.println("Inside Selection Change Action");
+ }
+}
Added: branches/4.0.0.CR1/examples/iteration-demo/src/main/java/org/richfaces/demo/ToggleActionListenerImpl.java
===================================================================
--- branches/4.0.0.CR1/examples/iteration-demo/src/main/java/org/richfaces/demo/ToggleActionListenerImpl.java (rev 0)
+++ branches/4.0.0.CR1/examples/iteration-demo/src/main/java/org/richfaces/demo/ToggleActionListenerImpl.java 2011-02-23 19:09:16 UTC (rev 21899)
@@ -0,0 +1,14 @@
+package org.richfaces.demo;
+
+import org.richfaces.event.TreeToggleEvent;
+
+/**
+ * User: Gleb Galkin
+ * Date: 23.02.11
+ */
+public class ToggleActionListenerImpl {
+
+ public void processToggleAction(TreeToggleEvent event) {
+ System.out.println("Inside Toggle Action: " + (event.isCollapsed() ? "collapsed tree" : "expanded tree"));
+ }
+}
Modified: branches/4.0.0.CR1/examples/iteration-demo/src/main/java/org/richfaces/demo/TreeBean.java
===================================================================
--- branches/4.0.0.CR1/examples/iteration-demo/src/main/java/org/richfaces/demo/TreeBean.java 2011-02-23 18:26:27 UTC (rev 21898)
+++ branches/4.0.0.CR1/examples/iteration-demo/src/main/java/org/richfaces/demo/TreeBean.java 2011-02-23 19:09:16 UTC (rev 21899)
@@ -21,13 +21,17 @@
*/
package org.richfaces.demo;
-import java.io.Serializable;
-import java.text.DateFormat;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Date;
-import java.util.List;
+import org.richfaces.component.AbstractTree;
+import org.richfaces.component.AbstractTreeNode;
+import org.richfaces.component.SwitchType;
+import org.richfaces.event.TreeSelectionChangeEvent;
+import org.richfaces.event.TreeSelectionChangeListener;
+import org.richfaces.event.TreeToggleEvent;
+import org.richfaces.event.TreeToggleListener;
+import org.richfaces.log.LogFactory;
+import org.richfaces.log.Logger;
+
import javax.annotation.PostConstruct;
import javax.faces.application.FacesMessage;
import javax.faces.bean.ManagedBean;
@@ -37,17 +41,13 @@
import javax.faces.event.AjaxBehaviorEvent;
import javax.faces.event.FacesEvent;
import javax.swing.tree.TreeNode;
+import java.io.Serializable;
+import java.text.DateFormat;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Date;
+import java.util.List;
-import org.richfaces.component.AbstractTree;
-import org.richfaces.component.AbstractTreeNode;
-import org.richfaces.component.SwitchType;
-import org.richfaces.event.TreeSelectionChangeEvent;
-import org.richfaces.event.TreeSelectionChangeListener;
-import org.richfaces.event.TreeToggleEvent;
-import org.richfaces.event.TreeToggleListener;
-import org.richfaces.log.LogFactory;
-import org.richfaces.log.Logger;
-
/**
* @author Nick Belaevski
*
@@ -114,7 +114,10 @@
private String toggleNodeEvent = "";
private String executeTestText;
-
+
+ private ToggleActionListenerImpl toggleActionListenerImpl = new ToggleActionListenerImpl();
+ private SelectionChangeActionListenerImpl selectionChangeActionListener;
+
private static Object staticGetNodeData() {
FacesContext facesContext = FacesContext.getCurrentInstance();
return facesContext.getApplication().evaluateExpressionGet(facesContext, "#{node}", Object.class);
@@ -245,4 +248,20 @@
public String getCurrentTimeAsString() {
return DateFormat.getTimeInstance().format(new Date());
}
+
+ public ToggleActionListenerImpl getToggleActionListenerImpl() {
+ return toggleActionListenerImpl;
+ }
+
+ public void setToggleActionListenerImpl(ToggleActionListenerImpl toggleActionListenerImpl) {
+ this.toggleActionListenerImpl = toggleActionListenerImpl;
+ }
+
+ public SelectionChangeActionListenerImpl getSelectionChangeActionListener() {
+ return selectionChangeActionListener;
+ }
+
+ public void setSelectionChangeActionListener(SelectionChangeActionListenerImpl selectionChangeActionListener) {
+ this.selectionChangeActionListener = selectionChangeActionListener;
+ }
}
Modified: branches/4.0.0.CR1/examples/iteration-demo/src/main/webapp/tree.xhtml
===================================================================
--- branches/4.0.0.CR1/examples/iteration-demo/src/main/webapp/tree.xhtml 2011-02-23 18:26:27 UTC (rev 21898)
+++ branches/4.0.0.CR1/examples/iteration-demo/src/main/webapp/tree.xhtml 2011-02-23 19:09:16 UTC (rev 21899)
@@ -107,10 +107,14 @@
<h:form id="form">
Base tree:
- <it:tree id="tree" nodeType="#{node.parent == null ? 'rootNode': 'childNode'}" var="node" value="#{treeBean.rootNodes}"
+ <it:tree id="tree" nodeType="#{node.parent == null ? 'rootNode': 'childNode'}" var="node" value="#{treeBean.rootNodes}"
selectionType="#{treeBean.selectionType}" toggleType="#{treeBean.toggleType}" selection="#{treeBean.selection}">
- <it:treeNode type="rootNode">
- <h:panelGroup id="rootNodeGroup">
+
+ <it:treeToggleListener listener="#{treeBean.toggleActionListenerImpl.processToggleAction}" />
+ <it:treeSelectionChangeListener binding="#{treeBean.selectionChangeActionListener}" type="org.richfaces.demo.SelectionChangeActionListenerImpl" />
+
+ <it:treeNode type="rootNode">
+ <h:panelGroup id="rootNodeGroup">
Root node: #{node.data} -
<h:commandLink value="link" action="#{treeBean.clickNode}">
<f:ajax render=":messages" />
13 years, 2 months
JBoss Rich Faces SVN: r21898 - modules/tests/metamer/trunk/application.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2011-02-23 13:26:27 -0500 (Wed, 23 Feb 2011)
New Revision: 21898
Modified:
modules/tests/metamer/trunk/application/pom.xml
Log:
added mojarra 2.1.0-b11 dependency
Modified: modules/tests/metamer/trunk/application/pom.xml
===================================================================
--- modules/tests/metamer/trunk/application/pom.xml 2011-02-23 18:11:12 UTC (rev 21897)
+++ modules/tests/metamer/trunk/application/pom.xml 2011-02-23 18:26:27 UTC (rev 21898)
@@ -489,12 +489,12 @@
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
- <version>2.1.0-b05</version>
+ <version>2.1.0-b11</version>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
- <version>2.1.0-b05</version>
+ <version>2.1.0-b11</version>
</dependency>
</dependencies>
<build>
13 years, 2 months
JBoss Rich Faces SVN: r21897 - in branches/4.0.0.CR1: ui/input/ui/src/main/templates and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2011-02-23 13:11:12 -0500 (Wed, 23 Feb 2011)
New Revision: 21897
Modified:
branches/4.0.0.CR1/cdk/attributes/src/main/resources/META-INF/cdk/attributes/input-props.xml
branches/4.0.0.CR1/ui/input/ui/src/main/templates/inputnumberslider.template.xml
branches/4.0.0.CR1/ui/input/ui/src/main/templates/inputnumberspinner.template.xml
Log:
RF-10578
Modified: branches/4.0.0.CR1/cdk/attributes/src/main/resources/META-INF/cdk/attributes/input-props.xml
===================================================================
--- branches/4.0.0.CR1/cdk/attributes/src/main/resources/META-INF/cdk/attributes/input-props.xml 2011-02-23 18:10:18 UTC (rev 21896)
+++ branches/4.0.0.CR1/cdk/attributes/src/main/resources/META-INF/cdk/attributes/input-props.xml 2011-02-23 18:11:12 UTC (rev 21897)
@@ -46,8 +46,7 @@
<property-extension>
<cdk:pass-through>false</cdk:pass-through>
<cdk:event-name>change</cdk:event-name>
- <cdk:event-name>valueChange</cdk:event-name>
- <default-behavior>true</default-behavior>
+ <cdk:event-name default="true">valueChange</cdk:event-name>
</property-extension>
</property>
Modified: branches/4.0.0.CR1/ui/input/ui/src/main/templates/inputnumberslider.template.xml
===================================================================
--- branches/4.0.0.CR1/ui/input/ui/src/main/templates/inputnumberslider.template.xml 2011-02-23 18:10:18 UTC (rev 21896)
+++ branches/4.0.0.CR1/ui/input/ui/src/main/templates/inputnumberslider.template.xml 2011-02-23 18:11:12 UTC (rev 21897)
@@ -74,7 +74,7 @@
<span class="rf-insl-tt #{component.attributes['tooltipClass']}">#{getInputValue(facesContext, component)}</span>
</c:if>
<!-- TODO Rewrite the next line when the CDK will support normal way to take event handlers from attributes and behaviors. -->
- <cdk:object name="onchange" type="String" value="#{convertToString(RenderKitUtils.getAttributeAndBehaviorsValue(facesContext, component, RenderKitUtils.attributes().generic('onchange', 'onchange', 'change').first()))}" />
+ <cdk:object name="onchange" type="String" value="#{convertToString(RenderKitUtils.getAttributeAndBehaviorsValue(facesContext, component, RenderKitUtils.attributes().generic('onchange', 'onchange', 'change', 'valueChange').first()))}" />
<script type="text/javascript">new RichFaces.ui.InputNumberSlider('#{clientId}', {
delay: #{component.attributes['delay']},
disabled: #{component.attributes['disabled']},
Modified: branches/4.0.0.CR1/ui/input/ui/src/main/templates/inputnumberspinner.template.xml
===================================================================
--- branches/4.0.0.CR1/ui/input/ui/src/main/templates/inputnumberspinner.template.xml 2011-02-23 18:10:18 UTC (rev 21896)
+++ branches/4.0.0.CR1/ui/input/ui/src/main/templates/inputnumberspinner.template.xml 2011-02-23 18:11:12 UTC (rev 21897)
@@ -52,7 +52,7 @@
<span class="rf-insp-dec#{component.attributes['disabled'] ? '-dis' : ''}" cdk:passThrough="onclick:ondownclick" />
</span>
<!-- TODO Rewrite the next line when the CDK will support normal way to take event handlers from attributes and behaviors. -->
- <cdk:object name="onchange" type="String" value="#{convertToString(RenderKitUtils.getAttributeAndBehaviorsValue(facesContext, component, RenderKitUtils.attributes().generic('onchange', 'onchange', 'change').first()))}" />
+ <cdk:object name="onchange" type="String" value="#{convertToString(RenderKitUtils.getAttributeAndBehaviorsValue(facesContext, component, RenderKitUtils.attributes().generic('onchange', 'onchange', 'change', 'valueChange').first()))}" />
<script type="text/javascript">new RichFaces.ui.InputNumberSpinner('#{clientId}', {
cycled: #{component.attributes['cycled']},
maxValue: #{component.attributes['maxValue']},
13 years, 2 months
JBoss Rich Faces SVN: r21896 - in branches/4.0.X: ui/input/ui/src/main/templates and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2011-02-23 13:10:18 -0500 (Wed, 23 Feb 2011)
New Revision: 21896
Modified:
branches/4.0.X/cdk/attributes/src/main/resources/META-INF/cdk/attributes/input-props.xml
branches/4.0.X/ui/input/ui/src/main/templates/inputnumberslider.template.xml
branches/4.0.X/ui/input/ui/src/main/templates/inputnumberspinner.template.xml
Log:
RF-10578
Modified: branches/4.0.X/cdk/attributes/src/main/resources/META-INF/cdk/attributes/input-props.xml
===================================================================
--- branches/4.0.X/cdk/attributes/src/main/resources/META-INF/cdk/attributes/input-props.xml 2011-02-23 18:10:17 UTC (rev 21895)
+++ branches/4.0.X/cdk/attributes/src/main/resources/META-INF/cdk/attributes/input-props.xml 2011-02-23 18:10:18 UTC (rev 21896)
@@ -46,8 +46,7 @@
<property-extension>
<cdk:pass-through>false</cdk:pass-through>
<cdk:event-name>change</cdk:event-name>
- <cdk:event-name>valueChange</cdk:event-name>
- <default-behavior>true</default-behavior>
+ <cdk:event-name default="true">valueChange</cdk:event-name>
</property-extension>
</property>
Modified: branches/4.0.X/ui/input/ui/src/main/templates/inputnumberslider.template.xml
===================================================================
--- branches/4.0.X/ui/input/ui/src/main/templates/inputnumberslider.template.xml 2011-02-23 18:10:17 UTC (rev 21895)
+++ branches/4.0.X/ui/input/ui/src/main/templates/inputnumberslider.template.xml 2011-02-23 18:10:18 UTC (rev 21896)
@@ -74,7 +74,7 @@
<span class="rf-insl-tt #{component.attributes['tooltipClass']}">#{getInputValue(facesContext, component)}</span>
</c:if>
<!-- TODO Rewrite the next line when the CDK will support normal way to take event handlers from attributes and behaviors. -->
- <cdk:object name="onchange" type="String" value="#{convertToString(RenderKitUtils.getAttributeAndBehaviorsValue(facesContext, component, RenderKitUtils.attributes().generic('onchange', 'onchange', 'change').first()))}" />
+ <cdk:object name="onchange" type="String" value="#{convertToString(RenderKitUtils.getAttributeAndBehaviorsValue(facesContext, component, RenderKitUtils.attributes().generic('onchange', 'onchange', 'change', 'valueChange').first()))}" />
<script type="text/javascript">new RichFaces.ui.InputNumberSlider('#{clientId}', {
delay: #{component.attributes['delay']},
disabled: #{component.attributes['disabled']},
Modified: branches/4.0.X/ui/input/ui/src/main/templates/inputnumberspinner.template.xml
===================================================================
--- branches/4.0.X/ui/input/ui/src/main/templates/inputnumberspinner.template.xml 2011-02-23 18:10:17 UTC (rev 21895)
+++ branches/4.0.X/ui/input/ui/src/main/templates/inputnumberspinner.template.xml 2011-02-23 18:10:18 UTC (rev 21896)
@@ -52,7 +52,7 @@
<span class="rf-insp-dec#{component.attributes['disabled'] ? '-dis' : ''}" cdk:passThrough="onclick:ondownclick" />
</span>
<!-- TODO Rewrite the next line when the CDK will support normal way to take event handlers from attributes and behaviors. -->
- <cdk:object name="onchange" type="String" value="#{convertToString(RenderKitUtils.getAttributeAndBehaviorsValue(facesContext, component, RenderKitUtils.attributes().generic('onchange', 'onchange', 'change').first()))}" />
+ <cdk:object name="onchange" type="String" value="#{convertToString(RenderKitUtils.getAttributeAndBehaviorsValue(facesContext, component, RenderKitUtils.attributes().generic('onchange', 'onchange', 'change', 'valueChange').first()))}" />
<script type="text/javascript">new RichFaces.ui.InputNumberSpinner('#{clientId}', {
cycled: #{component.attributes['cycled']},
maxValue: #{component.attributes['maxValue']},
13 years, 2 months
JBoss Rich Faces SVN: r21895 - modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2011-02-23 13:10:17 -0500 (Wed, 23 Feb 2011)
New Revision: 21895
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MatrixConfigurator.java
Log:
fixed MatrixConfigurator when no injection parameters is necessary + when no configuration for method is configured
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MatrixConfigurator.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MatrixConfigurator.java 2011-02-23 16:40:38 UTC (rev 21894)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MatrixConfigurator.java 2011-02-23 18:10:17 UTC (rev 21895)
@@ -78,13 +78,18 @@
}
public List<IMethodInstance> intercept(List<IMethodInstance> methodInstances, ITestContext context) {
+ List<IMethodInstance> result = new LinkedList<IMethodInstance>();
for (IMethodInstance methodInstance : methodInstances) {
for (int i = 0; i < methodInstance.getMethod().getInvocationCount(); i++) {
methods.add(methodInstance.getMethod().getMethod());
}
+
+ if (methodInstance.getMethod().getInvocationCount() > 0) {
+ result.add(methodInstance);
+ }
}
- return methodInstances;
+ return result;
}
public void beforeInvocation(IInvokedMethod invokedMethod, ITestResult testResult) {
@@ -229,7 +234,11 @@
getClassConfigurations(realClass).put(realMethod, configuration);
- return Math.max(1, count);
+ if (parameters.size() == 0) {
+ return 1;
+ }
+
+ return count;
}
private void fulfillParametersFromAnnotations(Class<?> testClass, Map<Field, List<? extends Object>> parameters,
13 years, 2 months
JBoss Rich Faces SVN: r21894 - branches/4.0.0.CR1/ui/output/ui/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2011-02-23 11:40:38 -0500 (Wed, 23 Feb 2011)
New Revision: 21894
Modified:
branches/4.0.0.CR1/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanel.java
Log:
https://issues.jboss.org/browse/RF-9953
Modified: branches/4.0.0.CR1/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanel.java
===================================================================
--- branches/4.0.0.CR1/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanel.java 2011-02-23 16:34:47 UTC (rev 21893)
+++ branches/4.0.0.CR1/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanel.java 2011-02-23 16:40:38 UTC (rev 21894)
@@ -23,11 +23,11 @@
import javax.faces.component.UIComponentBase;
+import org.richfaces.cdk.annotations.Attribute;
import org.richfaces.cdk.annotations.JsfComponent;
import org.richfaces.cdk.annotations.JsfRenderer;
import org.richfaces.cdk.annotations.Tag;
import org.richfaces.cdk.annotations.TagType;
-import org.richfaces.cdk.annotations.Attribute;
/**
* JSF component class
*
@@ -38,7 +38,9 @@
)
public abstract class AbstractPanel extends UIComponentBase {
- private static final String COMPONENT_FAMILY = "org.richfaces.Panel";
+ public static final String COMPONENT_TYPE = "org.richfaces.Panel";
+
+ public static final String COMPONENT_FAMILY = "org.richfaces.Panel";
@Attribute
public abstract String getHeader();
13 years, 2 months