JBoss Rich Faces SVN: r17186 - root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-05-21 13:07:31 -0400 (Fri, 21 May 2010)
New Revision: 17186
Modified:
root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/renderkit/ExtendedDataTableRenderer.java
Log:
TBOBY -> TBODY
Modified: root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
===================================================================
--- root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2010-05-21 17:07:13 UTC (rev 17185)
+++ root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2010-05-21 17:07:31 UTC (rev 17186)
@@ -134,7 +134,7 @@
public void encodeTableEnd(ResponseWriter writer, FacesContext context, UIDataTableBase component) throws IOException {
//encode DataTable client script
- writer.startElement(HTML.TBOBY_ELEMENT, component);
+ writer.startElement(HTML.TBODY_ELEMENT, component);
writer.writeAttribute(HTML.STYLE_ATTRIBUTE, "display: none", null);
writer.startElement(HTML.TR_ELEMENT, component);
@@ -144,7 +144,7 @@
writer.endElement(HTML.TD_ELEM);
writer.endElement(HTML.TR_ELEMENT);
- writer.endElement(HTML.TBOBY_ELEMENT);
+ writer.endElement(HTML.TBODY_ELEMENT);
writer.endElement(HTML.TABLE_ELEMENT);
@@ -155,7 +155,7 @@
public void encodeTableBodyStart(ResponseWriter writer, FacesContext context, UIDataTableBase dataTable)
throws IOException {
- writer.startElement(HTML.TBOBY_ELEMENT, dataTable);
+ writer.startElement(HTML.TBODY_ELEMENT, dataTable);
getUtils().encodeId(context, dataTable);
String predefinedStyles = null;
@@ -171,7 +171,7 @@
}
public void encodeTableBodyEnd(ResponseWriter writer, FacesContext context, UIDataTableBase component) throws IOException {
- writer.endElement(HTML.TBOBY_ELEMENT);
+ writer.endElement(HTML.TBODY_ELEMENT);
}
public abstract RowHolderBase createRowHolder(FacesContext context, UIComponent component);
Modified: root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/renderkit/ExtendedDataTableRenderer.java
===================================================================
--- root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/renderkit/ExtendedDataTableRenderer.java 2010-05-21 17:07:13 UTC (rev 17185)
+++ root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/renderkit/ExtendedDataTableRenderer.java 2010-05-21 17:07:31 UTC (rev 17186)
@@ -257,7 +257,7 @@
writer.startElement(HTML.TABLE_ELEMENT, table);
writer.writeAttribute(HTML.CELLPADDING_ATTRIBUTE, "0", null);
writer.writeAttribute(HTML.CELLSPACING_ATTRIBUTE, "0", null);
- writer.startElement(HTML.TBOBY_ELEMENT, table);
+ writer.startElement(HTML.TBODY_ELEMENT, table);
writer.startElement(HTML.TR_ELEMENT, table);
for (state.startIterate(); state.hasNextPart();) {
Part part = state.nextPart();
@@ -288,7 +288,7 @@
writer.writeAttribute(HTML.ID_ATTRIBUTE, tableId, null);
writer.writeAttribute(HTML.CELLPADDING_ATTRIBUTE, "0", null);
writer.writeAttribute(HTML.CELLSPACING_ATTRIBUTE, "0", null);
- writer.startElement(HTML.TBOBY_ELEMENT, table);
+ writer.startElement(HTML.TBODY_ELEMENT, table);
writer.startElement(HTML.TR_ELEMENT, table);
while (columns.hasNext()) {
if(columnFacetPresent) {
@@ -298,7 +298,7 @@
}
}
writer.endElement(HTML.TR_ELEMENT);
- writer.endElement(HTML.TBOBY_ELEMENT);
+ writer.endElement(HTML.TBODY_ELEMENT);
writer.endElement(HTML.TABLE_ELEMENT);
encoderVariance.encodeEndUpdate(context);
@@ -308,7 +308,6 @@
}
}
writer.endElement(HTML.TR_ELEMENT);
- writer.endElement(HTML.TBOBY_ELEMENT);
writer.endElement(HTML.TABLE_ELEMENT);
writer.endElement(HTML.DIV_ELEM);
}
@@ -387,7 +386,6 @@
writer.startElement(HTML.TABLE_ELEMENT, table);
writer.writeAttribute(HTML.CELLPADDING_ATTRIBUTE, "0", null);
writer.writeAttribute(HTML.CELLSPACING_ATTRIBUTE, "0", null);
- writer.startElement(HTML.TBOBY_ELEMENT, table);
writer.startElement(HTML.TR_ELEMENT, table);
for (state.startIterate(); state.hasNextPart();) {
writer.startElement(HTML.TD_ELEM, table);
@@ -407,11 +405,11 @@
writer.writeAttribute(HTML.ID_ATTRIBUTE, targetId, null);
writer.writeAttribute(HTML.CELLPADDING_ATTRIBUTE, "0", null);
writer.writeAttribute(HTML.CELLSPACING_ATTRIBUTE, "0", null);
- writer.startElement(HTML.TBOBY_ELEMENT, table);
+ writer.startElement(HTML.TBODY_ELEMENT, table);
writer.writeAttribute(HTML.ID_ATTRIBUTE, table.getClientId(context) + ":tb"
+ partName.toString().charAt(0), null);
encodeRows(state);
- writer.endElement(HTML.TBOBY_ELEMENT);
+ writer.endElement(HTML.TBODY_ELEMENT);
writer.endElement(HTML.TABLE_ELEMENT);
encoderVariance.encodeEndUpdate(context);
@@ -420,7 +418,7 @@
writer.endElement(HTML.TD_ELEM);
}
writer.endElement(HTML.TR_ELEMENT);
- writer.endElement(HTML.TBOBY_ELEMENT);
+ writer.endElement(HTML.TBODY_ELEMENT);
writer.endElement(HTML.TABLE_ELEMENT);
writer.endElement(HTML.DIV_ELEM);
@@ -612,7 +610,6 @@
writer.writeAttribute(HTML.CLASS_ATTRIBUTE, "rich-extable-reorder", null);
writer.writeAttribute(HTML.CELLPADDING_ATTRIBUTE, "0", null);
writer.writeAttribute(HTML.CELLSPACING_ATTRIBUTE, "0", null);
- writer.startElement(HTML.TBOBY_ELEMENT, component);
writer.startElement(HTML.TR_ELEMENT, component);
writer.startElement(HTML.TD_ELEM, component);
writer.write(" ");
@@ -628,7 +625,6 @@
writer.write(" ");
writer.endElement(HTML.TD_ELEM);
writer.endElement(HTML.TR_ELEMENT);
- writer.endElement(HTML.TBOBY_ELEMENT);
writer.endElement(HTML.TABLE_ELEMENT);
writer.startElement(HTML.DIV_ELEM, component);
writer.writeAttribute(HTML.ID_ATTRIBUTE, component.getClientId(context) + ":rm", null);
14 years, 1 month
JBoss Rich Faces SVN: r17185 - root/core/trunk/impl/src/main/java/org/ajax4jsf/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-05-21 13:07:13 -0400 (Fri, 21 May 2010)
New Revision: 17185
Modified:
root/core/trunk/impl/src/main/java/org/ajax4jsf/renderkit/RendererUtils.java
Log:
TBOBY -> TBODY
Modified: root/core/trunk/impl/src/main/java/org/ajax4jsf/renderkit/RendererUtils.java
===================================================================
--- root/core/trunk/impl/src/main/java/org/ajax4jsf/renderkit/RendererUtils.java 2010-05-21 16:58:58 UTC (rev 17184)
+++ root/core/trunk/impl/src/main/java/org/ajax4jsf/renderkit/RendererUtils.java 2010-05-21 17:07:13 UTC (rev 17185)
@@ -1260,7 +1260,7 @@
public static final String TABINDEX_ATTRIBUTE = "tabindex";
public static final String TABLE_ELEMENT = "table";
public static final String TARGET_ATTRIBUTE = "target";
- public static final String TBOBY_ELEMENT = "tbody";
+ public static final String TBODY_ELEMENT = "tbody";
public static final String TD_ELEM = "td";
public static final String TEXT_JAVASCRIPT_TYPE = "text/javascript";
public static final String TFOOT_ELEMENT = "tfoot";
14 years, 1 month
JBoss Rich Faces SVN: r17184 - in root/cdk/trunk: plugins/annotations and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: jbalunas(a)redhat.com
Date: 2010-05-21 12:58:58 -0400 (Fri, 21 May 2010)
New Revision: 17184
Modified:
root/cdk/trunk/bom/pom.xml
root/cdk/trunk/plugins/annotations/pom.xml
root/cdk/trunk/plugins/generator/pom.xml
Log:
Updated cdk to follow conditional jsf impl profiles
Modified: root/cdk/trunk/bom/pom.xml
===================================================================
--- root/cdk/trunk/bom/pom.xml 2010-05-21 16:32:57 UTC (rev 17183)
+++ root/cdk/trunk/bom/pom.xml 2010-05-21 16:58:58 UTC (rev 17184)
@@ -4,15 +4,10 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <!--
- TODO inherit this module from the RichFaces root that should define
- all global properties: distribution management, license, developers,
- company ...
- -->
<parent>
<groupId>org.richfaces</groupId>
<artifactId>richfaces-parent</artifactId>
- <version>1</version>
+ <version>2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -23,6 +18,9 @@
<packaging>pom</packaging>
<name>JSF Components Development Kit (CDK) bill of materials.</name>
<description>This module defines all versions of CDK projects and their dependencies.</description>
+ <properties>
+ <richfaces.commons.version>4.0.0-SNAPSHOT</richfaces.commons.version>
+ </properties>
<scm>
<connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/root/cdk/trunk/bom</connection>
<developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/root/cdk/trunk/bom</developerConnection>
@@ -42,14 +40,17 @@
</build>
<dependencyManagement>
<dependencies>
- <!-- JSF -->
+ <!-- Import richfaces-common-bom -->
+ <dependency>
+ <groupId>org.richfaces.commons</groupId>
+ <artifactId>richfaces-commons-bom</artifactId>
+ <version>${richfaces.commons.version}</version>
+ <scope>import</scope>
+ <type>pom</type>
+ </dependency>
+
+ <!-- TODO remove duplicates from these dependences already defined in project BOM -->
<dependency>
- <groupId>com.sun.faces</groupId>
- <artifactId>jsf-api</artifactId>
- <version>2.0.3-SNAPSHOT</version>
- <!--<scope>provided</scope>-->
- </dependency>
- <dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.1</version>
Modified: root/cdk/trunk/plugins/annotations/pom.xml
===================================================================
--- root/cdk/trunk/plugins/annotations/pom.xml 2010-05-21 16:32:57 UTC (rev 17183)
+++ root/cdk/trunk/plugins/annotations/pom.xml 2010-05-21 16:58:58 UTC (rev 17184)
@@ -15,8 +15,8 @@
<name>annotations</name>
<dependencies>
<dependency>
- <groupId>com.sun.faces</groupId>
- <artifactId>jsf-api</artifactId>
- </dependency>
+ <groupId>${jsf2.api.groupid}</groupId>
+ <artifactId>${jsf2.api.artifactid}</artifactId>
+ </dependency>
</dependencies>
</project>
Modified: root/cdk/trunk/plugins/generator/pom.xml
===================================================================
--- root/cdk/trunk/plugins/generator/pom.xml 2010-05-21 16:32:57 UTC (rev 17183)
+++ root/cdk/trunk/plugins/generator/pom.xml 2010-05-21 16:58:58 UTC (rev 17184)
@@ -132,9 +132,9 @@
<artifactId>jaxb-impl</artifactId>
</dependency>
<dependency>
- <groupId>com.sun.faces</groupId>
- <artifactId>jsf-api</artifactId>
- </dependency>
+ <groupId>${jsf2.api.groupid}</groupId>
+ <artifactId>${jsf2.api.artifactid}</artifactId>
+ </dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
14 years, 1 month
JBoss Rich Faces SVN: r17183 - in root/ui/core/trunk/api/src/main/java/org: richfaces/view/facelets/html and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-05-21 12:32:57 -0400 (Fri, 21 May 2010)
New Revision: 17183
Modified:
root/ui/core/trunk/api/src/main/java/org/ajax4jsf/component/behavior/AjaxBehavior.java
root/ui/core/trunk/api/src/main/java/org/richfaces/view/facelets/html/AjaxHandler.java
root/ui/core/trunk/api/src/main/java/org/richfaces/view/facelets/html/BehaviorTagHandlerDelegate.java
root/ui/core/trunk/api/src/main/java/org/richfaces/view/facelets/html/CustomBehaviorHandler.java
root/ui/core/trunk/api/src/main/java/org/richfaces/view/facelets/tag/AjaxBehaviorRule.java
root/ui/core/trunk/api/src/main/java/org/richfaces/view/facelets/tag/BehaviorRule.java
Log:
use 'getMetaRules' method from CustomBehaviorHandler to retrieve specific for the handler behavior rules, rename ajaxBehaviorListener -> listener
Modified: root/ui/core/trunk/api/src/main/java/org/ajax4jsf/component/behavior/AjaxBehavior.java
===================================================================
--- root/ui/core/trunk/api/src/main/java/org/ajax4jsf/component/behavior/AjaxBehavior.java 2010-05-21 14:59:23 UTC (rev 17182)
+++ root/ui/core/trunk/api/src/main/java/org/ajax4jsf/component/behavior/AjaxBehavior.java 2010-05-21 16:32:57 UTC (rev 17183)
@@ -51,7 +51,7 @@
.of(ClientBehaviorHint.SUBMITTING));
enum PropertyKeys {
- data, execute, onbeforedomupdate, onbegin, oncomplete, onerror, onevent, queueId, render, similarityGroupingId, status, disabled, limitRender, immediate, behaviorListener
+ data, execute, onbeforedomupdate, onbegin, oncomplete, onerror, onevent, queueId, render, similarityGroupingId, status, disabled, limitRender, immediate
}
private static final Set<String> ALL_SINGLETON_SET = Collections.singleton(AjaxRendererUtils.ALL);
@@ -150,7 +150,7 @@
@SuppressWarnings("unchecked")
public Collection<String> getExecute() {
Object executeObject = getStateHelper().eval(PropertyKeys.execute);
-
+
if (executeObject instanceof Collection<?>) {
return (Collection<String>) executeObject;
} else {
Modified: root/ui/core/trunk/api/src/main/java/org/richfaces/view/facelets/html/AjaxHandler.java
===================================================================
--- root/ui/core/trunk/api/src/main/java/org/richfaces/view/facelets/html/AjaxHandler.java 2010-05-21 14:59:23 UTC (rev 17182)
+++ root/ui/core/trunk/api/src/main/java/org/richfaces/view/facelets/html/AjaxHandler.java 2010-05-21 16:32:57 UTC (rev 17183)
@@ -39,44 +39,46 @@
import javax.faces.view.facelets.BehaviorConfig;
import javax.faces.view.facelets.ComponentHandler;
import javax.faces.view.facelets.FaceletContext;
+import javax.faces.view.facelets.MetaRule;
import javax.faces.view.facelets.TagException;
import org.ajax4jsf.component.behavior.AjaxBehavior;
import org.richfaces.component.AbstractAttachQueue;
import org.richfaces.view.facelets.html.BehaviorStack.BehaviorInfo;
+import org.richfaces.view.facelets.tag.AjaxBehaviorRule;
/**
* @author Anton Belevich
- *
+ *
*/
public class AjaxHandler extends CustomBehaviorHandler {
-
+
public AjaxHandler(BehaviorConfig config) {
- super(config);
+ super(config);
}
-
+
public void apply(FaceletContext ctx, UIComponent parent) throws IOException {
-
+
Application application = ctx.getFacesContext().getApplication();
Behavior behavior = application.createBehavior(getBehaviorId());
- if(behavior instanceof AjaxBehavior) {
+ if (behavior instanceof AjaxBehavior) {
setAttributes(ctx, behavior);
- AjaxBehavior ajaxBehavior = (AjaxBehavior)behavior;
-
+ AjaxBehavior ajaxBehavior = (AjaxBehavior) behavior;
+
FacesContext context = ctx.getFacesContext();
BehaviorStack ajaxBehaviors = BehaviorStack.getBehaviorStack(context, true);
String eventName = getEventName();
ajaxBehaviors.pushBehavior(context, ajaxBehavior, AjaxBehavior.BEHAVIOR_ID, eventName);
-
+
AttachQueueStack attachQueueStack = AttachQueueStack.getStack(context, true);
AttachQueueInfo attachQueueInfo = new AttachQueueInfo(parent);
attachQueueStack.push(attachQueueInfo);
-
+
nextHandler.apply(ctx, parent);
-
+
attachQueueStack.pop();
-
+
BehaviorInfo behaviorInfo = ajaxBehaviors.popBehavior();
if (behaviorInfo != null) {
if (behaviorInfo.isWrapping()) {
@@ -97,17 +99,16 @@
if (attachQueue != null) {
attachQueue.associateWith(ajaxBehavior);
}
-
+
applyNested(ctx, parent, ajaxBehavior);
}
} else {
- //TODO nick - is this possible?
+ // TODO nick - is this possible?
}
-
+
}
}
-
-
+
private void applyNested(FaceletContext ctx, UIComponent parent, AjaxBehavior behavior) {
if (!ComponentHandler.isNew(parent)) {
return;
@@ -125,13 +126,12 @@
if (null == componentDescriptor) {
throw new TagException(tag,
- "Error: enclosing composite component BeanInfo does not have BeanDescriptor");
+ "Error: enclosing composite component BeanInfo does not have BeanDescriptor");
}
- @SuppressWarnings(
- "unchecked") List<AttachedObjectTarget> targetList =
- (List<AttachedObjectTarget>) componentDescriptor.getValue(
- AttachedObjectTarget.ATTACHED_OBJECT_TARGETS_KEY);
+ @SuppressWarnings("unchecked")
+ List<AttachedObjectTarget> targetList = (List<AttachedObjectTarget>) componentDescriptor
+ .getValue(AttachedObjectTarget.ATTACHED_OBJECT_TARGETS_KEY);
if (null == targetList) {
throw new TagException(tag, "Error: enclosing composite component does not support behavior events");
@@ -144,7 +144,7 @@
BehaviorHolderAttachedObjectTarget behaviorTarget = (BehaviorHolderAttachedObjectTarget) target;
if ((null != eventName && eventName.equals(behaviorTarget.getName()))
- || (null == eventName && behaviorTarget.isDefaultEvent())) {
+ || (null == eventName && behaviorTarget.isDefaultEvent())) {
supportedEvent = true;
break;
@@ -165,7 +165,7 @@
throw new TagException(this.tag, "Unable to attach <a4j:ajax> to non-ClientBehaviorHolder parent");
}
}
-
+
private String resolveEventName(ClientBehaviorHolder bHolder) {
String eventName = getEventName();
if (null == eventName) {
@@ -178,13 +178,17 @@
Collection<String> eventNames = bHolder.getEventNames();
if (!eventNames.contains(eventName)) {
- throw new TagException(this.tag,
- eventName + "event is not supported for the "
- + bHolder.getClass().getSimpleName());
+ throw new TagException(this.tag, eventName + "event is not supported for the "
+ + bHolder.getClass().getSimpleName());
}
}
return eventName;
}
-
+
+ @Override
+ public MetaRule[] getMetaRules() {
+ return new MetaRule[] { AjaxBehaviorRule.INSTANCE };
+ }
+
}
Modified: root/ui/core/trunk/api/src/main/java/org/richfaces/view/facelets/html/BehaviorTagHandlerDelegate.java
===================================================================
--- root/ui/core/trunk/api/src/main/java/org/richfaces/view/facelets/html/BehaviorTagHandlerDelegate.java 2010-05-21 14:59:23 UTC (rev 17182)
+++ root/ui/core/trunk/api/src/main/java/org/richfaces/view/facelets/html/BehaviorTagHandlerDelegate.java 2010-05-21 16:32:57 UTC (rev 17183)
@@ -30,12 +30,11 @@
import javax.faces.context.FacesContext;
import javax.faces.view.AttachedObjectHandler;
import javax.faces.view.facelets.FaceletContext;
+import javax.faces.view.facelets.MetaRule;
import javax.faces.view.facelets.MetaRuleset;
import javax.faces.view.facelets.TagHandlerDelegate;
import org.ajax4jsf.component.behavior.ClientBehavior;
-import org.richfaces.view.facelets.tag.AjaxBehaviorRule;
-import org.richfaces.view.facelets.tag.BehaviorRule;
/**
* @author Anton Belevich
@@ -51,11 +50,14 @@
private String eventName;
+ private MetaRule[] metaRules;
+
public BehaviorTagHandlerDelegate(CustomBehaviorHandler owner, TagHandlerDelegate wrappedHandlerDelegate) {
this.owner = owner;
this.wrappedHandlerDelegate = wrappedHandlerDelegate;
this.behaviorId = owner.getBehaviorId();
this.eventName = owner.getEventName();
+ this.metaRules = owner.getMetaRules();
}
@Override
@@ -88,8 +90,9 @@
public MetaRuleset createMetaRuleset(Class type) {
MetaRuleset metaRuleset = wrappedHandlerDelegate.createMetaRuleset(type);
- metaRuleset.addRule(BehaviorRule.INSTANCE);
- metaRuleset.addRule(AjaxBehaviorRule.INSTANCE);
+ for (MetaRule metaRule : metaRules) {
+ metaRuleset.addRule(metaRule);
+ }
return metaRuleset;
}
Modified: root/ui/core/trunk/api/src/main/java/org/richfaces/view/facelets/html/CustomBehaviorHandler.java
===================================================================
--- root/ui/core/trunk/api/src/main/java/org/richfaces/view/facelets/html/CustomBehaviorHandler.java 2010-05-21 14:59:23 UTC (rev 17182)
+++ root/ui/core/trunk/api/src/main/java/org/richfaces/view/facelets/html/CustomBehaviorHandler.java 2010-05-21 16:32:57 UTC (rev 17183)
@@ -25,14 +25,17 @@
import javax.faces.view.facelets.BehaviorConfig;
import javax.faces.view.facelets.BehaviorHandler;
import javax.faces.view.facelets.CompositeFaceletHandler;
+import javax.faces.view.facelets.MetaRule;
import javax.faces.view.facelets.TagHandler;
import javax.faces.view.facelets.TagHandlerDelegate;
+import org.richfaces.view.facelets.tag.BehaviorRule;
+
/**
* @author Anton Belevich
*
*/
-public abstract class CustomBehaviorHandler extends BehaviorHandler {
+public class CustomBehaviorHandler extends BehaviorHandler {
TagHandlerDelegate helper;
@@ -41,13 +44,17 @@
}
public boolean isWrapping() {
- return ((this.nextHandler instanceof TagHandler) || (this.nextHandler instanceof CompositeFaceletHandler));
+ return ((this.nextHandler instanceof TagHandler) || (this.nextHandler instanceof CompositeFaceletHandler));
}
-
+
public boolean isWrappingAttachQueue() {
return (this.nextHandler instanceof AttachQueueHandler);
}
+ public MetaRule[] getMetaRules() {
+ return new MetaRule[] { BehaviorRule.INSTANCE };
+ }
+
@Override
protected TagHandlerDelegate getTagHandlerDelegate() {
if (helper == null) {
Modified: root/ui/core/trunk/api/src/main/java/org/richfaces/view/facelets/tag/AjaxBehaviorRule.java
===================================================================
--- root/ui/core/trunk/api/src/main/java/org/richfaces/view/facelets/tag/AjaxBehaviorRule.java 2010-05-21 14:59:23 UTC (rev 17182)
+++ root/ui/core/trunk/api/src/main/java/org/richfaces/view/facelets/tag/AjaxBehaviorRule.java 2010-05-21 16:32:57 UTC (rev 17183)
@@ -24,7 +24,6 @@
import javax.faces.event.AjaxBehaviorEvent;
import javax.faces.view.facelets.FaceletContext;
-import javax.faces.view.facelets.MetaRule;
import javax.faces.view.facelets.Metadata;
import javax.faces.view.facelets.MetadataTarget;
import javax.faces.view.facelets.TagAttribute;
@@ -37,17 +36,45 @@
* @author Anton Belevich
*
*/
-public class AjaxBehaviorRule extends MetaRule {
+public class AjaxBehaviorRule extends BehaviorRule {
public static final Class<?>[] AJAX_BEHAVIOR_LISTENER_SIG = new Class[] { AjaxBehaviorEvent.class };
public static final AjaxBehaviorRule INSTANCE = new AjaxBehaviorRule();
+ public static final String EXECUTE = "execute";
+
+ public static final String RENDER = "render";
+
+ public static final String LISTENER = "listener";
+
@Override
public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget meta) {
+
if (meta.isTargetInstanceOf(AjaxBehavior.class)) {
- if ("ajaxBehaviorListener".equals(name)) {
- return new AjaxBehaviorListenerMapper(attribute);
+
+ if (!attribute.isLiteral()) {
+
+ if (LISTENER.equals(name)) {
+ return new AjaxBehaviorListenerMapper(attribute);
+ }
+
+ Class<?> type = meta.getPropertyType(name);
+
+ if (EXECUTE.equals(name) || RENDER.equals(name)) {
+ type = Object.class;
+ }
+
+ if (type == null) {
+ type = Object.class;
+ }
+
+ return new ValueExpressionMetadata(name, type, attribute);
+
+ } else if (meta != null && meta.getWriteMethod(name) != null) {
+ if (EXECUTE.equals(name) || RENDER.equals(name)) {
+ return new LiteralAttributeMetadata(name, attribute.getValue());
+ }
}
}
Modified: root/ui/core/trunk/api/src/main/java/org/richfaces/view/facelets/tag/BehaviorRule.java
===================================================================
--- root/ui/core/trunk/api/src/main/java/org/richfaces/view/facelets/tag/BehaviorRule.java 2010-05-21 14:59:23 UTC (rev 17182)
+++ root/ui/core/trunk/api/src/main/java/org/richfaces/view/facelets/tag/BehaviorRule.java 2010-05-21 16:32:57 UTC (rev 17183)
@@ -80,35 +80,24 @@
@Override
public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget meta) {
if (meta.isTargetInstanceOf(ClientBehavior.class)) {
- if (!attribute.isLiteral()) {
+ if (!attribute.isLiteral()) {
Class<?> type = meta.getPropertyType(name);
- //TODO nick -> anton - shouldn't this check be in AjaxBehaviorRule?
- if ("execute".equals(name) || "render".equals(name)) {
+ if (type == null) {
type = Object.class;
- } else {
- type = meta.getPropertyType(name);
- if (type == null) {
- type = Object.class;
- }
}
-
+
return new ValueExpressionMetadata(name, type, attribute);
- } else {
- if (meta.getWriteMethod(name) != null) {
- //TODO nick -> anton - shouldn't this check be in AjaxBehaviorRule?
- if ("execute".equals(name) || "render".equals(name)) {
- return new LiteralAttributeMetadata(name, attribute.getValue());
- }
- } else {
- if (log.isDebugEnabled()) {
- log.debug(attribute + " Property '" + name + "' is not on type: "
+ } else if (meta != null && meta.getWriteMethod(name) == null) {
+
+ if (log.isDebugEnabled()) {
+ log
+ .debug(attribute + " Property '" + name + "' is not on type: "
+ meta.getTargetClass().getName());
- }
- return new LiteralAttributeMetadata(name, attribute.getValue());
}
+ return new LiteralAttributeMetadata(name, attribute.getValue());
}
}
14 years, 1 month
JBoss Rich Faces SVN: r17182 - in root/ui/core/trunk: api and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: jbalunas(a)redhat.com
Date: 2010-05-21 10:59:23 -0400 (Fri, 21 May 2010)
New Revision: 17182
Modified:
root/ui/core/trunk/api/pom.xml
root/ui/core/trunk/bom/pom.xml
root/ui/core/trunk/parent/pom.xml
root/ui/core/trunk/pom.xml
Log:
Part of profile changes to support JSF runtime changes
Modified: root/ui/core/trunk/api/pom.xml
===================================================================
--- root/ui/core/trunk/api/pom.xml 2010-05-21 14:43:47 UTC (rev 17181)
+++ root/ui/core/trunk/api/pom.xml 2010-05-21 14:59:23 UTC (rev 17182)
@@ -52,8 +52,8 @@
<!-- JSF with dependencies -->
<dependency>
- <groupId>com.sun.faces</groupId>
- <artifactId>jsf-api</artifactId>
+ <groupId>${jsf2.api.groupid}</groupId>
+ <artifactId>${jsf2.api.artifactid}</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
@@ -79,8 +79,8 @@
<!-- tests -->
<dependency>
- <groupId>com.sun.faces</groupId>
- <artifactId>jsf-impl</artifactId>
+ <groupId>${jsf2.impl.groupid}</groupId>
+ <artifactId>${jsf2.impl.artifactid}</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Modified: root/ui/core/trunk/bom/pom.xml
===================================================================
--- root/ui/core/trunk/bom/pom.xml 2010-05-21 14:43:47 UTC (rev 17181)
+++ root/ui/core/trunk/bom/pom.xml 2010-05-21 14:59:23 UTC (rev 17182)
@@ -27,7 +27,7 @@
<parent>
<groupId>org.richfaces</groupId>
<artifactId>richfaces-parent</artifactId>
- <version>1</version>
+ <version>2-SNAPSHOT</version>
</parent>
<groupId>org.richfaces.ui</groupId>
Modified: root/ui/core/trunk/parent/pom.xml
===================================================================
--- root/ui/core/trunk/parent/pom.xml 2010-05-21 14:43:47 UTC (rev 17181)
+++ root/ui/core/trunk/parent/pom.xml 2010-05-21 14:59:23 UTC (rev 17182)
@@ -27,7 +27,7 @@
<parent>
<groupId>org.richfaces</groupId>
<artifactId>richfaces-parent</artifactId>
- <version>1</version>
+ <version>2-SNAPSHOT</version>
</parent>
<groupId>org.richfaces.ui</groupId>
Modified: root/ui/core/trunk/pom.xml
===================================================================
--- root/ui/core/trunk/pom.xml 2010-05-21 14:43:47 UTC (rev 17181)
+++ root/ui/core/trunk/pom.xml 2010-05-21 14:59:23 UTC (rev 17182)
@@ -27,7 +27,7 @@
<parent>
<groupId>org.richfaces</groupId>
<artifactId>richfaces-parent</artifactId>
- <version>1</version>
+ <version>2-SNAPSHOT</version>
</parent>
<groupId>org.richfaces.ui</groupId>
14 years, 1 month
JBoss Rich Faces SVN: r17181 - root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2010-05-21 10:43:47 -0400 (Fri, 21 May 2010)
New Revision: 17181
Modified:
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/simpleTable.xhtml
Log:
https://jira.jboss.org/browse/RF-8298
Modified: root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/simpleTable.xhtml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/simpleTable.xhtml 2010-05-21 14:39:13 UTC (rev 17180)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/simpleTable.xhtml 2010-05-21 14:43:47 UTC (rev 17181)
@@ -1,59 +1,63 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:a4j="http://richfaces.org/a4j"
- xmlns:tbl="http://richfaces.org/rich">
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:tbl="http://richfaces.org/rich">
- <ui:composition>
- <h:form>
- <tbl:dataTable value="#{carsBean.inventoryVendorLists}" var="list">
- <f:facet name="header">
- <h:outputText value="Cars marketplace"/>
- </f:facet>
- <tbl:column colspan="3">
- <h:outputText value="#{list.vendor}" />
- </tbl:column>
- <tbl:subTable value="#{list.vendorItems}" var="item">
+<ui:composition>
+ <h:form>
+ <tbl:dataTable value="#{carsBean.inventoryVendorLists}" var="list">
+ <f:facet name="header">
+ <tbl:colGroup>
+ <tbl:column colspan="6">
+ <h:outputText value="Cars marketplace" />
+ </tbl:column>
<tbl:column>
- <f:facet name="header">
- <h:outputText value="Model" />
- </f:facet>
- <h:outputText value="#{item.model}" />
+ <h:outputText value="Model" />
</tbl:column>
<tbl:column>
- <f:facet name="header">
- <h:outputText value="Price" />
- </f:facet>
- <h:outputText value="#{item.price}" />
+ <h:outputText value="Price" />
</tbl:column>
<tbl:column>
- <f:facet name="header">
- <h:outputText value="Mileage" />
- </f:facet>
- <h:outputText value="#{item.mileage}" />
- </tbl:column>
+ <h:outputText value="Mileage" />
+ </tbl:column>
<tbl:column>
- <f:facet name="header">
- <h:outputText value="VIN Code" />
- </f:facet>
- <h:outputText value="#{item.vin}" />
- </tbl:column>
+ <h:outputText value="VIN Code" />
+ </tbl:column>
<tbl:column>
- <f:facet name="header">
- <h:outputText value="Items stock" />
- </f:facet>
- <h:outputText value="#{item.stock}" />
+ <h:outputText value="Items stock" />
</tbl:column>
<tbl:column>
- <f:facet name="header">
- <h:outputText value="Days Live" />
- </f:facet>
- <h:outputText value="#{item.daysLive}" />
- </tbl:column>
- </tbl:subTable>
- </tbl:dataTable>
- </h:form>
- </ui:composition>
+ <h:outputText value="Days Live" />
+ </tbl:column>
+ </tbl:colGroup>
+ </f:facet>
+ <tbl:column colspan="6">
+ <h:outputText value="#{list.vendor}" />
+ </tbl:column>
+ <tbl:subTable value="#{list.vendorItems}" var="item">
+ <tbl:column>
+ <h:outputText value="#{item.model}" />
+ </tbl:column>
+ <tbl:column>
+ <h:outputText value="#{item.price}" />
+ </tbl:column>
+ <tbl:column>
+ <h:outputText value="#{item.mileage}" />
+ </tbl:column>
+ <tbl:column>
+ <h:outputText value="#{item.vin}" />
+ </tbl:column>
+ <tbl:column>
+ <h:outputText value="#{item.stock}" />
+ </tbl:column>
+ <tbl:column>
+ <h:outputText value="#{item.daysLive}" />
+ </tbl:column>
+ </tbl:subTable>
+ </tbl:dataTable>
+ </h:form>
+</ui:composition>
</html>
\ No newline at end of file
14 years, 1 month
JBoss Rich Faces SVN: r17180 - in root: build/parent/trunk and 9 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: jbalunas(a)redhat.com
Date: 2010-05-21 10:39:13 -0400 (Fri, 21 May 2010)
New Revision: 17180
Modified:
root/build/bom/trunk/pom.xml
root/build/parent/trunk/pom.xml
root/commons/trunk/api/pom.xml
root/commons/trunk/bom/pom.xml
root/commons/trunk/parent/pom.xml
root/commons/trunk/pom.xml
root/core/trunk/api/pom.xml
root/core/trunk/bom/pom.xml
root/core/trunk/impl/pom.xml
root/core/trunk/parent/pom.xml
root/core/trunk/pom.xml
Log:
Update to allow changing of JSF api/impl using profiles
Modified: root/build/bom/trunk/pom.xml
===================================================================
--- root/build/bom/trunk/pom.xml 2010-05-21 14:33:37 UTC (rev 17179)
+++ root/build/bom/trunk/pom.xml 2010-05-21 14:39:13 UTC (rev 17180)
@@ -1,21 +1,19 @@
<!--
- JBoss, Home of Professional Open Source Copyright 2010, 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.
+ JBoss, Home of Professional Open Source Copyright 2010, 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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
@@ -30,7 +28,7 @@
<parent>
<groupId>org.richfaces</groupId>
<artifactId>richfaces-parent</artifactId>
- <version>1</version>
+ <version>2-SNAPSHOT</version>
</parent>
<description>
@@ -96,16 +94,15 @@
</dependency>
<!-- JSF 2 -->
+ <!--
+ This is set by default above, but can be overwritten by profiles
+ in richfaces-parent
+ -->
<dependency>
- <groupId>com.sun.faces</groupId>
- <artifactId>jsf-api</artifactId>
- <version>2.0.3-SNAPSHOT</version>
+ <groupId>${jsf2.api.groupid}</groupId>
+ <artifactId>${jsf2.api.artifactid}</artifactId>
+ <version>${jsf2.api.version}</version>
</dependency>
- <dependency>
- <groupId>com.sun.faces</groupId>
- <artifactId>jsf-impl</artifactId>
- <version>2.0.3-SNAPSHOT</version>
- </dependency>
<!-- Misc -->
<dependency>
@@ -142,7 +139,7 @@
</dependency>
</dependencies>
</dependencyManagement>
-
+
<build>
<plugins>
<!-- For the release this bom pom -->
Modified: root/build/parent/trunk/pom.xml
===================================================================
--- root/build/parent/trunk/pom.xml 2010-05-21 14:33:37 UTC (rev 17179)
+++ root/build/parent/trunk/pom.xml 2010-05-21 14:39:13 UTC (rev 17180)
@@ -15,7 +15,8 @@
Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
site: http://www.fsf.org.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces</groupId>
@@ -31,7 +32,8 @@
</parent>
<description>
- The Parent for all RichFaces sub-projects. This specifies build, plugin
+ The Parent for all RichFaces sub-projects. This specifies
+ build, plugin
and project meta-data.
</description>
@@ -57,7 +59,8 @@
</issueManagement>
<properties>
- <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+ <project.reporting.outputEncoding>UTF-8
+ </project.reporting.outputEncoding>
</properties>
<!-- Repository management, including extra repositories if needed -->
@@ -127,6 +130,13 @@
<artifactId>junit</artifactId>
<version>4.4</version>
</dependency>
+ <!-- JSF imple is only a testing requirement -->
+ <!-- This is set by profiles below -->
+ <dependency>
+ <groupId>${jsf2.impl.groupid}</groupId>
+ <artifactId>${jsf2.impl.artifactid}</artifactId>
+ <version>${jsf2.impl.version}</version>
+ </dependency>
</dependencies>
</dependencyManagement>
@@ -364,6 +374,89 @@
</clover.license.path>
</properties>
</profile>
+
+ <!--
+ The following profiles determine the JSF api/impl combinations that
+ will beused. The detfault profile is "jsf-ri", this can be
+ overwritten by setting -Djsf=[myfaces|mix] on the
+ mvn command line
+ -->
+ <profile>
+ <id>jsf-ri</id>
+ <activation>
+ <property>
+ <name>!jsf_profile</name>
+ </property>
+ </activation>
+ <properties>
+ <!-- Define jsf 2 api dependency -->
+ <jsf2.api.groupid>com.sun.faces</jsf2.api.groupid>
+ <jsf2.api.artifactid>jsf-api</jsf2.api.artifactid>
+ <jsf2.api.version>2.0.3-SNAPSHOT</jsf2.api.version>
+ <!-- Define jsf 2 impl dependency -->
+ <jsf2.impl.groupid>com.sun.faces</jsf2.impl.groupid>
+ <jsf2.impl.artifactid>jsf-impl</jsf2.impl.artifactid>
+ <jsf2.impl.version>2.0.3-SNAPSHOT</jsf2.impl.version>
+ </properties>
+ </profile>
+ <profile>
+ <id>ri_202</id>
+ <activation>
+ <property>
+ <name>jsf_profile</name>
+ <value>ri_202</value>
+ </property>
+ </activation>
+ <properties>
+ <!-- Define jsf 2 api dependency -->
+ <jsf2.api.groupid>com.sun.faces</jsf2.api.groupid>
+ <jsf2.api.artifactid>jsf-api</jsf2.api.artifactid>
+ <jsf2.api.version>2.0.2</jsf2.api.version>
+ <!-- Define jsf 2 impl dependency -->
+ <jsf2.impl.groupid>com.sun.faces</jsf2.impl.groupid>
+ <jsf2.impl.artifactid>jsf-impl</jsf2.impl.artifactid>
+ <jsf2.impl.version>2.0.2</jsf2.impl.version>
+ </properties>
+ </profile>
+ <profile>
+ <id>myfaces</id>
+ <activation>
+ <property>
+ <name>jsf_profile</name>
+ <value>myfaces</value>
+ </property>
+ </activation>
+ <properties>
+ <!-- Define jsf 2 api dependency -->
+ <jsf2.api.groupid>org.apache.myfaces.core</jsf2.api.groupid>
+ <jsf2.api.artifactid>myfaces-api</jsf2.api.artifactid>
+ <jsf2.api.version>2.0.0</jsf2.api.version>
+ <!-- Define jsf 2 impl dependency -->
+ <jsf2.impl.groupid>org.apache.myfaces.core</jsf2.impl.groupid>
+ <jsf2.impl.artifactid>myfaces-impl</jsf2.impl.artifactid>
+ <jsf2.impl.version>2.0.0</jsf2.impl.version>
+ </properties>
+ </profile>
+ <profile>
+ <id>myfaces-api-ri-impl</id>
+ <activation>
+ <property>
+ <name>jsf_profile</name>
+ <value>mix</value>
+ </property>
+ </activation>
+ <properties>
+ <!-- Define jsf 2 api dependency -->
+ <jsf2.api.groupid>org.apache.myfaces.core</jsf2.api.groupid>
+ <jsf2.api.artifactid>myfaces-api</jsf2.api.artifactid>
+ <jsf2.api.version>2.0.0</jsf2.api.version>
+ <!-- Define jsf 2 impl dependency -->
+ <jsf2.impl.groupid>com.sun.faces</jsf2.impl.groupid>
+ <jsf2.impl.artifactid>jsf-impl</jsf2.impl.artifactid>
+ <jsf2.impl.version>2.0.3-SNAPSHOT</jsf2.impl.version>
+ </properties>
+ </profile>
+
</profiles>
<distributionManagement>
@@ -374,8 +467,10 @@
<!-- SCM and distribution management -->
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/root/build/parent/trunk</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/root/build/parent/trunk</developerConnection>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/root/build/parent/trunk
+ </connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/root/build/parent/trunk
+ </developerConnection>
<url>http://fisheye.jboss.org/browse/richfaces</url>
</scm>
Modified: root/commons/trunk/api/pom.xml
===================================================================
--- root/commons/trunk/api/pom.xml 2010-05-21 14:33:37 UTC (rev 17179)
+++ root/commons/trunk/api/pom.xml 2010-05-21 14:39:13 UTC (rev 17180)
@@ -1,21 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- JBoss, Home of Professional Open Source Copyright 2010, 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.
+ JBoss, Home of Professional Open Source Copyright 2010, 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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
@@ -34,9 +32,10 @@
<dependencies>
<!-- Runtime Dependencies -->
+ <!-- JSF2 api version set by bom/richface-parent -->
<dependency>
- <groupId>com.sun.faces</groupId>
- <artifactId>jsf-api</artifactId>
+ <groupId>${jsf2.api.groupid}</groupId>
+ <artifactId>${jsf2.api.artifactid}</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
Modified: root/commons/trunk/bom/pom.xml
===================================================================
--- root/commons/trunk/bom/pom.xml 2010-05-21 14:33:37 UTC (rev 17179)
+++ root/commons/trunk/bom/pom.xml 2010-05-21 14:39:13 UTC (rev 17180)
@@ -30,7 +30,7 @@
<parent>
<groupId>org.richfaces</groupId>
<artifactId>richfaces-parent</artifactId>
- <version>1</version>
+ <version>2-SNAPSHOT</version>
</parent>
<description>
Modified: root/commons/trunk/parent/pom.xml
===================================================================
--- root/commons/trunk/parent/pom.xml 2010-05-21 14:33:37 UTC (rev 17179)
+++ root/commons/trunk/parent/pom.xml 2010-05-21 14:39:13 UTC (rev 17180)
@@ -28,7 +28,7 @@
<parent>
<groupId>org.richfaces</groupId>
<artifactId>richfaces-parent</artifactId>
- <version>1</version>
+ <version>2-SNAPSHOT</version>
</parent>
<description>
Modified: root/commons/trunk/pom.xml
===================================================================
--- root/commons/trunk/pom.xml 2010-05-21 14:33:37 UTC (rev 17179)
+++ root/commons/trunk/pom.xml 2010-05-21 14:39:13 UTC (rev 17180)
@@ -25,7 +25,7 @@
<parent>
<groupId>org.richfaces</groupId>
<artifactId>richfaces-parent</artifactId>
- <version>1</version>
+ <version>2-SNAPSHOT</version>
</parent>
<groupId>org.richfaces.commons</groupId>
Modified: root/core/trunk/api/pom.xml
===================================================================
--- root/core/trunk/api/pom.xml 2010-05-21 14:33:37 UTC (rev 17179)
+++ root/core/trunk/api/pom.xml 2010-05-21 14:39:13 UTC (rev 17180)
@@ -48,9 +48,10 @@
</dependency>
<!-- Provided dependencies -->
+ <!-- JSF2 api version set by bom/richface-parent -->
<dependency>
- <groupId>com.sun.faces</groupId>
- <artifactId>jsf-api</artifactId>
+ <groupId>${jsf2.api.groupid}</groupId>
+ <artifactId>${jsf2.api.artifactid}</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
Modified: root/core/trunk/bom/pom.xml
===================================================================
--- root/core/trunk/bom/pom.xml 2010-05-21 14:33:37 UTC (rev 17179)
+++ root/core/trunk/bom/pom.xml 2010-05-21 14:39:13 UTC (rev 17180)
@@ -29,7 +29,7 @@
<parent>
<groupId>org.richfaces</groupId>
<artifactId>richfaces-parent</artifactId>
- <version>1</version>
+ <version>2-SNAPSHOT</version>
</parent>
<description>
Modified: root/core/trunk/impl/pom.xml
===================================================================
--- root/core/trunk/impl/pom.xml 2010-05-21 14:33:37 UTC (rev 17179)
+++ root/core/trunk/impl/pom.xml 2010-05-21 14:39:13 UTC (rev 17180)
@@ -57,8 +57,8 @@
<!-- Provided Dependencies -->
<dependency>
- <groupId>com.sun.faces</groupId>
- <artifactId>jsf-api</artifactId>
+ <groupId>${jsf2.api.groupid}</groupId>
+ <artifactId>${jsf2.api.artifactid}</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
@@ -126,8 +126,8 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>com.sun.faces</groupId>
- <artifactId>jsf-impl</artifactId>
+ <groupId>${jsf2.impl.groupid}</groupId>
+ <artifactId>${jsf2.impl.artifactid}</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
Modified: root/core/trunk/parent/pom.xml
===================================================================
--- root/core/trunk/parent/pom.xml 2010-05-21 14:33:37 UTC (rev 17179)
+++ root/core/trunk/parent/pom.xml 2010-05-21 14:39:13 UTC (rev 17180)
@@ -30,7 +30,7 @@
<parent>
<groupId>org.richfaces</groupId>
<artifactId>richfaces-parent</artifactId>
- <version>1</version>
+ <version>2-SNAPSHOT</version>
</parent>
<description>
Modified: root/core/trunk/pom.xml
===================================================================
--- root/core/trunk/pom.xml 2010-05-21 14:33:37 UTC (rev 17179)
+++ root/core/trunk/pom.xml 2010-05-21 14:39:13 UTC (rev 17180)
@@ -25,7 +25,7 @@
<parent>
<groupId>org.richfaces</groupId>
<artifactId>richfaces-parent</artifactId>
- <version>1</version>
+ <version>2-SNAPSHOT</version>
</parent>
<groupId>org.richfaces.core</groupId>
14 years, 1 month
JBoss Rich Faces SVN: r17179 - in root: core/trunk/impl/src/main/resources/META-INF/resources and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-05-21 10:33:37 -0400 (Fri, 21 May 2010)
New Revision: 17179
Modified:
root/core/trunk/impl/src/main/java/org/ajax4jsf/context/ContextInitParameters.java
root/core/trunk/impl/src/main/resources/META-INF/resources/skinning_classes.ecss
root/examples/core-demo/trunk/src/main/webapp/WEB-INF/web.xml
Log:
https://jira.jboss.org/browse/RF-8677
Fixed CSS syntax error in skinning_classes.ecss
Modified: root/core/trunk/impl/src/main/java/org/ajax4jsf/context/ContextInitParameters.java
===================================================================
--- root/core/trunk/impl/src/main/java/org/ajax4jsf/context/ContextInitParameters.java 2010-05-21 14:25:57 UTC (rev 17178)
+++ root/core/trunk/impl/src/main/java/org/ajax4jsf/context/ContextInitParameters.java 2010-05-21 14:33:37 UTC (rev 17179)
@@ -47,12 +47,10 @@
* If is it equals "true" , framework should proparate exception to client-side.
*/
public static final String HANDLE_VIEW_EXPIRED_ON_CLIENT = "org.ajax4jsf.handleViewExpiredOnClient";
- public static final String STD_CONTROLS_SKINNING_PARAM = "org.richfaces.CONTROL_SKINNING";
- public static final String STD_CONTROLS_SKINNING_CLASSES_PARAM = "org.richfaces.CONTROL_SKINNING_CLASSES";
+ public static final String STD_CONTROLS_SKINNING_PARAM = "org.richfaces.ENABLE_CONTROL_SKINNING";
+ public static final String STD_CONTROLS_SKINNING_CLASSES_PARAM = "org.richfaces.ENABLE_CONTROL_SKINNING_CLASSES";
public static final String[] GLOBAL_QUEUE_ENABLED = {"org.richfaces.queue.enabled"};
- private static final String ENABLE = "enable";
-
private static final String INIT_PARAM_PREFIX = ContextInitParameters.class.getSimpleName() + ":";
private static final Object NULL = new Object() {
@@ -100,7 +98,7 @@
*/
public static boolean isStandardControlSkinningEnabled(FacesContext context) {
String paramValue = evaluateInitParameter(context, STD_CONTROLS_SKINNING_PARAM);
- return paramValue == null /* by default it's on */ || ENABLE.equals(paramValue);
+ return getBooleanValue(paramValue, true);
}
/**
@@ -110,7 +108,8 @@
* @return value of STD_CONTROLS_SKINNING_CLASSES_PARAM parameter if present.
*/
public static boolean isStandardControlSkinningClassesEnabled(FacesContext context) {
- return ENABLE.equals(evaluateInitParameter(context, STD_CONTROLS_SKINNING_CLASSES_PARAM));
+ String paramValue = evaluateInitParameter(context, STD_CONTROLS_SKINNING_CLASSES_PARAM);
+ return getBooleanValue(paramValue, false);
}
static int getInteger(FacesContext context, String[] paramNames, int defaulValue) {
@@ -163,6 +162,24 @@
return value;
}
+ private static boolean getBooleanValue(Object value, boolean defaultValue) {
+ if (value == null) {
+ return defaultValue;
+ }
+
+ if (value instanceof Boolean) {
+ return ((Boolean) value).booleanValue();
+ }
+
+ String stringValue = (String) value;
+
+ if ("true".equalsIgnoreCase(stringValue) || "yes".equalsIgnoreCase(stringValue)) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
private static ConcurrentMap<Object, Object> getExpressionsMap(FacesContext context) {
ConcurrentMap<Object, Object> concurrentStorage = ServiceTracker.getConcurrentStorage(context);
return concurrentStorage;
Modified: root/core/trunk/impl/src/main/resources/META-INF/resources/skinning_classes.ecss
===================================================================
--- root/core/trunk/impl/src/main/resources/META-INF/resources/skinning_classes.ecss 2010-05-21 14:25:57 UTC (rev 17178)
+++ root/core/trunk/impl/src/main/resources/META-INF/resources/skinning_classes.ecss 2010-05-21 14:33:37 UTC (rev 17179)
@@ -299,8 +299,8 @@
.rich-text-control-select{
font-size : '#{richSkin.generalSizeFont}';
- font-family : '#{richSkin.headerFamilyFont};
- color : '#{richSkin.selectControlColor}';
+ font-family : '#{richSkin.headerFamilyFont}';
+ color: '#{richSkin.selectControlColor}';
}
/*gradient styles*/
Modified: root/examples/core-demo/trunk/src/main/webapp/WEB-INF/web.xml
===================================================================
--- root/examples/core-demo/trunk/src/main/webapp/WEB-INF/web.xml 2010-05-21 14:25:57 UTC (rev 17178)
+++ root/examples/core-demo/trunk/src/main/webapp/WEB-INF/web.xml 2010-05-21 14:33:37 UTC (rev 17179)
@@ -16,13 +16,13 @@
</context-param>
<context-param>
- <param-name>org.richfaces.CONTROL_SKINNING</param-name>
- <param-value>#{skinBean.enableElementsSkinning ? 'enable' : ''}</param-value>
+ <param-name>org.richfaces.ENABLE_CONTROL_SKINNING</param-name>
+ <param-value>#{skinBean.enableElementsSkinning}</param-value>
</context-param>
<context-param>
- <param-name>org.richfaces.CONTROL_SKINNING_CLASSES</param-name>
- <param-value>#{skinBean.enableClassesSkinning ? 'enable' : ''}</param-value>
+ <param-name>org.richfaces.ENABLE_CONTROL_SKINNING_CLASSES</param-name>
+ <param-value>#{skinBean.enableClassesSkinning}</param-value>
</context-param>
<context-param>
14 years, 1 month
JBoss Rich Faces SVN: r17178 - in root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo: tables/data/carstore and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2010-05-21 10:25:57 -0400 (Fri, 21 May 2010)
New Revision: 17178
Modified:
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/data/RandomHelper.java
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/data/carstore/CarsBean.java
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/data/carstore/InventoryItem.java
Log:
checkstyle fixes
Modified: root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/data/RandomHelper.java
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/data/RandomHelper.java 2010-05-21 14:24:08 UTC (rev 17177)
+++ root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/data/RandomHelper.java 2010-05-21 14:25:57 UTC (rev 17178)
@@ -2,8 +2,12 @@
import java.util.Random;
-public class RandomHelper {
-
+public final class RandomHelper {
+
+ private RandomHelper() {
+
+ }
+
public static int genRand() {
return rand(1, 10000);
}
Modified: root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/data/carstore/CarsBean.java
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/data/carstore/CarsBean.java 2010-05-21 14:24:08 UTC (rev 17177)
+++ root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/data/carstore/CarsBean.java 2010-05-21 14:25:57 UTC (rev 17178)
@@ -4,20 +4,15 @@
package org.richfaces.demo.tables.data.carstore;
import java.math.BigDecimal;
-
import java.util.ArrayList;
import java.util.Arrays;
-import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.Iterator;
import java.util.List;
-import java.util.Random;
import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ManagedProperty;
import javax.faces.bean.SessionScoped;
-import javax.faces.model.SelectItem;
import org.richfaces.demo.common.data.RandomHelper;
Modified: root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/data/carstore/InventoryItem.java
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/data/carstore/InventoryItem.java 2010-05-21 14:24:08 UTC (rev 17177)
+++ root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/data/carstore/InventoryItem.java 2010-05-21 14:25:57 UTC (rev 17178)
@@ -1,7 +1,7 @@
package org.richfaces.demo.tables.data.carstore;
public class InventoryItem extends InventoryVendorItem {
- public String vendor;
+ private String vendor;
public String getVendor() {
return vendor;
14 years, 1 month
JBoss Rich Faces SVN: r17177 - in root/examples/richfaces-showcase/trunk/src/main: webapp/richfaces and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2010-05-21 10:24:08 -0400 (Fri, 21 May 2010)
New Revision: 17177
Added:
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/extendedDataTable/
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/extendedDataTable/simpleTable.xhtml
Modified:
root/examples/richfaces-showcase/trunk/src/main/resources/org/richfaces/demo/data/common/navigation.xml
root/examples/richfaces-showcase/trunk/src/main/webapp/templates/main.xhtml
Log:
https://jira.jboss.org/browse/RF-8298
Modified: root/examples/richfaces-showcase/trunk/src/main/resources/org/richfaces/demo/data/common/navigation.xml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/resources/org/richfaces/demo/data/common/navigation.xml 2010-05-21 14:12:15 UTC (rev 17176)
+++ root/examples/richfaces-showcase/trunk/src/main/resources/org/richfaces/demo/data/common/navigation.xml 2010-05-21 14:24:08 UTC (rev 17177)
@@ -174,6 +174,16 @@
</sample>
</samples>
</demo>
+ <demo>
+ <id>extendedDataTable</id>
+ <name>rich:extendedDataTable</name>
+ <samples>
+ <sample>
+ <id>simpleTable</id>
+ <name>ExtendedData Table Basic Usage</name>
+ </sample>
+ </samples>
+ </demo>
</demos>
</group>
</root>
Added: root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/extendedDataTable/simpleTable.xhtml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/extendedDataTable/simpleTable.xhtml (rev 0)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/extendedDataTable/simpleTable.xhtml 2010-05-21 14:24:08 UTC (rev 17177)
@@ -0,0 +1,63 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:tbl="http://richfaces.org/rich">
+
+<ui:composition>
+ <h:form>
+ <tbl:extendedDataTable value="#{carsBean.allInventoryItems}" var="car"
+ id="table" frozenColumns="2" style="height:300px; width:500px;">
+ <f:facet name="header">
+ <h:outputText value="Cars marketplace" />
+ </f:facet>
+ <tbl:column>
+ <f:facet name="header">
+ <h:outputText value="vendor" />
+ </f:facet>
+ <h:outputText value="#{car.vendor}" />
+ </tbl:column>
+ <tbl:column>
+ <f:facet name="header">
+ <h:outputText value="Model" />
+ </f:facet>
+ <h:outputText value="#{car.model}" />
+ </tbl:column>
+ <tbl:column>
+ <f:facet name="header">
+ <h:outputText value="Price" />
+ </f:facet>
+ <h:outputText value="#{car.price}" />
+ </tbl:column>
+ <tbl:column>
+ <f:facet name="header">
+ <h:outputText value="Mileage" />
+ </f:facet>
+ <h:outputText value="#{car.mileage}" />
+ </tbl:column>
+ <tbl:column>
+ <f:facet name="header">
+ <h:outputText value="VIN Code" />
+ </f:facet>
+ <h:outputText value="#{car.vin}" />
+ </tbl:column>
+ <tbl:column>
+ <f:facet name="header">
+ <h:outputText value="Items stock" />
+ </f:facet>
+ <h:outputText value="#{car.stock}" />
+ </tbl:column>
+ <tbl:column>
+ <f:facet name="header">
+ <h:outputText value="Days Live" />
+ </f:facet>
+ <h:outputText value="#{car.daysLive}" />
+ </tbl:column>
+ </tbl:extendedDataTable>
+ <a4j:commandButton value="render" render="table" />
+ </h:form>
+</ui:composition>
+
+</html>
\ No newline at end of file
Modified: root/examples/richfaces-showcase/trunk/src/main/webapp/templates/main.xhtml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/templates/main.xhtml 2010-05-21 14:12:15 UTC (rev 17176)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/templates/main.xhtml 2010-05-21 14:24:08 UTC (rev 17177)
@@ -8,14 +8,9 @@
<ui:insert name="demoSampleParameters"/>
<h:head>
+ <title>Components Gallery</title>
</h:head>
<h:body>
- <ui:composition>
- <html xmlns="http://www.w3.org/1999/xhtml">
- <h:head>
- <title>Components Gallery</title>
- </h:head>
- <h:body>
<h:outputStylesheet name="rich/css/page.css" />
<table border="0" cellpadding="0" cellspacing="0"
class="rich-page #{cc.attrs.pageClass}">
@@ -63,9 +58,7 @@
</tr>
</tbody>
</table>
- </h:body>
- </html>
- </ui:composition>
-</h:body>
+
+</h:body>
</f:view>
</html>
\ No newline at end of file
14 years, 1 month