Author: jbalunas(a)redhat.com
Date: 2011-03-27 09:54:37 -0400 (Sun, 27 Mar 2011)
New Revision: 22319
Added:
branches/4.0.X/core/api/src/main/java/org/richfaces/application/Initializable.java
branches/4.0.X/core/api/src/main/javadoc/
branches/4.0.X/core/api/src/main/javadoc/org/
branches/4.0.X/core/api/src/main/javadoc/org/richfaces/
branches/4.0.X/core/api/src/main/javadoc/org/richfaces/application/
branches/4.0.X/core/api/src/main/javadoc/org/richfaces/application/services.png
branches/4.0.X/core/api/src/main/javadoc/org/richfaces/application/services.uxf
Removed:
branches/4.0.X/core/api/src/main/java/org/ajax4jsf/javascript/AjaxSubmitFunction.java
branches/4.0.X/core/api/src/main/java/org/ajax4jsf/javascript/JSBind.java
branches/4.0.X/core/api/src/main/java/org/richfaces/component/TemplateComponent.java
branches/4.0.X/core/api/src/main/java/org/richfaces/event/
branches/4.0.X/core/api/src/main/java/org/richfaces/skin/SkinConfiguration.java
branches/4.0.X/core/impl/src/main/java/org/ajax4jsf/context/
branches/4.0.X/core/impl/src/main/java/org/ajax4jsf/package-info.java
branches/4.0.X/core/impl/src/main/java/org/richfaces/application/Initializable.java
branches/4.0.X/core/impl/src/main/java/org/richfaces/component/util/
branches/4.0.X/core/impl/src/main/java/org/richfaces/context/AttributesContext.java
branches/4.0.X/core/impl/src/main/java/org/richfaces/event/
branches/4.0.X/core/impl/src/main/java/org/richfaces/renderkit/AttributeParametersEncoder.java
branches/4.0.X/core/impl/src/main/java/org/richfaces/renderkit/Expression.java
branches/4.0.X/core/impl/src/main/java/org/richfaces/renderkit/ScriptOptions.java
branches/4.0.X/core/impl/src/main/java/org/richfaces/renderkit/ScriptOptionsContributor.java
branches/4.0.X/core/impl/src/main/java/org/richfaces/skin/DummySkinConfiguration.java
Modified:
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/Alias.java
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/Attribute.java
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/Description.java
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/Event.java
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/EventName.java
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/Facet.java
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/Function.java
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/JsfBehavior.java
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/JsfBehaviorRenderer.java
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/JsfComponent.java
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/JsfConverter.java
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/JsfRenderer.java
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/JsfValidator.java
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/RendererSpecificComponent.java
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/Tag.java
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/TagLibrary.java
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/TagType.java
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/package-info.java
branches/4.0.X/core/api/src/main/java/org/richfaces/application/Module.java
branches/4.0.X/core/api/src/main/java/org/richfaces/application/ServiceException.java
branches/4.0.X/core/api/src/main/java/org/richfaces/application/ServiceTracker.java
branches/4.0.X/core/api/src/main/java/org/richfaces/application/ServicesFactory.java
branches/4.0.X/core/api/src/main/java/org/richfaces/cache/CacheFactory.java
Log:
RF-10785 merge from /trunk --> 4.0.X
Modified:
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/Alias.java
===================================================================
---
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/Alias.java 2011-03-27
13:51:09 UTC (rev 22318)
+++
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/Alias.java 2011-03-27
13:54:37 UTC (rev 22319)
@@ -28,7 +28,7 @@
/**
* <p class="changed_added_4_0">
- * Attribute aliases. CDK will generate getters/setters for these aliases which delegate
calls to the original attribute
+ * Attribute aliases. CDK will generate getter and setter methods for these aliases which
delegate calls to the original attribute
* methods.
* </p>
*
Modified:
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/Attribute.java
===================================================================
---
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/Attribute.java 2011-03-27
13:51:09 UTC (rev 22318)
+++
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/Attribute.java 2011-03-27
13:54:37 UTC (rev 22319)
@@ -29,8 +29,12 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
+import javax.faces.component.behavior.ClientBehavior;
+import javax.faces.el.MethodBinding;
+
/**
- * <p class="changed_added_4_0">
+ * <p class="changed_added_4_0">Used to define Java class field or bean
property getter method as JSF attribute.
+ * It used on the abstract method, all necessary code for attribute, including state
save/restore code, will be generated by CDK.
* </p>
*
* @author asmirnov(a)exadel.com
@@ -42,7 +46,7 @@
public @interface Attribute {
/**
- * <p class="changed_added_4_0">
+ * <p class="changed_added_4_0">Restricts attribute to literal values
only ( no EL expressions ).
* </p>
*
* @return
@@ -50,7 +54,7 @@
boolean literal() default false;
/**
- * <p class="changed_added_4_0">
+ * <p class="changed_added_4_0">Tells CDK to not include attribute in
the VDL tag.
* </p>
*
* @return
@@ -58,7 +62,7 @@
boolean hidden() default false;
/**
- * <p class="changed_added_4_0">
+ * <p class="changed_added_4_0">Marks attribute as read-only ( no
setter method ).
* </p>
*
* @return
@@ -68,26 +72,59 @@
// boolean transient() default false;
/**
- * <p class="changed_added_4_0">
+ * <p class="changed_added_4_0">If true, attribute used as pass
through html attribue, eg. rendered directly into html
+ * without any transformations.
* </p>
*
* @return
*/
boolean passThrough() default false;
+ /**
+ * <p class="changed_added_4_0">Marks attribute as required.
Generated tag handler should check its presence.</p>
+ * @return
+ */
boolean required() default false;
+ /**
+ * <p class="changed_added_4_0">Tells CDK to generate getter and
setter for attribute.</p>
+ * @return
+ */
boolean generate() default true;
+ /**
+ * <p class="changed_added_4_0">Attribute default value. Should be
valid Java code that can be used in field initialiser of function call.</p>
+ * @return
+ */
String defaultValue() default "";
+ /**
+ * <p class="changed_added_4_0">Used by IDE to suggest attribute
value.</p>
+ * @return
+ */
String suggestedValue() default "";
+ /**
+ * <p class="changed_added_4_0">Attribute description to include in
generated faces-config.xml and taglibs.</p>
+ * @return
+ */
Description description() default @Description();
+ /**
+ * <p class="changed_added_4_0">Method signature for attributes with
EL method reference type, either {@link MethodBinding} or {@link
MethodExpression}.</p>
+ * @return
+ */
Signature signature() default @Signature(returnType=Signature.NONE.class);
+ /**
+ * <p class="changed_added_4_0">Event descriptions for {@link
ClientBehavior} binding.</p>
+ * @return
+ */
EventName[] events() default {};
+ /**
+ * <p class="changed_added_4_0">Attribute aliases.</p>
+ * @return
+ */
Alias[] aliases() default {};
}
Modified:
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/Description.java
===================================================================
---
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/Description.java 2011-03-27
13:51:09 UTC (rev 22318)
+++
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/Description.java 2011-03-27
13:54:37 UTC (rev 22319)
@@ -25,7 +25,7 @@
/**
* <p class="changed_added_4_0">
- * Description used that would be used in IDE to display.
+ * Object or attribute description. Included into generated faces-config.xml or tag
library, so it can be used by IDE.
* </p>
*
* @author asmirnov(a)exadel.com
@@ -35,7 +35,7 @@
public static final String NAME =
"org.richfaces.cdk.annotations.Description";
/**
- * <p class="changed_added_4_0">Long description of the
object.</p>
+ * <p class="changed_added_4_0">Long description of the object. If
omited, javadoc comment for associated Java element.</p>
* @return
*/
public String value() default "";
@@ -50,7 +50,7 @@
/**
* <p class="changed_added_4_0">
- * URL that defines IDE icon.
+ * URL that defines small IDE icon.
* </p>
*
* @return Description url.
@@ -58,7 +58,9 @@
public String smallIcon() default "";
/**
- * <p class="changed_added_4_0"></p>
+ * <p class="changed_added_4_0">
+ * URL that defines large IDE icon.
+ * </p>
* @return
*/
public String largeIcon() default "";
Modified:
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/Event.java
===================================================================
---
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/Event.java 2011-03-27
13:51:09 UTC (rev 22318)
+++
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/Event.java 2011-03-27
13:54:37 UTC (rev 22319)
@@ -38,7 +38,7 @@
* <ul>
* <li>Event listener interface</li>
* <li>Event source interface</li>
- * <li>Event tag handler and binding wrapper.</li>
+ * <li>Listener tag handler and wrapper to bind listener to the
EL-expression.</li>
* </ul>
* </p>
*
Modified:
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/EventName.java
===================================================================
---
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/EventName.java 2011-03-27
13:51:09 UTC (rev 22318)
+++
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/EventName.java 2011-03-27
13:54:37 UTC (rev 22319)
@@ -29,8 +29,10 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
+import javax.faces.component.behavior.ClientBehavior;
+
/**
- * <p class="changed_added_4_0">
+ * <p class="changed_added_4_0">Description of client-side event that can
be associated with {@link ClientBehavior}.
* </p>
*
* @author asmirnov(a)exadel.com
@@ -42,7 +44,7 @@
public @interface EventName {
/**
- * <p class="changed_added_4_0">
+ * <p class="changed_added_4_0">Event name ( click,change,mouseover
... ).
* </p>
*
* @return
@@ -50,7 +52,7 @@
public String value() default "";
/**
- * <p class="changed_added_4_0">
+ * <p class="changed_added_4_0">Defines default event. There should
be only one default event per component.
* </p>
*
* @return
Modified:
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/Facet.java
===================================================================
---
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/Facet.java 2011-03-27
13:51:09 UTC (rev 22318)
+++
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/Facet.java 2011-03-27
13:54:37 UTC (rev 22319)
@@ -29,8 +29,10 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
+import javax.faces.component.UIComponent;
+
/**
- * <p class="changed_added_4_0">
+ * <p class="changed_added_4_0">Describes facet of {@link UIComponent}.
* </p>
*
* @author asmirnov(a)exadel.com
@@ -50,19 +52,19 @@
* @return
*/
/**
- * <p class="changed_added_4_0"></p>
+ * <p class="changed_added_4_0">Facet name</p>
* @return
*/
String name() default "";
/**
- * <p class="changed_added_4_0"></p>
+ * <p class="changed_added_4_0">If true, getter and setter methods
for this facet will be generated.</p>
* @return
*/
boolean generate() default true;
/**
- * <p class="changed_added_4_0"></p>
+ * <p class="changed_added_4_0">Facet description.</p>
* @return
*/
Description description() default @Description;
Modified:
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/Function.java
===================================================================
---
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/Function.java 2011-03-27
13:51:09 UTC (rev 22318)
+++
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/Function.java 2011-03-27
13:54:37 UTC (rev 22319)
@@ -40,13 +40,13 @@
public Description description() default @Description();
/**
- * <p class="changed_added_4_0">Function n</p>
+ * <p class="changed_added_4_0">EL-function name</p>
* @return
*/
public String name() default "";
/**
- * <p class="changed_added_4_0">Tag library for include given
function</p>
+ * <p class="changed_added_4_0">Tag library for which given function
will be included.</p>
* @return
*/
public TagType type() default TagType.Facelets;
Modified:
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/JsfBehavior.java
===================================================================
---
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/JsfBehavior.java 2011-03-27
13:51:09 UTC (rev 22318)
+++
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/JsfBehavior.java 2011-03-27
13:54:37 UTC (rev 22319)
@@ -28,8 +28,13 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
+import javax.faces.component.behavior.ClientBehavior;
+import javax.faces.convert.Converter;
+
/**
* <p class="changed_added_4_0">
+ * This annotation defines concrete class as JSF {@link ClientBehavior}, or abstract
class as the base for generated
+ * Behavior implementation.
* </p>
*
* @author asmirnov(a)exadel.com
@@ -50,10 +55,28 @@
*/
public String id() default "";
+ /**
+ * <p class="changed_added_4_0">
+ * fully qualified class name of the generated Behavior implementation. Default value
means nothing to genrate from concrete class,
+ * or infer name by convention for abstract class.</p>
+ * </p>
+ * @return
+ */
public String generate() default "";
+ /**
+ * <p class="changed_added_4_0">
+ * Tag description. If generated tags require special handlers, provide separate
description for every type of tag, JSP and Facelets.
+ * Otherwise, the only one tag tag description with name and type {@link
TagType#All}.
+ * </p>
+ * @return
+ */
public Tag[] tag() default {};
+ /**
+ * <p class="changed_added_4_0">Renderer associated with generated
{@link ClientBehavior}</p>
+ * @return
+ */
public JsfBehaviorRenderer renderer() default @JsfBehaviorRenderer();
/**
* <p class="changed_added_4_0">
@@ -67,11 +90,10 @@
/**
* <p class="changed_added_4_0">
- * defines fragments of faces-config.xml that contain standard attribute definitions.
CDK also tries to read
- * META-INF/cdk/attributes/[classname].xml file for all component superclasses and
interfaces, therefore it is not
- * necessary to explicit include definitions for UIComponent and any other standard
JSF classes. CDK defines couple
- * of its own "urn" namespaces: "urn:resource:" for classpath
resources, "urn:config:" for for project configuration
- * folder and "urn:attributes:" for META-INF/cdk/attributes/ in the
annotations library.
+ * Defines file names for fragment of faces-config.xml that contain standard
attribute definitions. All names relative to the
+ * META-INF/cdk/attributes/ folder in classpath. CDK also tries to read
+ * META-INF/cdk/attributes/[classname].xml file for all component superclasses and
interfaces. Therefore, it is not
+ * necessary to explicitly include definitions for Converter and any other standard
JSF classes.
* </p>
*
* @return
Modified:
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/JsfBehaviorRenderer.java
===================================================================
---
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/JsfBehaviorRenderer.java 2011-03-27
13:51:09 UTC (rev 22318)
+++
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/JsfBehaviorRenderer.java 2011-03-27
13:54:37 UTC (rev 22319)
@@ -28,10 +28,14 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
+import javax.faces.component.behavior.ClientBehavior;
+import javax.faces.render.ClientBehaviorRenderer;
+import javax.faces.render.RenderKit;
import javax.faces.render.RenderKitFactory;
/**
- * <p class="changed_added_4_0"></p>
+ * <p class="changed_added_4_0">Defines annotated class as JSF {@link
ClientBehaviorRenderer}, or, if used in the {@link JsfBehavior} annotation,
+ * defines renderer type for {@link ClientBehavior}.</p>
* @author asmirnov(a)exadel.com
*
*/
@@ -39,12 +43,28 @@
@Target(ElementType.TYPE)
public @interface JsfBehaviorRenderer {
+ /**
+ * <p class="changed_added_4_0">ClientBehavior renderer
type.</p>
+ * @return
+ */
public String type() default "";
+ /**
+ * <p class="changed_added_4_0">Defines {@link RenderKit} for which
generated renderer is belong to.</p>
+ * @return
+ */
public String renderKitId() default RenderKitFactory.HTML_BASIC_RENDER_KIT;
+ /**
+ * <p class="changed_added_4_0">Fully qualified class name of the
generated renderer class.</p>
+ * @return
+ */
public String generate() default "";
+ /**
+ * <p class="changed_added_4_0">Renderer description to include into
generated faces-config.xml</p>
+ * @return
+ */
public Description description() default @Description();
}
Modified:
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/JsfComponent.java
===================================================================
---
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/JsfComponent.java 2011-03-27
13:51:09 UTC (rev 22318)
+++
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/JsfComponent.java 2011-03-27
13:54:37 UTC (rev 22319)
@@ -28,15 +28,12 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
-import javax.faces.event.FacesEvent;
/**
* <p class="changed_added_4_0">
* That annotation marks class as JSF component. The difference with JSF 2.0 @
- * {@link javax.faces.component.FacesComponent} annotation is what this one could marks
abstaract class from which a
- * real UI-component implementation will be generated. The value of default {@link
#type()} attribute is taken to be
- * <em>component type</em>. The fully qualified class name becomes a
component class unless that class is abstract or
- * final component class is defined by the {@link #generate()} attribute value.
+ * {@link javax.faces.component.FacesComponent} annotation is what this one could marks
abstract class from which a
+ * real UI-component implementation will be generated.
* </p>
*
* @author asmirnov(a)exadel.com
@@ -47,25 +44,18 @@
/**
* <p class="changed_added_4_0">
- * Annotation class name to use as key for annotation processor class.
+ * Annotation class name to use as key in the annotation processor.
* </p>
*/
public static final String NAME =
"org.richfaces.cdk.annotations.JsfComponent";
- /**
- * <p class="changed_added_4_0">
- * Excplicitly disable component generation
- * </p>
- */
- public static final String DISABLED = "##DISABLED";
/**
* <p class="changed_added_4_0">
- * Type of the component. This is mandatory parameter because CDK uses
<em>component-type</em> as primary key for
- * components library model.
+ * Type of the JSF component.
* </p>
- * <p class="todo">
- * TODO if this value is an empty, component type will be inferred from class name.
+ * <p class="naming">
+ * if this value is an empty, component type would be inferred from class name.
* </p>
*
* @return component type.
@@ -74,7 +64,7 @@
/**
* <p class="changed_added_4_0">
- * Component famili. If this attribute was empty, it is inferred from the
COMPONENT_FAMILY constant or by naming
+ * Component family. For default value, it could be got from the COMPONENT_FAMILY
constant or by inferred naming
* conventions.
* </p>
*
@@ -84,7 +74,8 @@
/**
* <p class="changed_added_4_0">
- * Name of the generated component implementation class.
+ * Name of the generated component implementation class. Default value means nothing
to genrate from concrete class,
+ * or infer name by convention for abstract class.
* </p>
*
* @return
@@ -93,7 +84,7 @@
/**
* <p class="changed_added_4_0">
- * Description used by IDE.
+ * Component description to include into generated faces-config and taglib.
* </p>
*
* @return
@@ -102,7 +93,7 @@
/**
* <p class="changed_added_4_0">
- * Cenerated Junit test.
+ * Junit test description. Isn't used in RichFaces 4.0, reserved for future
releases.
* </p>
*
* @return
@@ -120,7 +111,8 @@
/**
* <p class="changed_added_4_0">
- * View Description Language, JSP or Facelets, tags.
+ * Tag description. If generated tags require special handlers, provide separate
description for every type of tag, JSP and Facelets.
+ * Otherwise, the only one tag tag description with name and type {@link
TagType#All}.
* </p>
*
* @return
@@ -129,7 +121,7 @@
/**
* <p class="changed_added_4_0">
- * Events fired by the component.
+ * @{link FacesEvent}s fired by the component.
* </p>
*
* @return
@@ -147,11 +139,10 @@
/**
* <p class="changed_added_4_0">
- * defines fragments of faces-config.xml that contain standard attribute definitions.
CDK also tries to read
- * META-INF/cdk/attributes/[classname].xml file for all component superclasses and
interfaces, therefore it is not
- * necessary to explicit include definitions for UIComponent and any other standard
JSF classes. CDK defines couple
- * of its own "urn" namespaces: "urn:resource:" for classpath
resources, "urn:config:" for for project configuration
- * folder and "urn:attributes:" for META-INF/cdk/attributes/ in the
annotations library.
+ * Defines file names for fragment of faces-config.xml that contain standard
attribute definitions. All names relative to the
+ * META-INF/cdk/attributes/ folder in classpath. CDK also tries to read
+ * META-INF/cdk/attributes/[classname].xml file for all component superclasses and
interfaces. Therefore, it is not
+ * necessary to explicitly include definitions for UIComponent and any other standard
JSF classes.
* </p>
*
* @return
@@ -160,7 +151,7 @@
/**
* <p class="changed_added_4_0">
- * Interfaces that should be implemented in the generated component class. CDK
processes all {@link Attribute} and
+ * Interfaces that should be implemented by the generated component class. CDK
processes all {@link Attribute} and
* {@link Facet} annotations in these interfaces
* </p>
*
@@ -169,7 +160,9 @@
public Class<?>[] interfaces() default {};
/**
- * <p class="changed_added_4_0"></p>
+ * <p class="changed_added_4_0">Defines third-level renderer specific
components. Used to generate a whole family of similar components.
+ * For example, {@link javax.faces.component.UIComponentBase} provides {@link
javax.faces.component.UICommand} subclass for all command components, and {@link
javax.faces.component.html.HtmlCommandLink} with {@link
javax.faces.component.HtmlCommandButton} are
+ * renderer-specific components for links and buttons.</p>
* @return
*/
public RendererSpecificComponent[] components() default {};
Modified:
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/JsfConverter.java
===================================================================
---
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/JsfConverter.java 2011-03-27
13:51:09 UTC (rev 22318)
+++
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/JsfConverter.java 2011-03-27
13:54:37 UTC (rev 22319)
@@ -28,8 +28,12 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
+import javax.faces.convert.Converter;
+
/**
* <p class="changed_added_4_0">
+ * This annotation defines concrete class as JSF {@link Converter}, or abstract class as
the base for generated
+ * Converter implementation.
* </p>
*
* @author asmirnov(a)exadel.com
@@ -38,47 +42,83 @@
@Target(ElementType.TYPE)
public @interface JsfConverter {
+ /**
+ * <p class="changed_added_4_0">Default value for {@link #forClass}
attribute.</p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+ public static final class NONE {
+ }
+
public static final String NAME =
"org.richfaces.cdk.annotations.JsfConverter";
+ /**
+ * <p class="changed_added_4_0">
+ * The "converter-id" element represents the identifier under which the
corresponding Converter class should be
+ * registered.
+ * </p>
+ *
+ * @return converter-id
+ */
public String id() default "";
+ /**
+ * <p class="changed_added_4_0">
+ * represents the class for which a Converter class will be registered.
+ * </p>
+ *
+ * @return
+ */
public Class<?> forClass() default NONE.class;
-
+ /**
+ * <p class="changed_added_4_0">
+ * fully qualified class name of the generated Converter implementation. Default
value means nothing to genrate from concrete class,
+ * or infer name by convention for abstract class.</p>
+ * @return
+ */
public String generate() default "";
/**
* <p class="changed_added_4_0">
- * Description used by IDE.
+ * Converter description to include into generated faces-config and taglib.
* </p>
*
* @return
*/
public Description description() default @Description();
+ /**
+ * <p class="changed_added_4_0">
+ * Tag description. If generated tags require special handlers, provide separate
description for every type of tag, JSP and Facelets.
+ * Otherwise, the only one tag tag description with name and type {@link
TagType#All}.
+ * </p>
+ *
+ * @return
+ */
public Tag[] tag() default {};
-
- public static final class NONE {}
+
/**
* <p class="changed_added_4_0">
- * defines fragments of faces-config.xml that contain standard attribute definitions.
CDK also tries to read
- * META-INF/cdk/attributes/[classname].xml file for all component superclasses and
interfaces, therefore it is not
- * necessary to explicit include definitions for UIComponent and any other standard
JSF classes. CDK defines couple
- * of its own "urn" namespaces: "urn:resource:" for classpath
resources, "urn:config:" for for project configuration
- * folder and "urn:attributes:" for META-INF/cdk/attributes/ in the
annotations library.
+ * Defines file names for fragment of faces-config.xml that contain standard
attribute definitions. All names relative to the
+ * META-INF/cdk/attributes/ folder in classpath. CDK also tries to read
+ * META-INF/cdk/attributes/[classname].xml file for all component superclasses and
interfaces. Therefore, it is not
+ * necessary to explicitly include definitions for Converter and any other standard
JSF classes.
* </p>
*
* @return
*/
public String[] attributes() default {};
+
/**
* <p class="changed_added_4_0">
- * Interfaces that should be implemented in the generated class. CDK processes all
{@link Attribute} annotations in these interfaces
+ * Interfaces that should be implemented in the generated class. CDK processes all
{@link Attribute} annotations in
+ * these interfaces
* </p>
*
* @return
*/
public Class<?>[] interfaces() default {};
-
+
}
Modified:
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/JsfRenderer.java
===================================================================
---
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/JsfRenderer.java 2011-03-27
13:51:09 UTC (rev 22318)
+++
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/JsfRenderer.java 2011-03-27
13:54:37 UTC (rev 22319)
@@ -32,7 +32,8 @@
/**
* <p class="changed_added_4_0">
- * The presence of this annotation in the JSF component class associated particular
renderer with component.
+ * This annotation defines concrete class as JSF {@link Renderer}, or abstract class as
the base for generated
+ * Renderer implementation.
* </p>
*
* @author asmirnov(a)exadel.com
@@ -46,7 +47,7 @@
/**
* <p class="changed_added_4_0">
* The value of this annotation attribute is taken to be JSF
<em>renderer-type</em>. If this value was empty,
- * component type will be inferred from by the CDK.
+ * type will be inferred by the CDK.
* </p>
*
* @return JSF <em>renderer-type</em>.
@@ -54,26 +55,37 @@
public String type() default "";
/**
- * <p class="changed_added_4_0">Renderer Family</p>
+ * <p class="changed_added_4_0">Component Family for which renderer
from annotated class will be used.</p>
* @return
*/
public String family() default "";
/**
- * <p class="changed_added_4_0">Name of generated renderer
class.</p>
+ * <p class="changed_added_4_0">Name of the generated renderer class.
Default value means nothing to genrate from concrete class,
+ * or infer name by convention for abstract class.</p>
* @return
*/
public String generate() default "";
/**
- * <p class="changed_added_4_0">RenderKit for which this renderer is
belong to</p>
+ * <p class="changed_added_4_0">RenderKit ID for which this renderer
is belong to</p>
* @return
*/
public String renderKitId() default RenderKitFactory.HTML_BASIC_RENDER_KIT;
+ /**
+ * <p class="changed_added_4_0">Path to renderer template, relative
to templates folder defined by build ( Maven plugin or ant task ).</p>
+ * @return
+ */
public String template() default "";
+ /**
+ * <p class="changed_added_4_0">
+ * Description to include into generated faces-config and taglib.
+ * </p>
+ * @return
+ */
public Description description() default @Description();
}
Modified:
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/JsfValidator.java
===================================================================
---
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/JsfValidator.java 2011-03-27
13:51:09 UTC (rev 22318)
+++
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/JsfValidator.java 2011-03-27
13:54:37 UTC (rev 22319)
@@ -5,7 +5,13 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
+import javax.faces.convert.Converter;
+import javax.faces.validator.Validator;
+
/**
+ * This annotation defines concrete class as JSF {@link Validator}, or abstract class as
the base for generated
+ * Validator implementation.
+ *
* @author akolonitsky
* @since Jan 13, 2010
*/
@@ -15,14 +21,36 @@
public static final String NAME =
"org.richfaces.cdk.annotations.JsfValidator";
+ /**
+ * <p class="changed_added_4_0">
+ * The "validator-id" element represents the identifier under which the
corresponding Validator class should be
+ * registered.
+ * </p>
+ *
+ * @return
+ */
public String id();
+ /**
+ * <p class="changed_added_4_0">
+ * fully qualified class name of the generated Converter implementation. Default
value means nothing to genrate from concrete class,
+ * or infer name by convention for abstract class.</p>
+ * @return
+ */
public String generate() default "";
+ /**
+ * <p class="changed_added_4_0">
+ * Tag description. If generated tags require special handlers, provide separate
description for every type of tag, JSP and Facelets.
+ * Otherwise, the only one tag tag description with name and type {@link
TagType#All}.
+ * </p>
+ * @return
+ */
public Tag[] tag() default {};
+
/**
* <p class="changed_added_4_0">
- * Description used by IDE.
+ * Description to include into generated faces-config and taglib.
* </p>
*
* @return
@@ -31,19 +59,20 @@
/**
* <p class="changed_added_4_0">
- * defines fragments of faces-config.xml that contain standard attribute definitions.
CDK also tries to read
- * META-INF/cdk/attributes/[classname].xml file for all component superclasses and
interfaces, therefore it is not
- * necessary to explicit include definitions for UIComponent and any other standard
JSF classes. CDK defines couple
- * of its own "urn" namespaces: "urn:resource:" for classpath
resources, "urn:config:" for for project configuration
- * folder and "urn:attributes:" for META-INF/cdk/attributes/ in the
annotations library.
+ * Defines file names for fragment of faces-config.xml that contain standard
attribute definitions. All names relative to the
+ * META-INF/cdk/attributes/ folder in classpath. CDK also tries to read
+ * META-INF/cdk/attributes/[classname].xml file for all component superclasses and
interfaces. Therefore, it is not
+ * necessary to explicitly include definitions for Converter and any other standard
JSF classes.
* </p>
*
* @return
*/
public String[] attributes() default {};
+
/**
* <p class="changed_added_4_0">
- * Interfaces that should be implemented in the generated class. CDK processes all
{@link Attribute} annotations in these interfaces
+ * Interfaces that should be implemented in the generated class. CDK processes all
{@link Attribute} annotations in
+ * these interfaces
* </p>
*
* @return
Modified:
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/RendererSpecificComponent.java
===================================================================
---
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/RendererSpecificComponent.java 2011-03-27
13:51:09 UTC (rev 22318)
+++
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/RendererSpecificComponent.java 2011-03-27
13:54:37 UTC (rev 22319)
@@ -28,7 +28,7 @@
/**
* <p class="changed_added_4_0">
- * That annotation defines class that is generated from the concrete class defined in
the {@link JsfComponent}
+ * That annotation defines third lvel component, specific for the concrete renderer,
that is generated from the concrete class defined in the {@link JsfComponent}
* </p>
*
* @author asmirnov(a)exadel.com
@@ -40,11 +40,10 @@
/**
* <p class="changed_added_4_0">
- * Type of the component. This is mandatory parameter because CDK uses
<em>component-type</em> as primary key for
- * components library model.
+ * Type of the JSF component.
* </p>
- * <p class="todo">
- * TODO if this value is an empty, component type will be inferred from class name.
+ * <p class="naming">
+ * if this value is an empty, component type would be inferred from class name.
* </p>
*
* @return component type.
@@ -63,7 +62,7 @@
/**
* <p class="changed_added_4_0">
- * Description used by IDE.
+ * Component description to include into generated faces-config and taglib.
* </p>
*
* @return
@@ -72,7 +71,7 @@
/**
* <p class="changed_added_4_0">
- * Cenerated Junit test.
+ * Junit test description. Isn't used in RichFaces 4.0, reserved for future
releases.
* </p>
*
* @return
@@ -90,7 +89,8 @@
/**
* <p class="changed_added_4_0">
- * View Description Language, JSP or Facelets, tags.
+ * Tag description. If generated tags require special handlers, provide separate
description for every type of tag, JSP and Facelets.
+ * Otherwise, the only one tag tag description with name and type {@link
TagType#All}.
* </p>
*
* @return
@@ -109,11 +109,10 @@
/**
* <p class="changed_added_4_0">
- * defines fragments of faces-config.xml that contain standard attribute definitions.
CDK also tries to read
- * META-INF/cdk/attributes/[classname].xml file for all component superclasses and
interfaces, therefore it is not
- * necessary to explicit include definitions for UIComponent and any other standard
JSF classes. CDK defines couple
- * of its own "urn" namespaces: "urn:resource:" for classpath
resources, "urn:config:" for for project configuration
- * folder and "urn:attributes:" for META-INF/cdk/attributes/ in the
annotations library.
+ * Defines file names for fragment of faces-config.xml that contain standard
attribute definitions. All names relative to the
+ * META-INF/cdk/attributes/ folder in classpath. CDK also tries to read
+ * META-INF/cdk/attributes/[classname].xml file for all component superclasses and
interfaces. Therefore, it is not
+ * necessary to explicitly include definitions for UIComponent and any other standard
JSF classes.
* </p>
*
* @return
@@ -122,7 +121,7 @@
/**
* <p class="changed_added_4_0">
- * Interfaces that should be implemented in the generated component class. CDK
processes all {@link Attribute} and
+ * Interfaces that should be implemented by the generated component class. CDK
processes all {@link Attribute} and
* {@link Facet} annotations in these interfaces
* </p>
*
@@ -131,7 +130,7 @@
public Class<?>[] interfaces() default {};
/**
* <p class="changed_added_4_0">
- * Events fired by the component.
+ * @{link FacesEvent}s fired by the component.
* </p>
*
* @return
Modified:
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/Tag.java
===================================================================
---
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/Tag.java 2011-03-27
13:51:09 UTC (rev 22318)
+++
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/Tag.java 2011-03-27
13:54:37 UTC (rev 22319)
@@ -26,8 +26,12 @@
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
+import javax.faces.view.facelets.TagHandler;
+import javax.faces.webapp.UIComponentTagBase;
+
/**
* <p class="changed_added_4_0">
+ * Defines Faces VDL ( Facelets,JSP )tag.
* </p>
*
* @author asmirnov(a)exadel.com
@@ -46,12 +50,30 @@
*/
public String name() default "";
+ /**
+ * <p class="changed_added_4_0">Defines target View Description
Language: JSP, Facelets, or both.</p>
+ * @return
+ */
public TagType type() default TagType.Facelets;
+ /**
+ * <p class="changed_added_4_0">Tag handler class. Fully qualified
class name of the generated or
+ * existing tag handler. For {@link TagType#Jsp} it's {@link JspTag} or, more
likely, {@link UIComponentTagBase} instance.
+ * For facelets, it's {@link TagHandler} instance.</p>
+ * @return
+ */
public String handler() default "";
+ /**
+ * <p class="changed_added_4_0">Base class for generated tag handler.
Default value depends from {@link #type()} attribute value.</p>
+ * @return
+ */
public String baseClass() default "";
+ /**
+ * <p class="changed_added_4_0">Flag indicates that special tag
handler should be generated.</p>
+ * @return
+ */
public boolean generate() default false;
}
Modified:
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/TagLibrary.java
===================================================================
---
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/TagLibrary.java 2011-03-27
13:51:09 UTC (rev 22318)
+++
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/TagLibrary.java 2011-03-27
13:54:37 UTC (rev 22319)
@@ -28,7 +28,9 @@
import java.lang.annotation.Target;
/**
- * This annotation defines taglib for which all tags for JSF components from that
packages belong to
+ * This annotation defines taglib for which all tags for JSF components from that
packages belong to.
+ * Current limitation - there sould be only one taglib package in the project, otherwise
the last processed package will
+ * override others.
*
* @author asmirnov
* @version $Id$
@@ -45,7 +47,7 @@
public String uri();
/**
- * <p class="changed_added_4_0">Library short name ( default prefix
)</p>
+ * <p class="changed_added_4_0">Library short name ( default prefix
). The same same also used for faces-config <name> element.</p>
* @return
*/
public String shortName();
@@ -76,13 +78,13 @@
public Class<?> listenerClass() default NONE.class;
/**
- * <p class="changed_added_4_0">Library description to use by
IDE</p>
+ * <p class="changed_added_4_0">Library description, included into
generated taglib and faces-config.E</p>
* @return
*/
public String displayName() default "";
/**
- * <p class="changed_added_4_0">Java Server Pages version for
generated tld.</p>
+ * <p class="changed_added_4_0">Java Server Pages version for
generated tld, for JSP taglib only.</p>
* @return
*/
public String jspVersion() default "2.0";
Modified:
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/TagType.java
===================================================================
---
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/TagType.java 2011-03-27
13:51:09 UTC (rev 22318)
+++
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/TagType.java 2011-03-27
13:54:37 UTC (rev 22319)
@@ -23,6 +23,7 @@
package org.richfaces.cdk.annotations;
/**
+ * VDL type for {@link Tag} annotation.
* @author akolonitsky
* @since Feb 11, 2010
*/
Modified:
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/package-info.java
===================================================================
---
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/package-info.java 2011-03-27
13:51:09 UTC (rev 22318)
+++
branches/4.0.X/cdk/annotations/src/main/java/org/richfaces/cdk/annotations/package-info.java 2011-03-27
13:54:37 UTC (rev 22319)
@@ -1,32 +1,41 @@
/**
* <h1>Java annotations used by the CDK.</h1>
+ * <h2>Package-level annotations</h2>
+ * <p> {@link org.richfaces.cdk.annotations.TagLibrary} defines library-wide
parameters</p>
* <h2>Class-level annotations:</h2>
- * <p>Mandatory:</p>
- * <p>@{@link JsfComponent}("component.Type") or
@{@link
javax.faces.component.FacesComponent}("component.Type").</p>
- * <p>Optional:</p>
* <ul>
- * <li>@{@link Family}("component.Family") defines component
family used in the generated class.<br /></li>
- * <li>@{@link Generate}("component.UIClass") tells CDK to
generate concrete component class ( base UI... or renderer-specific ).</li>
- * <li>@{@link
Test}(testClass="component.Test",testMethod="testFoo",testType={@link
TestType}.DECODE) tells CDK to generate unit test for that component.</li>
- * <li>@{@link JsfRenderer}("retnderer.Type") , @{@link
RendererTemplate}("/renderer/template.xml") associate renderer with that
component. The first one defines independently created renderer, while @{@link
RendererTemplate tells CDK to generate renderer class from that template. It is possible
to define more than one template with component class using @{@link
RendererTemplates}({@{@link
RendererTemplate}("one.xml"),@{@link
RendererTemplate}("two.xml").<br /></li>
- * <li>@{@link Attributes}({"base.xml","command.xml"})
defines fragments of faces-config.xml which contain standart attributes definitions. CDK
also tries to read META-INF/cdk/attributes/[classname].xml file for all component
superclasses and interfaces, therefore it is not necessary to explicit include definitions
for UIComponent and any other standard JSF classes. CDK defines couple of its own
"urn" namespaces: "urn:resource:" for classpath resources,
"urn:config:" for for project configuration folder and
"urn:attributes:" for META-INF/cdk/attributes/ in the annotations library.<br
/></li>
- * <li>@{@link Fires}({MyEvent.class}) defines event classes that this
component could fire.</li>
- * <li>@{@link Description} , @{@link DisplayName} - optional
IDE-related parameters.<br /></li>
+ * <li>@{@link
org.richfaces.cdk.annotations.JsfComponent}("component.Type") or
@{@link
javax.faces.component.FacesComponent}("component.Type").</li>
+ * <li>@{@link org.richfaces.cdk.annotations.JsfRenderer} Defines JSF
{@link javax.faces.render.Renderer} or link renderer with component.</li>
+ * <li>@{@link org.richfaces.cdk.annotations.JsfConverter} Defines JSF
{@link javax.faces.convert.Converter}.</li>
+ * <li>@{@link org.richfaces.cdk.annotations.JsfValidator} Defines JSF
{@link javax.faces.validator.Validator}.</li>
+ * <li>@{@link org.richfaces.cdk.annotations.JsfBehavior} Defines JSF
{@link javax.faces.component.behavior.ClientBehavior}.</li>
+ * <li>@{@link org.richfaces.cdk.annotations.JsfBehaviorRenderer} Defines
JSF {@link javax.faces.render.ClientBehaviorRenderer} or links renderer with
behavior.</li>
+ * <li>@{@link org.richfaces.cdk.annotations.Event} Defines JSF {@link
javax.faces.event.FacesEvent} or links event with component that fires it.</li>
* </ul>
+ * <h2>Annotations used to refine class top level definitions</h2>
+ * <li>@{@link org.richfaces.cdk.annotations.Test} tells CDK to generate
unit test for component.</li>
+ * <li>@{@link org.richfaces.cdk.annotations.Description} optional
IDE-related parameters.</li>
+ * <li>@{@link org.richfaces.cdk.annotations.Tag} VDL tag
description.</li>
+ * <li>@{@link org.richfaces.cdk.annotations.RendererSpecificComponent}
defines renderer specific component for the family created from one base
component</li>
+ * <li>@{@link org.richfaces.cdk.annotations.Description} optional
IDE-related parameters.<br /></li>
+ * </ul>
* <p> </p>
- * <h2>Attribute level annotations ( for getter or setter level ):</h2>
+ * <h2>Attribute level annotations ( for getter or field level ):</h2>
* <ul>
- * <li>@{@link
Attribute}(literal="false",hidden="false",readOnly="false",passTrough="true")
markes attribute getter/setter.</li>
- * <li>@{@link
Signature}(returnType=boolean.class,parameters={Object.class,String.class}) defines Java
method signature for attributes that holds MethodExpression objects.</li>
- * <li>@{@link Generate} forces CDK to generate attribute getter/setter.
Without that annotation CDK will generate implementation for abstract methods
only.</li>
- * <li>@{@link Alias}({"foo","bar"})</li>
- * <li>@{@link EventName}(value="click",defaultEvent=true)
defines behavior event name for that attribute. To define more than one event name they
could be grouped as @{@link EventNames}({@{@link
EventName}("foo),@{@link EventName}("bar")})</li>
- * <li>@{@link DefaultValue}("12"), @{@link
SuggestedValue}("12") ...</li>
- * <li>@{@link Description} , @{@link DisplayName} - optional
IDE-related parameters.</li>
+ * <li>@{@link org.richfaces.cdk.annotations.Attribute} Defines Faces
attribute, used on for attribute getter method or field.</li>
+ * <li>@{@link org.richfaces.cdk.annotations.Facet} for facet getter.
Also, used in {@link org.richfaces.cdk.annotations.JsfComponent} facets
property.</li>
+ * <li>@{@link org.richfaces.cdk.annotations.Function}, Used for public
static methods to define them as EL-functions.</li>
* </ul>
+ * <h2>Annotations used to refine method-level properties</h2>
+ * <ul>
+ * <li>@{@link Signature} defines Java method signature for attributes
that holds MethodExpression objects.</li>
+ * <li>@{@link Alias} defines alias for attribute.</li>
+ * <li>@{@link EventName}(value="click",defaultEvent=true)
defines behavior event name for that attribute.</li>
+ * <li>@{@link Description} optional IDE-related description.</li>
+ * </ul>
* <p> </p>
* <h3>Facet annotations.</h3>
- * <p>There are two methods to define component facet. At the class level,
developer could use @{@link Facets annotations. It is also possible to define
facet getter/setter methods for facet and mark one of them with @{@link Facet}
annotation.</p>
+ * <p>There are two methods to define component facet. At the class level,
developer could use @{@link org.richfaces.cdk.annotations.JsfComponent#facets()}
property. It is also possible to define facet getter/setter methods for facet and mark one
of them with @{@link Facet} annotation.</p>
*
*
*/
Deleted:
branches/4.0.X/core/api/src/main/java/org/ajax4jsf/javascript/AjaxSubmitFunction.java
===================================================================
---
branches/4.0.X/core/api/src/main/java/org/ajax4jsf/javascript/AjaxSubmitFunction.java 2011-03-27
13:51:09 UTC (rev 22318)
+++
branches/4.0.X/core/api/src/main/java/org/ajax4jsf/javascript/AjaxSubmitFunction.java 2011-03-27
13:54:37 UTC (rev 22319)
@@ -1,100 +0,0 @@
-/**
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library 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 library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-
-
-package org.ajax4jsf.javascript;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.faces.component.UIComponent;
-
-/**
- * @author shura
- *
- */
-public class AjaxSubmitFunction extends JSFunction {
-
- /**
- * Name Javasript function for submit AJAX request
- */
- public static final String AJAX_FUNCTION_NAME = "A4J.AJAX.Submit";
-
- // private static Log log = LogFactory.getLog(AjaxSubmitFunction.class);
- public static final String AJAX_REGIONS_ATTRIBUTE = "reRender";
-
- /**
- * Attribute to keep
- */
- public static final String LIMITRENDER_ATTR_NAME = "limitRender";
-
- /**
- * Attribute for keep JavaScript funtion name for call after complete
- * request.
- */
- public static final String ONCOMPLETE_ATTR_NAME = "oncomplete";
-
- /**
- * Attribute for keep clientId of status component
- */
- public static final String STATUS_ATTR_NAME = "status";
- private Map<String, Object> options = new HashMap<String, Object>();
- private Map<String, String> requestParameters = new HashMap<String,
String>();
-
- // private static final Class<?> OBJECT_ARRAY_CLASS = (new
Object[0]).getClass();
- private UIComponent component;
-
- /**
- *
- */
- public AjaxSubmitFunction(UIComponent component) {
- this(component, AJAX_FUNCTION_NAME);
- }
-
- /**
- * @param name
- */
- public AjaxSubmitFunction(UIComponent component, String name) {
- super(name);
- this.component = component;
-
- // Fill parameters and options values.
- }
-
- /**
- * @return the options
- */
- public Map<String, Object> getOptions() {
- return this.options;
- }
-
- /**
- * @return the requestParameters
- */
- public Map<String, String> getRequestParameters() {
- return this.requestParameters;
- }
-
- public UIComponent getComponent() {
- return component;
- }
-}
Deleted: branches/4.0.X/core/api/src/main/java/org/ajax4jsf/javascript/JSBind.java
===================================================================
--- branches/4.0.X/core/api/src/main/java/org/ajax4jsf/javascript/JSBind.java 2011-03-27
13:51:09 UTC (rev 22318)
+++ branches/4.0.X/core/api/src/main/java/org/ajax4jsf/javascript/JSBind.java 2011-03-27
13:54:37 UTC (rev 22319)
@@ -1,67 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library 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 library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-
-
-package org.ajax4jsf.javascript;
-
-import java.io.IOException;
-
-/**
- * Created 04.08.2008
- * @author Nick Belaevski
- * @since 3.2.2
- */
-public class JSBind extends ScriptStringBase {
- private JSFunction function;
- private String[] vars;
-
- public JSBind(JSFunction function, String... vars) {
- super();
- this.function = function;
- this.vars = vars;
- }
-
- public void appendScript(Appendable target) throws IOException {
- target.append("function () {");
- target.append("var vars = {");
-
- boolean isFirst = true;
-
- for (String var : vars) {
- if (isFirst) {
- isFirst = false;
- } else {
- target.append(',');
- }
-
- target.append(var);
- target.append(':');
- target.append(var);
- }
-
- target.append("};");
- target.append("return function() { with (vars) {");
- target.append(function.toScript());
- target.append("}}}()");
- }
-
-}
Added: branches/4.0.X/core/api/src/main/java/org/richfaces/application/Initializable.java
===================================================================
--- branches/4.0.X/core/api/src/main/java/org/richfaces/application/Initializable.java
(rev 0)
+++
branches/4.0.X/core/api/src/main/java/org/richfaces/application/Initializable.java 2011-03-27
13:54:37 UTC (rev 22319)
@@ -0,0 +1,15 @@
+package org.richfaces.application;
+
+
+/**
+ * <p class="changed_added_4_0">Classes that require initialization and
release methods should implement this interface</p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public interface Initializable {
+
+ public void init();
+
+ public void release();
+
+}
\ No newline at end of file
Modified: branches/4.0.X/core/api/src/main/java/org/richfaces/application/Module.java
===================================================================
--- branches/4.0.X/core/api/src/main/java/org/richfaces/application/Module.java 2011-03-27
13:51:09 UTC (rev 22318)
+++ branches/4.0.X/core/api/src/main/java/org/richfaces/application/Module.java 2011-03-27
13:54:37 UTC (rev 22319)
@@ -2,12 +2,16 @@
/**
- * <p class="changed_added_4_0">User-provided configuration
module.</p>
+ * <p class="changed_added_4_0">{@link ServicesFactory} configuration
module.</p>
* @author asmirnov(a)exadel.com
*
*/
public interface Module {
+ /**
+ * <p class="changed_added_4_0">This method called from
Initialization event listener. User can register their services there to override/extend
base functionality.</p>
+ * @param factory
+ */
public void configure(ServicesFactory factory);
}
Modified:
branches/4.0.X/core/api/src/main/java/org/richfaces/application/ServiceException.java
===================================================================
---
branches/4.0.X/core/api/src/main/java/org/richfaces/application/ServiceException.java 2011-03-27
13:51:09 UTC (rev 22318)
+++
branches/4.0.X/core/api/src/main/java/org/richfaces/application/ServiceException.java 2011-03-27
13:54:37 UTC (rev 22319)
@@ -26,7 +26,7 @@
import javax.faces.FacesException;
/**
- * <p class="changed_added_4_0"></p>
+ * <p class="changed_added_4_0">Exception fired by service tracker if it
cannot create requested service.</p>
* @author asmirnov(a)exadel.com
*
*/
Modified:
branches/4.0.X/core/api/src/main/java/org/richfaces/application/ServiceTracker.java
===================================================================
---
branches/4.0.X/core/api/src/main/java/org/richfaces/application/ServiceTracker.java 2011-03-27
13:51:09 UTC (rev 22318)
+++
branches/4.0.X/core/api/src/main/java/org/richfaces/application/ServiceTracker.java 2011-03-27
13:54:37 UTC (rev 22319)
@@ -31,10 +31,11 @@
* <p>Tracker class to provide access to various framework implementation
services.
* Examples of such services are: {@link org.richfaces.skin.SkinFactory}, TBD.</p>
*
- * <p>Supports JSR-330 dependency injection.</p>
*
- * <p>This class represents application-scoped object that is stored in the map
with {@link Thread#currentThread()} Context classloader. Therefore, there is
- * only one instance perr JEE application in the current JVM.</p>
+ * <p>This class managess application-scoped service factories that are stored in
the map with {@link Thread#currentThread()} Context classloader as the key. Therefore,
there is
+ * only one instance per JEE application in the current JVM.</p>
+ * <p> actuall cal for the service instance delegated to the current
factory</p>
+ * <img src="services.png" alt="services tracking class
diagramm"/>
*
*
* <p><b>Note:</b> in initial state this class is not synchronized and
presumes that all
@@ -54,14 +55,31 @@
private static final Map<ClassLoader, ServicesFactory> INSTANCES =
new ConcurrentHashMap<ClassLoader, ServicesFactory>();
+ /**
+ * <p class="changed_added_4_0">This class supposed to use with
static methods only and cannot be instantiated.</p>
+ */
private ServiceTracker() {
}
+ /**
+ * <p class="changed_added_4_0">Get service instance for given type.
This is a wrapper method for {@link #getService(FacesContext, Class)} that
+ * gets faces context by {@link FacesContext#getCurrentInstance()} call, if
needed.</p>
+ * @param <T> The service type, usually interface.
+ * @param target Service type class.
+ * @return service implementation instance.
+ */
public static <T> T getService(Class<T> target) {
return getServicesFactory().getInstance(target);
}
+ /**
+ * <p class="changed_added_4_0">Get service instance for given
type.</p>
+ * @param <T> The service type, usually interface.
+ * @param context current {@link FacesContext}.
+ * @param target Service type class.
+ * @return service instance.
+ */
public static <T> T getService(FacesContext context, Class<T> target) {
return getServicesFactory().getInstance(target);
}
@@ -85,7 +103,7 @@
}
/**
- * <p class="changed_added_4_0">Set dependency injection service
implementation.</p>
+ * <p class="changed_added_4_0">Set service factory implementation
for the current context.</p>
* @param factory
*/
public static void setFactory(ServicesFactory factory) {
@@ -93,7 +111,7 @@
}
/**
- * <p class="changed_added_4_0">Remove dependency injection service
associated with current context.</p>
+ * <p class="changed_added_4_0">Release factory service associated
with current context.</p>
*/
public static void release() {
ServicesFactory servicesFactory = INSTANCES.remove(getCurrentLoader());
Modified:
branches/4.0.X/core/api/src/main/java/org/richfaces/application/ServicesFactory.java
===================================================================
---
branches/4.0.X/core/api/src/main/java/org/richfaces/application/ServicesFactory.java 2011-03-27
13:51:09 UTC (rev 22318)
+++
branches/4.0.X/core/api/src/main/java/org/richfaces/application/ServicesFactory.java 2011-03-27
13:54:37 UTC (rev 22319)
@@ -30,10 +30,26 @@
*/
public interface ServicesFactory {
+ /**
+ * <p class="changed_added_4_0">Get service instance associated with
given type, usually service interface or base abstract class.</p>
+ * @param <T> service type.
+ * @param type Base class implemented by service.
+ * @return Current service implementation.
+ * @throws ServiceException if factory cannot create requested service.
+ */
public <T> T getInstance(Class<T> type) throws ServiceException;
+ /**
+ * <p class="changed_added_4_0">Associate concrete instance with
service.</p>
+ * @param <T> service type.
+ * @param type Base class implemented by service.
+ * @param instance service instance.
+ */
public <T> void setInstance(Class<T> type, T instance);
+ /**
+ * <p class="changed_added_4_0">Release all services. </p>
+ */
public void release();
}
Modified: branches/4.0.X/core/api/src/main/java/org/richfaces/cache/CacheFactory.java
===================================================================
--- branches/4.0.X/core/api/src/main/java/org/richfaces/cache/CacheFactory.java 2011-03-27
13:51:09 UTC (rev 22318)
+++ branches/4.0.X/core/api/src/main/java/org/richfaces/cache/CacheFactory.java 2011-03-27
13:54:37 UTC (rev 22319)
@@ -35,11 +35,13 @@
public interface CacheFactory {
/**
- * Creates a new implementation specific Cache object using the env parameters.
- * @param facesContext
- * @param cacheName
- * @param env
+ * creates a new implementation specific Cache object using the env parameters.
+ * @param env implementation specific environment parameters passed to the
+ * CacheFactory.
+ * @param cacheLoader implementation of the {@link CacheLoader} to use
+ * @param cacheConfigurationloader TODO
* @return an implementation specific Cache object.
+ * @throws CacheException if any error occurs.
*/
public Cache createCache(FacesContext facesContext, String cacheName, Map<?, ?>
env);
Deleted:
branches/4.0.X/core/api/src/main/java/org/richfaces/component/TemplateComponent.java
===================================================================
---
branches/4.0.X/core/api/src/main/java/org/richfaces/component/TemplateComponent.java 2011-03-27
13:51:09 UTC (rev 22318)
+++
branches/4.0.X/core/api/src/main/java/org/richfaces/component/TemplateComponent.java 2011-03-27
13:54:37 UTC (rev 22319)
@@ -1,38 +0,0 @@
-/**
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library 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 library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-
-
-package org.richfaces.component;
-
-/**
- * @author Nick Belaevski
- * mailto:nbelaevski@exadel.com
- * created 10.08.2007
- *
- */
-public interface TemplateComponent {
- public static final String TEMPLATE_CLIENT_ID = "{componentId}";
-
- public void startTemplateEncode();
-
- public void endTemplateEncode();
-}
Deleted: branches/4.0.X/core/api/src/main/java/org/richfaces/skin/SkinConfiguration.java
===================================================================
---
branches/4.0.X/core/api/src/main/java/org/richfaces/skin/SkinConfiguration.java 2011-03-27
13:51:09 UTC (rev 22318)
+++
branches/4.0.X/core/api/src/main/java/org/richfaces/skin/SkinConfiguration.java 2011-03-27
13:54:37 UTC (rev 22319)
@@ -1,72 +0,0 @@
-/**
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library 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 library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-
-
-package org.richfaces.skin;
-
-import javax.faces.context.FacesContext;
-
-/**
- * Fine tuning parameters for components configuration.
- * For any skin, calculation of concrete component parameners done by special
"configuration",
- * pointed as special skin parameter ( or by default configuration ).
- * Work like "transformation" of limited set Skin parameters to fine-grained
individual component
- * parameters.
- * @author shura
- *
- */
-public interface SkinConfiguration {
-
- /**
- * Get value for configuration parameter. If parameter set as EL-expression,
- * calculate it value.
- *
- * @param context -
- * {@link FacesContext } for current request.
- * @param name
- * name of paremeter.
- * @return value of parameter in config, or null
- */
- public Object getParameter(FacesContext context, String name);
-
- /**
- * Get value for skin parameter, for build extensible ( mandatory/fine tuning ) with
three-stage checks :
- * <ul>
- * <li>first, check value for parameter with given name. If value not null,
return it</li>
- * <li>second, got parameter value from skin by skinName key. If not null,
return it.</li>
- * <li>if both above parameters is null, return default value.</li>
- * </ul>
- * @param context - Current JSF context.
- * @param name - name of parameter.
- * @param skinName - name of according ( default ) parameter i Skin for same purpose.
may be <code>null</code>.
- * @param defaultValue - default parameter value.
- * @return - value of parameter.
- */
- public Object getParameter(FacesContext context, String name, String skinName, Object
defaultValue);
-
- /**
- * Test for present parameter for given name.
- * @param name of parameter to test
- * @return true if parameter present in configuration.
- */
- public boolean containsParameter(String name);
-}
Added: branches/4.0.X/core/api/src/main/javadoc/org/richfaces/application/services.png
===================================================================
(Binary files differ)
Property changes on:
branches/4.0.X/core/api/src/main/javadoc/org/richfaces/application/services.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/4.0.X/core/api/src/main/javadoc/org/richfaces/application/services.uxf
===================================================================
--- branches/4.0.X/core/api/src/main/javadoc/org/richfaces/application/services.uxf
(rev 0)
+++
branches/4.0.X/core/api/src/main/javadoc/org/richfaces/application/services.uxf 2011-03-27
13:54:37 UTC (rev 22319)
@@ -0,0 +1,158 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
+<diagram program="umlet" version="11.1">
+ <zoom_level>10</zoom_level>
+ <element>
+ <type>com.umlet.element.Class</type>
+ <coordinates>
+ <x>80</x>
+ <y>50</y>
+ <w>210</w>
+ <h>190</h>
+ </coordinates>
+ <panel_attributes><<Factory>>
+ServiceTracker
+{static methods only}
+--
+-servicesFactory: ServicesFactory
+--
+#getService(t: Class<T>): T
+</panel_attributes>
+ <additional_attributes/>
+ </element>
+ <element>
+ <type>com.umlet.element.Class</type>
+ <coordinates>
+ <x>460</x>
+ <y>100</y>
+ <w>190</w>
+ <h>50</h>
+ </coordinates>
+ <panel_attributes>/ServicesFactory/
+--
+#getService(t: Class<T>): T</panel_attributes>
+ <additional_attributes/>
+ </element>
+ <element>
+ <type>com.umlet.element.Relation</type>
+ <coordinates>
+ <x>260</x>
+ <y>80</y>
+ <w>220</w>
+ <h>50</h>
+ </coordinates>
+ <panel_attributes>lt=<<<-</panel_attributes>
+ <additional_attributes>30;30;200;30</additional_attributes>
+ </element>
+ <element>
+ <type>com.umlet.element.Relation</type>
+ <coordinates>
+ <x>420</x>
+ <y>120</y>
+ <w>172</w>
+ <h>160</h>
+ </coordinates>
+ <panel_attributes>lt=<.
+<<instanceOf>></panel_attributes>
+ <additional_attributes>90;30;90;140</additional_attributes>
+ </element>
+ <element>
+ <type>com.umlet.element.Class</type>
+ <coordinates>
+ <x>410</x>
+ <y>260</y>
+ <w>340</w>
+ <h>70</h>
+ </coordinates>
+ <panel_attributes>_concreteFactory: ServicesFactoryImpl_
+--
+</panel_attributes>
+ <additional_attributes/>
+ </element>
+ <element>
+ <type>com.umlet.element.Class</type>
+ <coordinates>
+ <x>90</x>
+ <y>310</y>
+ <w>200</w>
+ <h>90</h>
+ </coordinates>
+ <panel_attributes><<InitializationListener>>
+FacesInitListener</panel_attributes>
+ <additional_attributes/>
+ </element>
+ <element>
+ <type>com.umlet.element.Class</type>
+ <coordinates>
+ <x>430</x>
+ <y>410</y>
+ <w>240</w>
+ <h>60</h>
+ </coordinates>
+ <panel_attributes>/Module/
+--
+#init(f:ServicesFactory)
+</panel_attributes>
+ <additional_attributes/>
+ </element>
+ <element>
+ <type>com.umlet.element.Class</type>
+ <coordinates>
+ <x>470</x>
+ <y>540</y>
+ <w>100</w>
+ <h>30</h>
+ </coordinates>
+ <panel_attributes>UserModule
+--</panel_attributes>
+ <additional_attributes/>
+ </element>
+ <element>
+ <type>com.umlet.element.Relation</type>
+ <coordinates>
+ <x>440</x>
+ <y>440</y>
+ <w>172</w>
+ <h>120</h>
+ </coordinates>
+ <panel_attributes>lt=<.
+<<instanceOf>></panel_attributes>
+ <additional_attributes>90;30;90;100</additional_attributes>
+ </element>
+ <element>
+ <type>com.umlet.element.Relation</type>
+ <coordinates>
+ <x>260</x>
+ <y>270</y>
+ <w>170</w>
+ <h>110</h>
+ </coordinates>
+ <panel_attributes>lt=<.
+creates</panel_attributes>
+ <additional_attributes>150;30;30;90</additional_attributes>
+ </element>
+ <element>
+ <type>com.umlet.element.Relation</type>
+ <coordinates>
+ <x>100</x>
+ <y>210</y>
+ <w>154</w>
+ <h>120</h>
+ </coordinates>
+ <panel_attributes>lt=<.
+setFactory
+releaseFacroty</panel_attributes>
+ <additional_attributes>80;30;90;100</additional_attributes>
+ </element>
+ <element>
+ <type>com.umlet.element.Relation</type>
+ <coordinates>
+ <x>260</x>
+ <y>330</y>
+ <w>190</w>
+ <h>130</h>
+ </coordinates>
+ <panel_attributes>lt=<.
+init</panel_attributes>
+ <additional_attributes>170;110;30;30</additional_attributes>
+ </element>
+</diagram>
Deleted: branches/4.0.X/core/impl/src/main/java/org/ajax4jsf/package-info.java
===================================================================
--- branches/4.0.X/core/impl/src/main/java/org/ajax4jsf/package-info.java 2011-03-27
13:51:09 UTC (rev 22318)
+++ branches/4.0.X/core/impl/src/main/java/org/ajax4jsf/package-info.java 2011-03-27
13:54:37 UTC (rev 22319)
@@ -1,4 +0,0 @@
-/**
- * Base package for AJAX classes
- */
-package org.ajax4jsf;
Deleted:
branches/4.0.X/core/impl/src/main/java/org/richfaces/application/Initializable.java
===================================================================
---
branches/4.0.X/core/impl/src/main/java/org/richfaces/application/Initializable.java 2011-03-27
13:51:09 UTC (rev 22318)
+++
branches/4.0.X/core/impl/src/main/java/org/richfaces/application/Initializable.java 2011-03-27
13:54:37 UTC (rev 22319)
@@ -1,15 +0,0 @@
-package org.richfaces.application;
-
-
-/**
- * <p class="changed_added_4_0">Classes that require initialization
should implement this interface</p>
- * @author asmirnov(a)exadel.com
- *
- */
-public interface Initializable {
-
- public void init();
-
- public void release();
-
-}
\ No newline at end of file
Deleted:
branches/4.0.X/core/impl/src/main/java/org/richfaces/context/AttributesContext.java
===================================================================
---
branches/4.0.X/core/impl/src/main/java/org/richfaces/context/AttributesContext.java 2011-03-27
13:51:09 UTC (rev 22318)
+++
branches/4.0.X/core/impl/src/main/java/org/richfaces/context/AttributesContext.java 2011-03-27
13:54:37 UTC (rev 22319)
@@ -1,20 +0,0 @@
-package org.richfaces.context;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public class AttributesContext {
- private Map<String, Object> attributesMap = new HashMap<String,
Object>();
-
- public Object getAttribute(String name) {
- return attributesMap.get(name);
- }
-
- public Object setAttribute(String name, Object value) {
- if (value != null) {
- return attributesMap.put(name, value);
- } else {
- return attributesMap.remove(name);
- }
- }
-}
Deleted:
branches/4.0.X/core/impl/src/main/java/org/richfaces/renderkit/AttributeParametersEncoder.java
===================================================================
---
branches/4.0.X/core/impl/src/main/java/org/richfaces/renderkit/AttributeParametersEncoder.java 2011-03-27
13:51:09 UTC (rev 22318)
+++
branches/4.0.X/core/impl/src/main/java/org/richfaces/renderkit/AttributeParametersEncoder.java 2011-03-27
13:54:37 UTC (rev 22319)
@@ -1,34 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library 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 library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit;
-
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-import java.io.IOException;
-
-/**
- * @author Nick Belaevski - nbelaevski(a)exadel.com
- * created 30.01.2007
- */
-public interface AttributeParametersEncoder {
- public void doEncode(FacesContext context, UIComponent component) throws
IOException;
-}
Deleted: branches/4.0.X/core/impl/src/main/java/org/richfaces/renderkit/Expression.java
===================================================================
---
branches/4.0.X/core/impl/src/main/java/org/richfaces/renderkit/Expression.java 2011-03-27
13:51:09 UTC (rev 22318)
+++
branches/4.0.X/core/impl/src/main/java/org/richfaces/renderkit/Expression.java 2011-03-27
13:54:37 UTC (rev 22319)
@@ -1,78 +0,0 @@
-/**
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library 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 library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit;
-
-/**
- * @author Nick Belaevski - mailto:nbelaevski@exadel.com
- * created 20.06.2007
- */
-public class Expression {
- private Object expression;
-
- public Expression(Object expression) {
- super();
- this.expression = expression;
- }
-
- public Object getExpression() {
- return expression;
- }
-
- public String toString() {
- return super.toString() + "[" + expression + "]";
- }
-
- public int hashCode() {
- final int prime = 31;
- int result = 1;
-
- result = prime * result + ((expression == null) ? 0 : expression.hashCode());
-
- return result;
- }
-
- public boolean equals(Object obj) {
- if (this == obj) {
- return true;
- }
-
- if (obj == null) {
- return false;
- }
-
- if (getClass() != obj.getClass()) {
- return false;
- }
-
- final Expression other = (Expression) obj;
-
- if (expression == null) {
- if (other.expression != null) {
- return false;
- }
- } else if (!expression.equals(other.expression)) {
- return false;
- }
-
- return true;
- }
-}
Deleted:
branches/4.0.X/core/impl/src/main/java/org/richfaces/renderkit/ScriptOptions.java
===================================================================
---
branches/4.0.X/core/impl/src/main/java/org/richfaces/renderkit/ScriptOptions.java 2011-03-27
13:51:09 UTC (rev 22318)
+++
branches/4.0.X/core/impl/src/main/java/org/richfaces/renderkit/ScriptOptions.java 2011-03-27
13:54:37 UTC (rev 22319)
@@ -1,109 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library 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 library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import javax.faces.component.UIComponent;
-
-import org.ajax4jsf.javascript.JSFunctionDefinition;
-import org.ajax4jsf.javascript.ScriptStringBase;
-import org.ajax4jsf.javascript.ScriptUtils;
-
-/**
- * @author Maksim Kaszynski
- */
-public class ScriptOptions extends ScriptStringBase {
- protected Map<String, Object> opts = new HashMap<String, Object>();
- private UIComponent component;
-
- public ScriptOptions(UIComponent component) {
- this.component = component;
- }
-
- public void appendScript(Appendable target) throws IOException {
- ScriptUtils.appendScript(target, opts);
- }
-
- public void addOption(String name) {
- if (name != null) {
- Object value = component.getAttributes().get(name);
-
- addOption(name, value);
- }
- }
-
- @SuppressWarnings("unchecked")
- public void addOption(String name, Object value) {
- if (value != null) {
- Object object = opts.get(name);
-
- if ((object instanceof Map) && (value instanceof Map)) {
- ((Map) object).putAll((Map) value);
- } else {
- opts.put(name, value);
- }
- }
- }
-
- public void addEventHandler(String event, String handler) {
- if ((event != null) && (handler != null)) {
- JSFunctionDefinition functionDefinition = new
JSFunctionDefinition("event");
-
- functionDefinition.addToBody(handler);
- functionDefinition.addToBody(";return true;");
- addEventHandler(event, functionDefinition);
- }
- }
-
- public void addEventHandler(String event) {
- if (event != null) {
- String handler = (String) component.getAttributes().get(event);
-
- addEventHandler(event, handler);
- }
- }
-
- public void addEventHandler(String event, JSFunctionDefinition definition) {
- if ((event != null) && (definition != null)) {
- opts.put(event, definition);
- }
- }
-
- public Map<String, Object> getMap() {
- return opts;
- }
-
- public void merge(ScriptOptions anotherOptions) {
- Iterator<Entry<String, Object>> entrySetIterator =
anotherOptions.opts.entrySet().iterator();
-
- while (entrySetIterator.hasNext()) {
- Entry<String, Object> entry = entrySetIterator.next();
-
- addOption(entry.getKey(), entry.getValue());
- }
- }
-}
Deleted:
branches/4.0.X/core/impl/src/main/java/org/richfaces/renderkit/ScriptOptionsContributor.java
===================================================================
---
branches/4.0.X/core/impl/src/main/java/org/richfaces/renderkit/ScriptOptionsContributor.java 2011-03-27
13:51:09 UTC (rev 22318)
+++
branches/4.0.X/core/impl/src/main/java/org/richfaces/renderkit/ScriptOptionsContributor.java 2011-03-27
13:54:37 UTC (rev 22319)
@@ -1,41 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library 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 library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit;
-
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-
-/**
- * @author Nick Belaevski - nbelaevski(a)exadel.com
- * created 18.12.2006
- */
-public interface ScriptOptionsContributor {
-
- /**
- * Create script options if component class is known for renderer to contribute
- *
- * @param context
- * @param component
- * @return Built {@link ScriptOptions} instance or null if component is not
acceptable
- */
- public ScriptOptions buildOptions(FacesContext context, UIComponent component);
-}
Deleted:
branches/4.0.X/core/impl/src/main/java/org/richfaces/skin/DummySkinConfiguration.java
===================================================================
---
branches/4.0.X/core/impl/src/main/java/org/richfaces/skin/DummySkinConfiguration.java 2011-03-27
13:51:09 UTC (rev 22318)
+++
branches/4.0.X/core/impl/src/main/java/org/richfaces/skin/DummySkinConfiguration.java 2011-03-27
13:54:37 UTC (rev 22319)
@@ -1,69 +0,0 @@
-/**
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library 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 library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.skin;
-
-import javax.faces.context.FacesContext;
-
-/**
- * @author shura
- */
-public class DummySkinConfiguration implements SkinConfiguration {
- private Skin skin;
-
- /**
- * @param skin
- */
- public DummySkinConfiguration(Skin skin) {
- super();
- this.skin = skin;
- }
-
- /*
- * (non-Javadoc)
- * @see org.richfaces.skin.SkinConfiguration#containsParameter(java.lang.String)
- */
- public boolean containsParameter(String name) {
- return skin.containsProperty(name);
- }
-
- /*
- * (non-Javadoc)
- * @see
org.richfaces.skin.SkinConfiguration#getParameter(javax.faces.context.FacesContext,
java.lang.String)
- */
- public Object getParameter(FacesContext context, String name) {
- return skin.getParameter(context, name);
- }
-
- /*
- * (non-Javadoc)
- * @see
org.richfaces.skin.SkinConfiguration#getParameter(javax.faces.context.FacesContext,
String, String, Object)
- */
- public Object getParameter(FacesContext context, String name, String skinName, Object
defaultValue) {
- Object parameter = skin.getParameter(context, name);
-
- if (null == parameter) {
- parameter = defaultValue;
- }
-
- return parameter;
- }
-}