Author: alexsmirnov
Date: 2011-01-13 15:02:02 -0500 (Thu, 13 Jan 2011)
New Revision: 21010
Modified:
branches/RF-9797/
branches/RF-9797/cdk/attributes/src/main/resources/META-INF/cdk/attributes/javax.faces.component.UIComponent.xml
branches/RF-9797/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/RendererClassVisitor.java
branches/RF-9797/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/model/CdkObjectElement.java
branches/RF-9797/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/DefineObjectStatement.java
branches/RF-9797/cdk/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/ElementAdapterBase.java
branches/RF-9797/cdk/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/ElementBeanBase.java
branches/RF-9797/cdk/generator/src/main/resources/META-INF/schema/cdk-template.xsd
branches/RF-9797/cdk/generator/src/main/resources/META-INF/templates/java/define-object.ftl
branches/RF-9797/cdk/generator/src/test/java/org/richfaces/cdk/templatecompiler/statements/DefineObjectTest.java
branches/RF-9797/core/impl/src/main/java/org/richfaces/application/push/impl/jms/MessagingContext.java
branches/RF-9797/core/impl/src/main/java/org/richfaces/application/push/impl/jms/PushContextImpl.java
branches/RF-9797/core/impl/src/main/resources/META-INF/resources/skinning_classes.ecss
branches/RF-9797/examples/output-demo/src/main/webapp/examples/toolbar.xhtml
branches/RF-9797/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/samples/ajaxProgressBar-sample.xhtml
branches/RF-9797/ui/input/ui/src/main/java/org/richfaces/component/AbstractInplaceInput.java
branches/RF-9797/ui/input/ui/src/main/java/org/richfaces/renderkit/InplaceInputRendererBase.java
branches/RF-9797/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceSelect.js
branches/RF-9797/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/select.js
branches/RF-9797/ui/input/ui/src/main/templates/inplaceInput.template.xml
branches/RF-9797/ui/input/ui/src/main/templates/inplaceSelect.template.xml
branches/RF-9797/ui/input/ui/src/main/templates/input.template.inc
branches/RF-9797/ui/input/ui/src/main/templates/inputnumberslider.template.xml
branches/RF-9797/ui/input/ui/src/test/java/org/richfaces/renderkit/AutocompleteRendererTest.java
branches/RF-9797/ui/iteration/ui/src/main/java/org/richfaces/renderkit/AbstractRowsRenderer.java
branches/RF-9797/ui/iteration/ui/src/main/java/org/richfaces/renderkit/AbstractTableBaseRenderer.java
branches/RF-9797/ui/iteration/ui/src/main/java/org/richfaces/renderkit/ExtendedDataTableRenderer.java
branches/RF-9797/ui/iteration/ui/src/main/java/org/richfaces/renderkit/RowHolder.java
branches/RF-9797/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ToolbarRendererBase.java
Log:
Merged revisions 20981,20983,20991-20992,20995-21000,21002-21004 via svnmerge from
https://svn.jboss.org/repos/richfaces/trunk
.......
r20981 | abelevich | 2011-01-13 03:50:08 -0800 (Thu, 13 Jan 2011) | 2 lines
RF-9777 rich:dataTable Attributes columnClasses and headerClass not working
-rowClasses and columnClasses attribute were applied to ExtendedDataTable.
.......
r20983 | abelevich | 2011-01-13 05:45:42 -0800 (Thu, 13 Jan 2011) | 1 line
RF-9663 select: click to input field - should cause popup to be appeared.
.......
r20991 | nbelaevski | 2011-01-13 06:46:11 -0800 (Thu, 13 Jan 2011) | 1 line
https://issues.jboss.org/browse/RF-10198
.......
r20992 | nbelaevski | 2011-01-13 07:28:51 -0800 (Thu, 13 Jan 2011) | 1 line
https://issues.jboss.org/browse/RF-10191
.......
r20995 | konstantin.mishin | 2011-01-13 08:26:56 -0800 (Thu, 13 Jan 2011) | 1 line
RF-10095
.......
r20996 | abelevich | 2011-01-13 08:36:05 -0800 (Thu, 13 Jan 2011) | 2 lines
RF-9072 Unit tests development for autocomplete component
- waiting interval was prolonged.
.......
r20997 | abelevich | 2011-01-13 08:40:17 -0800 (Thu, 13 Jan 2011) | 1 line
RF-10096 Inline default values: input components III
.......
r20998 | konstantin.mishin | 2011-01-13 08:44:18 -0800 (Thu, 13 Jan 2011) | 1 line
RF-10095
.......
r20999 | artdaw | 2011-01-13 08:48:52 -0800 (Thu, 13 Jan 2011) | 1 line
RF-9817: bug with inplaceSelect width is fixed
.......
r21000 | nbelaevski | 2011-01-13 08:51:27 -0800 (Thu, 13 Jan 2011) | 1 line
https://issues.jboss.org/browse/RF-10060
.......
r21002 | artdaw | 2011-01-13 10:01:32 -0800 (Thu, 13 Jan 2011) | 1 line
RF-10182: class 'rf-tb-emp' for empty cell in Toolbar
.......
r21003 | artdaw | 2011-01-13 11:31:58 -0800 (Thu, 13 Jan 2011) | 1 line
RF-10210: Character entity reference is replaced with numeric
"\u00a0" since it brakes XHTML
.......
r21004 | alexsmirnov | 2011-01-13 11:45:26 -0800 (Thu, 13 Jan 2011) | 2 lines
RESOLVED - issue RF-9949: Faces-config: several components have attribute
actionExpression
https://issues.jboss.org/browse/RF-9949
.......
Property changes on: branches/RF-9797
___________________________________________________________________
Name: svnmerge-integrated
- /trunk:1-20978
+ /trunk:1-21009
Modified:
branches/RF-9797/cdk/attributes/src/main/resources/META-INF/cdk/attributes/javax.faces.component.UIComponent.xml
===================================================================
---
branches/RF-9797/cdk/attributes/src/main/resources/META-INF/cdk/attributes/javax.faces.component.UIComponent.xml 2011-01-13
19:52:30 UTC (rev 21009)
+++
branches/RF-9797/cdk/attributes/src/main/resources/META-INF/cdk/attributes/javax.faces.component.UIComponent.xml 2011-01-13
20:02:02 UTC (rev 21010)
@@ -180,5 +180,9 @@
<icon />
<property-name>binding</property-name>
<property-class>javax.faces.component.UIComponent</property-class>
+ <property-extension>
+ <cdk:generate>false</cdk:generate>
+ <cdk:literal>false</cdk:literal>
+ </property-extension>
</property>
</cdk:properties>
Modified:
branches/RF-9797/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/RendererClassVisitor.java
===================================================================
---
branches/RF-9797/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/RendererClassVisitor.java 2011-01-13
19:52:30 UTC (rev 21009)
+++
branches/RF-9797/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/RendererClassVisitor.java 2011-01-13
20:02:02 UTC (rev 21010)
@@ -540,7 +540,7 @@
}
String type = cdkObjectElement.getType();
DefineObjectStatement statement = addStatement(DefineObjectStatement.class);
- statement.setObject(name, type, value);
+ statement.setObject(name, type, value, cdkObjectElement.isCast());
}
/*
Modified:
branches/RF-9797/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/model/CdkObjectElement.java
===================================================================
---
branches/RF-9797/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/model/CdkObjectElement.java 2011-01-13
19:52:30 UTC (rev 21009)
+++
branches/RF-9797/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/model/CdkObjectElement.java 2011-01-13
20:02:02 UTC (rev 21010)
@@ -48,6 +48,9 @@
@XmlAttribute(required = true)
private String type;
+ @XmlAttribute
+ private boolean cast;
+
@XmlAttribute(name = "type-arguments")
private String typeArguments;
@@ -126,4 +129,12 @@
visitor.visitElement(this);
}
+ public void setCast(boolean cast) {
+ this.cast = cast;
+ }
+
+ public boolean isCast() {
+ return cast;
+ }
+
}
Modified:
branches/RF-9797/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/DefineObjectStatement.java
===================================================================
---
branches/RF-9797/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/DefineObjectStatement.java 2011-01-13
19:52:30 UTC (rev 21009)
+++
branches/RF-9797/cdk/generator/src/main/java/org/richfaces/cdk/templatecompiler/statements/DefineObjectStatement.java 2011-01-13
20:02:02 UTC (rev 21010)
@@ -44,6 +44,8 @@
private String name;
+ private boolean cast;
+
private final ELParser parser;
private final Logger log;
@@ -69,9 +71,10 @@
* the initializationExpression to set
* @throws ParsingException
*/
- public void setObject(String name, String type, String initializationExpression) {
+ public void setObject(String name, String type, String initializationExpression,
boolean cast) {
try {
this.name = name;
+ this.cast = cast;
if (!Strings.isEmpty(initializationExpression)) {
initializationStatement = parser.parse(initializationExpression, this,
TypesFactory.OBJECT_TYPE);
initializationStatement.setParent(this);
@@ -117,4 +120,8 @@
return null != initializationStatement ? Collections.<TemplateStatement>
singletonList(initializationStatement)
: Collections.<TemplateStatement> emptyList();
}
+
+ public boolean isCast() {
+ return cast;
+ }
}
Modified:
branches/RF-9797/cdk/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/ElementAdapterBase.java
===================================================================
---
branches/RF-9797/cdk/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/ElementAdapterBase.java 2011-01-13
19:52:30 UTC (rev 21009)
+++
branches/RF-9797/cdk/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/ElementAdapterBase.java 2011-01-13
20:02:02 UTC (rev 21010)
@@ -30,5 +30,8 @@
*/
public abstract class ElementAdapterBase<Bean extends ElementBeanBase, Model extends
BeanModelBase> extends AdapterBase<Bean, Model> {
+ protected void postMarshal(Model model, Bean bean) {
+ bean.setFilterHiddenAttributes(true);
+ };
}
Modified:
branches/RF-9797/cdk/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/ElementBeanBase.java
===================================================================
---
branches/RF-9797/cdk/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/ElementBeanBase.java 2011-01-13
19:52:30 UTC (rev 21009)
+++
branches/RF-9797/cdk/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/ElementBeanBase.java 2011-01-13
20:02:02 UTC (rev 21010)
@@ -35,6 +35,7 @@
/**
* TODO - is the tho different collections are necessary ?
+ *
* @author akolonitsky
* @since Mar 19, 2010
*/
@@ -55,29 +56,64 @@
}
};
+ private static final Predicate<PropertyBase> VISIBLE_PROPERTY_PREDICATE = new
Predicate<PropertyBase>() {
+ @Override
+ public boolean apply(PropertyBase input) {
+ if (input instanceof PropertyModel) {
+ return !input.isHidden();
+ }
+ return false;
+ }
+ };
+
+ private static final Predicate<PropertyBase> VISIBLE_ATTRIBUTE_PREDICATE = new
Predicate<PropertyBase>() {
+ @Override
+ public boolean apply(PropertyBase input) {
+ if (input instanceof AttributeModel) {
+ return !input.isHidden();
+ }
+ return false;
+ }
+ };
+
private Collection<? extends PropertyBase> attributes = Lists.newArrayList();
-
- private Collection<PropertyModel> properties =
(Collection<PropertyModel>) Collections2.filter(attributes, PROPERTY_PREDICATE);
- private Collection<AttributeModel> facesAttributes =
(Collection<AttributeModel>) Collections2.filter(attributes, ATTRIBUTE_PREDICATE);
+ private Collection<PropertyModel> properties =
(Collection<PropertyModel>) Collections2.filter(attributes,
+ PROPERTY_PREDICATE);
+ private Collection<AttributeModel> facesAttributes =
(Collection<AttributeModel>) Collections2.filter(attributes,
+ ATTRIBUTE_PREDICATE);
+
public Collection<PropertyModel> getProperties() {
return properties;
}
-
public Collection<AttributeModel> getFacesAttributes() {
return this.facesAttributes;
}
-
public Collection<PropertyBase> getAttributes() {
return (Collection<PropertyBase>) attributes;
}
- public void setAttributes(Collection<PropertyBase> attributes) {
- this.attributes = attributes;
- properties = (Collection<PropertyModel>)
Collections2.filter(this.attributes, PROPERTY_PREDICATE);
- facesAttributes = (Collection<AttributeModel>)
Collections2.filter(this.attributes, ATTRIBUTE_PREDICATE);
+ /**
+ * <p class="changed_added_4_0">Set filtering visible properties and
attributes, to unmarshall public properties only.</p>
+ * @param filter
+ */
+ public void setFilterHiddenAttributes(boolean filter) {
+ if (filter) {
+ properties = (Collection<PropertyModel>)
Collections2.filter(this.attributes, VISIBLE_PROPERTY_PREDICATE);
+ facesAttributes =
+ (Collection<AttributeModel>) Collections2.filter(this.attributes,
VISIBLE_ATTRIBUTE_PREDICATE);
+ } else {
+ properties = (Collection<PropertyModel>)
Collections2.filter(this.attributes, PROPERTY_PREDICATE);
+ facesAttributes = (Collection<AttributeModel>)
Collections2.filter(this.attributes, ATTRIBUTE_PREDICATE);
+ }
}
+
+ // public void setAttributes(Collection<PropertyBase> attributes) {
+ // this.attributes = attributes;
+ // properties = (Collection<PropertyModel>)
Collections2.filter(this.attributes, PROPERTY_PREDICATE);
+ // facesAttributes = (Collection<AttributeModel>)
Collections2.filter(this.attributes, ATTRIBUTE_PREDICATE);
+ // }
}
Modified:
branches/RF-9797/cdk/generator/src/main/resources/META-INF/schema/cdk-template.xsd
===================================================================
---
branches/RF-9797/cdk/generator/src/main/resources/META-INF/schema/cdk-template.xsd 2011-01-13
19:52:30 UTC (rev 21009)
+++
branches/RF-9797/cdk/generator/src/main/resources/META-INF/schema/cdk-template.xsd 2011-01-13
20:02:02 UTC (rev 21010)
@@ -531,6 +531,11 @@
</xs:documentation>
</xs:annotation>
</xs:attribute>
+ <xs:attribute type="xs:boolean" name="cast">
+ <xs:annotation>
+ <xs:documentation><p>Defines whether type cast is
needed.</p></xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
Modified:
branches/RF-9797/cdk/generator/src/main/resources/META-INF/templates/java/define-object.ftl
===================================================================
---
branches/RF-9797/cdk/generator/src/main/resources/META-INF/templates/java/define-object.ftl 2011-01-13
19:52:30 UTC (rev 21009)
+++
branches/RF-9797/cdk/generator/src/main/resources/META-INF/templates/java/define-object.ftl 2011-01-13
20:02:02 UTC (rev 21010)
@@ -1 +1 @@
-${type} ${name} <#if initializationStatement?exists> =
${initializationStatement}</#if>;
\ No newline at end of file
+${type} ${name} <#if initializationStatement?exists> = <#if
cast>(${type})</#if>${initializationStatement}</#if>;
\ No newline at end of file
Modified:
branches/RF-9797/cdk/generator/src/test/java/org/richfaces/cdk/templatecompiler/statements/DefineObjectTest.java
===================================================================
---
branches/RF-9797/cdk/generator/src/test/java/org/richfaces/cdk/templatecompiler/statements/DefineObjectTest.java 2011-01-13
19:52:30 UTC (rev 21009)
+++
branches/RF-9797/cdk/generator/src/test/java/org/richfaces/cdk/templatecompiler/statements/DefineObjectTest.java 2011-01-13
20:02:02 UTC (rev 21010)
@@ -25,7 +25,7 @@
public void testDefineVariable() throws Exception {
expect(typesFactory.getType("java.lang.String")).andReturn(TypesFactory.STRING_TYPE);
controller.replay();
- statement.setObject("foo","java.lang.String",null);
+ statement.setObject("foo","java.lang.String",null, false);
String code = statement.getCode();
controller.verify();
verifyCode(code, "String"," foo","!=");
@@ -41,9 +41,9 @@
expect(typesFactory.getType("java.lang.String")).andReturn(TypesFactory.STRING_TYPE);
parsedExpression.setParent(statement);expectLastCall();
controller.replay();
-
statement.setObject("foo","java.lang.String",HTTP_EXAMPLE_COM);
+
statement.setObject("foo","java.lang.String",HTTP_EXAMPLE_COM,
false);
String code = statement.getCode();
- verifyCode(code, HTTP_EXAMPLE_COM,"String","=");
+ verifyCode(code, HTTP_EXAMPLE_COM,"String","=",
"!(String)");
controller.verify();
}
@Test
@@ -55,9 +55,9 @@
expect(parsedExpression.getRequiredMethods()).andStubReturn(Collections.<HelperMethod>emptySet());
parsedExpression.setParent(statement);expectLastCall();
controller.replay();
- statement.setObject("foo",null,HTTP_EXAMPLE_COM);
+ statement.setObject("foo",null,HTTP_EXAMPLE_COM, true);
String code = statement.getCode();
- verifyCode(code, "Integer","foo","=");
+ verifyCode(code, "Integer","foo","=",
"(Integer)");
controller.verify();
}
Modified:
branches/RF-9797/core/impl/src/main/java/org/richfaces/application/push/impl/jms/MessagingContext.java
===================================================================
---
branches/RF-9797/core/impl/src/main/java/org/richfaces/application/push/impl/jms/MessagingContext.java 2011-01-13
19:52:30 UTC (rev 21009)
+++
branches/RF-9797/core/impl/src/main/java/org/richfaces/application/push/impl/jms/MessagingContext.java 2011-01-13
20:02:02 UTC (rev 21010)
@@ -115,7 +115,7 @@
}
public void stop() throws Exception {
- connection.stop();
+ connection.close();
connection = null;
}
Modified:
branches/RF-9797/core/impl/src/main/java/org/richfaces/application/push/impl/jms/PushContextImpl.java
===================================================================
---
branches/RF-9797/core/impl/src/main/java/org/richfaces/application/push/impl/jms/PushContextImpl.java 2011-01-13
19:52:30 UTC (rev 21009)
+++
branches/RF-9797/core/impl/src/main/java/org/richfaces/application/push/impl/jms/PushContextImpl.java 2011-01-13
20:02:02 UTC (rev 21010)
@@ -32,9 +32,9 @@
import javax.faces.event.PreDestroyApplicationEvent;
import javax.faces.event.SystemEvent;
import javax.faces.event.SystemEventListener;
-import javax.naming.CompositeName;
import javax.naming.InitialContext;
import javax.naming.Name;
+import javax.naming.NameParser;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -81,8 +81,11 @@
ConfigurationService configurationService =
ServiceTracker.getService(ConfigurationService.class);
InitialContext initialContext = new InitialContext();
- Name cnfName = new
CompositeName(configurationService.getStringValue(facesContext,
pushJMSConnectionFactory));
- Name topicsNamespace = new
CompositeName(configurationService.getStringValue(facesContext, pushJMSTopicsNamespace));
+
+ NameParser nameParser = initialContext.getNameParser("");
+
+ Name cnfName =
nameParser.parse(configurationService.getStringValue(facesContext,
pushJMSConnectionFactory));
+ Name topicsNamespace =
nameParser.parse(configurationService.getStringValue(facesContext,
pushJMSTopicsNamespace));
messagingContext = new MessagingContext(initialContext, cnfName,
topicsNamespace,
getApplicationName(facesContext),
Modified:
branches/RF-9797/core/impl/src/main/resources/META-INF/resources/skinning_classes.ecss
===================================================================
---
branches/RF-9797/core/impl/src/main/resources/META-INF/resources/skinning_classes.ecss 2011-01-13
19:52:30 UTC (rev 21009)
+++
branches/RF-9797/core/impl/src/main/resources/META-INF/resources/skinning_classes.ecss 2011-01-13
20:02:02 UTC (rev 21010)
@@ -311,53 +311,6 @@
color: '#{richSkin.selectControlColor}';
}
- /*gradient styles*/
-
-.rfs-gradient-header-inverse{
- background-image :
"url(#{resource['org.richfaces.renderkit.html.gradientimages.HeaderInverseGradientImage']})";
- background-repeat : repeat-x;
-}
-
-.rfs-gradient-header{
- background-image :
"url(#{resource['org.richfaces.renderkit.html.gradientimages.HeaderGradientImage']})";
- background-repeat : repeat-x;
-}
-
-.rfs-gradient-tab{
- background-image :
"url(#{resource['org.richfaces.renderkit.html.gradientimages.TabGradientImage']})";
- background-repeat : repeat-x;
-}
-
-.rfs-gradient-tab-inverse{
- background-image :
"url(#{resource['org.richfaces.renderkit.html.gradientimages.TabInverseGradientImage']})";
- background-repeat : repeat-x;
-}
-
-.rfs-gradient-input{
- background-image :
"url(#{resource['org.richfaces.renderkit.html.gradientimages.InputGradientImage']})";
- background-repeat : repeat-x;
-}
-
-.rfs-gradient-menu-inverse{
- background-image :
"url(#{resource['org.richfaces.renderkit.html.gradientimages.MenuInverseGradientImage']})";
- background-repeat : repeat-x;
-}
-
-.rfs-gradient-menu{
- background-image :
"url(#{resource['org.richfaces.renderkit.html.gradientimages.MenuGradientImage']})";
- background-repeat : repeat-x;
-}
-
-.rfs-gradient-btn-inverse{
- background-image :
"url(#{resource['org.richfaces.renderkit.html.gradientimages.ButtonInverseGradientImage']})";
- background-repeat : repeat-x;
-}
-
-.rfs-gradient-btn{
- background-image :
"url(#{resource['org.richfaces.renderkit.html.gradientimages.ButtonGradientImage']})";
- background-repeat : repeat-x;
-}
-
/* extended skinning styles */
.rfs-ctn input, .rfs-input,
Modified: branches/RF-9797/examples/output-demo/src/main/webapp/examples/toolbar.xhtml
===================================================================
---
branches/RF-9797/examples/output-demo/src/main/webapp/examples/toolbar.xhtml 2011-01-13
19:52:30 UTC (rev 21009)
+++
branches/RF-9797/examples/output-demo/src/main/webapp/examples/toolbar.xhtml 2011-01-13
20:02:02 UTC (rev 21010)
@@ -3,77 +3,86 @@
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
-
xmlns:tb="http://richfaces.org/output">
- <h:head>
- <title>toolbar sample</title>
- <style>
-
- </style>
- </h:head>
- <h:body>
- <tb:toolbar height="45" itemSeparator="grid"
itemStyle="color:red;" itemClass="custom-item">
+
xmlns:tb="http://richfaces.org/output"
xmlns:a4j="http://richfaces.org/a4j">
+<f:view contentType="application/xhtml+xml">
+<h:head>
+ <title>toolbar sample</title>
+ <style>
+
+ </style>
+</h:head>
+
+<h:body>
+ <tb:toolbar id="tb" height="45" itemSeparator="grid"
itemStyle="color:red;" itemClass="custom-item">
<f:facet name="itemSeparator">
||
- </f:facet>
- <tb:toolbarGroup itemStyle="border: 1px solid green"
itemClass="custom-item-group" itemSeparator="line"
onitemclick="22">
- <h:graphicImage value="/images/icons/create_doc.gif"/>
- <a href="#">link 1</a> Text
- <a href="#">link 2</a>
- <h:graphicImage value="/images/icons/create_folder.gif"
onclick="q1"/>
- <h:graphicImage value="/images/icons/copy.gif"/>
- <a href="#">link 3</a> Text
- <a href="#">link 4</a>
- </tb:toolbarGroup>
- <tb:toolbarGroup itemSeparator="none">
- <h:graphicImage value="/images/icons/save.gif"
onclick="q2"/>
- <h:graphicImage value="/images/icons/save.gif"
onclick="q2"/>
- <h:graphicImage value="/images/icons/save.gif"
onclick="q2"/>
- <h:graphicImage value="/images/icons/save.gif"
onclick="q2"/>
- </tb:toolbarGroup>
- <tb:toolbarGroup itemSeparator="line">
- <h:graphicImage value="/images/icons/save.gif"
onclick="q2"/>
- <h:graphicImage value="/images/icons/save.gif"
onclick="q2"/>
- </tb:toolbarGroup>
-
- <tb:toolbarGroup location="right"
itemSeparator="square">
- <h:graphicImage value="/images/icons/find.gif" />
- <h:graphicImage value="/images/icons/filter.gif" />
- </tb:toolbarGroup>
- </tb:toolbar>
- <br/>
- <tb:toolbar itemSeparator="grid" itemStyle="border: 1px solid
green" itemClass="custom-item">
- <tb:toolbarGroup itemSeparator="line" itemStyle="border: 1px
solid green" itemClass="custom-item-group">
- <h:graphicImage value="/images/icons/create_doc.gif"/>
- <h:graphicImage value="/images/icons/create_folder.gif"/>
- <h:graphicImage value="/images/icons/copy.gif"/>
- </tb:toolbarGroup>
- <tb:toolbarGroup itemSeparator="disc">
- <h:graphicImage value="/images/icons/save.gif"/>
- <h:graphicImage value="/images/icons/save_as.gif"/>
- <h:graphicImage value="/images/icons/save_all.gif"/>
- </tb:toolbarGroup>
- <tb:toolbarGroup location="right"
itemSeparator="square">
- <h:graphicImage value="/images/icons/find.gif"/>
- <h:graphicImage value="/images/icons/filter.gif"/>
- </tb:toolbarGroup>
- </tb:toolbar>
-
- <br/>
- <tb:toolbar height="26" itemSeparator="grid">
- <tb:toolbarGroup itemSeparator="line">
- <h:graphicImage value="/images/icons/create_doc.gif"/>
- <h:graphicImage value="/images/icons/create_folder.gif"/>
- <h:graphicImage value="/images/icons/copy.gif"/>
- </tb:toolbarGroup>
- <tb:toolbarGroup itemSeparator="disc">
- <h:graphicImage value="/images/icons/save.gif"/>
- <h:graphicImage value="/images/icons/save_as.gif"/>
- <h:graphicImage value="/images/icons/save_all.gif"/>
- </tb:toolbarGroup>
- <tb:toolbarGroup location="right"
itemSeparator="square">
- <h:graphicImage value="/images/icons/find.gif"/>
- <h:graphicImage value="/images/icons/filter.gif"/>
- </tb:toolbarGroup>
- </tb:toolbar>
- </h:body>
+ </f:facet>
+ <tb:toolbarGroup itemStyle="border: 1px solid green"
itemClass="custom-item-group" itemSeparator="line"
+ onitemclick="22">
+ <h:graphicImage value="/images/icons/create_doc.gif"/>
+ <a href="#">link 1</a> Text
+ <a href="#">link 2</a>
+ <h:graphicImage value="/images/icons/create_folder.gif"
onclick="q1"/>
+ <h:graphicImage value="/images/icons/copy.gif"/>
+ <a href="#">link 3</a> Text
+ <a href="#">link 4</a>
+ </tb:toolbarGroup>
+ <tb:toolbarGroup itemSeparator="none">
+ <h:graphicImage value="/images/icons/save.gif"
onclick="q2"/>
+ <h:graphicImage value="/images/icons/save.gif"
onclick="q2"/>
+ <h:graphicImage value="/images/icons/save.gif"
onclick="q2"/>
+ <h:graphicImage value="/images/icons/save.gif"
onclick="q2"/>
+ </tb:toolbarGroup>
+ <tb:toolbarGroup itemSeparator="line">
+ <h:graphicImage value="/images/icons/save.gif"
onclick="q2"/>
+ <h:graphicImage value="/images/icons/save.gif"
onclick="q2"/>
+ </tb:toolbarGroup>
+
+ <tb:toolbarGroup location="right"
itemSeparator="square">
+ <h:graphicImage value="/images/icons/find.gif"/>
+ <h:graphicImage value="/images/icons/filter.gif"/>
+ </tb:toolbarGroup>
+ </tb:toolbar>
+ <br/>
+ <tb:toolbar itemSeparator="grid" itemStyle="border: 1px solid
green" itemClass="custom-item">
+ <tb:toolbarGroup itemSeparator="line" itemStyle="border: 1px
solid green" itemClass="custom-item-group">
+ <h:graphicImage value="/images/icons/create_doc.gif"/>
+ <h:graphicImage value="/images/icons/create_folder.gif"/>
+ <h:graphicImage value="/images/icons/copy.gif"/>
+ </tb:toolbarGroup>
+ <tb:toolbarGroup itemSeparator="disc">
+ <h:graphicImage value="/images/icons/save.gif"/>
+ <h:graphicImage value="/images/icons/save_as.gif"/>
+ <h:graphicImage value="/images/icons/save_all.gif"/>
+ </tb:toolbarGroup>
+ <tb:toolbarGroup location="right"
itemSeparator="square">
+ <h:graphicImage value="/images/icons/find.gif"/>
+ <h:graphicImage value="/images/icons/filter.gif"/>
+ </tb:toolbarGroup>
+ </tb:toolbar>
+
+ <br/>
+ <tb:toolbar height="26" itemSeparator="grid">
+ <tb:toolbarGroup itemSeparator="line">
+ <h:graphicImage value="/images/icons/create_doc.gif"/>
+ <h:graphicImage value="/images/icons/create_folder.gif"/>
+ <h:graphicImage value="/images/icons/copy.gif"/>
+ </tb:toolbarGroup>
+ <tb:toolbarGroup itemSeparator="disc">
+ <h:graphicImage value="/images/icons/save.gif"/>
+ <h:graphicImage value="/images/icons/save_as.gif"/>
+ <h:graphicImage value="/images/icons/save_all.gif"/>
+ </tb:toolbarGroup>
+ <tb:toolbarGroup location="right"
itemSeparator="square">
+ <h:graphicImage value="/images/icons/find.gif"/>
+ <h:graphicImage value="/images/icons/filter.gif"/>
+ </tb:toolbarGroup>
+ </tb:toolbar>
+
+ <h:form>
+ <a4j:commandLink value="Ajax Rerender Toolbar" render="tb"
/>
+ <a4j:log />
+ </h:form>
+</h:body>
+</f:view>
</html>
\ No newline at end of file
Modified:
branches/RF-9797/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/samples/ajaxProgressBar-sample.xhtml
===================================================================
---
branches/RF-9797/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/samples/ajaxProgressBar-sample.xhtml 2011-01-13
19:52:30 UTC (rev 21009)
+++
branches/RF-9797/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/samples/ajaxProgressBar-sample.xhtml 2011-01-13
20:02:02 UTC (rev 21010)
@@ -22,7 +22,7 @@
<h:panelGroup>
<h:outputText value="Process Done" />
<a4j:commandButton action="#{progressBarBean.startProcess}"
- value="Restart Process" execute="@form"
+ value="Restart Process" execute="@form" render="pb"
rendered="#{progressBarBean.buttonRendered}"
style="margin: 9px 0px 5px;" />
</h:panelGroup>
Modified:
branches/RF-9797/ui/input/ui/src/main/java/org/richfaces/component/AbstractInplaceInput.java
===================================================================
---
branches/RF-9797/ui/input/ui/src/main/java/org/richfaces/component/AbstractInplaceInput.java 2011-01-13
19:52:30 UTC (rev 21009)
+++
branches/RF-9797/ui/input/ui/src/main/java/org/richfaces/component/AbstractInplaceInput.java 2011-01-13
20:02:02 UTC (rev 21010)
@@ -55,16 +55,16 @@
@Attribute(defaultValue="true")
public abstract boolean isSaveOnBlur();
- @Attribute(defaultValue="InplaceState.ready")
+ @Attribute()
public abstract InplaceState getState();
- @Attribute(defaultValue="click")
+ @Attribute()
public abstract String getEditEvent();
- @Attribute(defaultValue="false")
+ @Attribute()
public abstract boolean isShowControls();
- @Attribute(defaultValue="100%")
+ @Attribute()
public abstract String getInputWidth();
@Attribute
Modified:
branches/RF-9797/ui/input/ui/src/main/java/org/richfaces/renderkit/InplaceInputRendererBase.java
===================================================================
---
branches/RF-9797/ui/input/ui/src/main/java/org/richfaces/renderkit/InplaceInputRendererBase.java 2011-01-13
19:52:30 UTC (rev 21009)
+++
branches/RF-9797/ui/input/ui/src/main/java/org/richfaces/renderkit/InplaceInputRendererBase.java 2011-01-13
20:02:02 UTC (rev 21010)
@@ -127,7 +127,11 @@
}
public InplaceState getInplaceState(UIComponent component) {
- return ((InplaceComponent) component).getState();
+ InplaceState state = ((InplaceComponent) component).getState();
+ if (state == null) {
+ state = InplaceState.ready;
+ }
+ return state;
}
public String getValue(FacesContext facesContext, UIComponent component) throws
IOException {
@@ -197,4 +201,20 @@
String css = component.getNoneClass();
return concatClasses("rf-ii-none", css);
}
+
+ protected String getInputWidth(UIComponent component) {
+ String value = ((AbstractInplaceInput) component).getInputWidth();
+ if (value == null || "".equals(value)) {
+ value = "100%";
+ }
+ return value;
+ }
+
+ protected String getEditEvent(UIComponent component) {
+ String value = ((AbstractInplaceInput) component).getEditEvent();
+ if (value == null || "".equals(value)) {
+ value = "click";
+ }
+ return value;
+ }
}
Modified:
branches/RF-9797/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceSelect.js
===================================================================
---
branches/RF-9797/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceSelect.js 2011-01-13
19:52:30 UTC (rev 21009)
+++
branches/RF-9797/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceSelect.js 2011-01-13
20:02:02 UTC (rev 21010)
@@ -17,6 +17,10 @@
this.openOnEdit = mergedOptions.openOnEdit;
this.saveOnSelect = mergedOptions.saveOnSelect;
this.savedIndex = -1;
+
+ this.inputItem = $(document.getElementById(id + "Input"));
+ this.inputItemWidth = this.inputItem.width();
+ this.inputWidthDefined = options.inputWidth !== undefined;
}
rf.ui.InplaceInput.extend(rf.ui.InplaceSelect);
@@ -62,6 +66,7 @@
showPopup: function() {
this.popupList.show();
+ this.__hideLabel();
},
hidePopup: function() {
@@ -128,6 +133,7 @@
saveItemValue: function(value) {
this.selValueInput.val(value);
+ this.__showLabel();
},
getItemLabel: function(item) {
@@ -207,7 +213,21 @@
__onListMouseUp: function(e) {
this.isMouseDown = false;
this.__setInputFocus();
- }
+ },
+
+ __showLabel: function(e) {
+ this.label.show();
+ this.editContainer.css("position", "absolute");
+ this.inputItem.width(this.inputItemWidth);
+ },
+
+ __hideLabel: function(e) {
+ this.label.hide();
+ this.editContainer.css("position", "static");
+ if(!this.inputWidthDefined) {
+ this.inputItem.width(this.label.width());
+ }
+ }
}
})());
Modified:
branches/RF-9797/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/select.js
===================================================================
---
branches/RF-9797/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/select.js 2011-01-13
19:52:30 UTC (rev 21009)
+++
branches/RF-9797/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/select.js 2011-01-13
20:02:02 UTC (rev 21010)
@@ -117,6 +117,10 @@
this.btn = $(document.getElementById(id+"Button"));
this.btn.bind("mousedown", $.proxy(this.__onBtnMouseDown, this));
this.btn.bind("mouseup", $.proxy(this.__onMouseUp, this));
+
+ this.fld = $(document.getElementById(id+"Field"));
+ this.fld.bind("mousedown", $.proxy(this.__onBtnMouseDown, this));
+ this.fld.bind("mouseup", $.proxy(this.__onMouseUp, this));
}
this.selectFirst = mergedOptions.selectFirst;
Modified: branches/RF-9797/ui/input/ui/src/main/templates/inplaceInput.template.xml
===================================================================
--- branches/RF-9797/ui/input/ui/src/main/templates/inplaceInput.template.xml 2011-01-13
19:52:30 UTC (rev 21009)
+++ branches/RF-9797/ui/input/ui/src/main/templates/inplaceInput.template.xml 2011-01-13
20:02:02 UTC (rev 21010)
@@ -51,7 +51,7 @@
<input id="#{clientId}Focus" type="image"
style="position: absolute; top: 0px; left: 0px; outline-style: none;"
class="rf-ii-none"/>
<span id="#{clientId}Edit" class="#{getEditStyleClass(component,
inplaceState)}">
<input id="#{clientId}Input" autocomplete="off"
name="#{clientId}"
- type="text" value="#{getInputValue(facesContext,
component)}" class="rf-ii-fld" style="width:
#{component.attributes['inputWidth']};"
cdk:passThrough="tabindex">
+ type="text" value="#{getInputValue(facesContext,
component)}" class="rf-ii-fld" style="width:
#{getInputWidth(component)};" cdk:passThrough="tabindex">
<cdk:call expression="renderInputHandlers(facesContext,
component);"/>
</input>
<c:if test="#{component.attributes['showControls']}">
@@ -87,7 +87,8 @@
<cdk:scriptOption name="noneCss"
value="#{concatClasses('rf-ii-none',
component.attributes['noneStateClass'])}"/>
<cdk:scriptOption name="changedCss"
value="#{concatClasses('rf-ii-c-s',
component.attributes['changedStateClass'])}"/>
<cdk:scriptOption name="editCss"
value="#{concatClasses('rf-ii-e-s',
component.attributes['editStateClass'])}"/>
- <cdk:scriptOption attributes="editEvent state defaultLabel saveOnBlur
showControls" />
+ <cdk:scriptOption name="editEvent"
value="#{getEditEvent(component)}"/>
+ <cdk:scriptOption attributes="state defaultLabel saveOnBlur
showControls" />
<cdk:scriptOption attributes="onbegin oncomplete onerror
onbeforedomupdate onselectitem onchange onblur onfocus"
wrapper="eventHandler"/>
</cdk:scriptObject>
new RichFaces.ui.InplaceInput("#{clientId}", #{toScriptArgs(options)});
Modified: branches/RF-9797/ui/input/ui/src/main/templates/inplaceSelect.template.xml
===================================================================
--- branches/RF-9797/ui/input/ui/src/main/templates/inplaceSelect.template.xml 2011-01-13
19:52:30 UTC (rev 21009)
+++ branches/RF-9797/ui/input/ui/src/main/templates/inplaceSelect.template.xml 2011-01-13
20:02:02 UTC (rev 21010)
@@ -104,7 +104,7 @@
<cdk:scriptOption name="changedCss"
value="#{concatClasses('rf-is-c-s',
component.attributes['changedStateClass'])}"/>
<cdk:scriptOption name="editCss"
value="#{concatClasses('rf-is-e-s',
component.attributes['editStateClass'])}"/>
<cdk:scriptOption name="selectItemCss"
value="#{concatClasses('rf-is-sel',
component.attributes['selectItemClass'])}"/>
- <cdk:scriptOption attributes="editEvent state defaultLabel saveOnBlur
showControls openOnEdit saveOnSelect" />
+ <cdk:scriptOption attributes="editEvent state defaultLabel saveOnBlur
showControls openOnEdit saveOnSelect inputWidth" />
<cdk:scriptOption attributes="onbegin oncomplete onerror
onbeforedomupdate onselectitem onchange onblur onfocus"
wrapper="eventHandler"/>
</cdk:scriptObject>
new RichFaces.ui.InplaceSelect("#{clientId}", #{toScriptArgs(options)});
Modified: branches/RF-9797/ui/input/ui/src/main/templates/input.template.inc
===================================================================
--- branches/RF-9797/ui/input/ui/src/main/templates/input.template.inc 2011-01-13 19:52:30
UTC (rev 21009)
+++ branches/RF-9797/ui/input/ui/src/main/templates/input.template.inc 2011-01-13 20:02:02
UTC (rev 21010)
@@ -25,6 +25,7 @@
<span class="rf-insl-inp-cntr">
<input
xmlns:cdk="http://jboss.org/schema/richfaces/cdk/core"
name="#{clientId}" type="text"
class="rf-insl-inp #{component.attributes['inputClass']}"
value="#{getInputValue(facesContext, component)}"
- cdk:passThrough="accesskey disabled size:inputSize tabindex"
readonly="#{!component.attributes['enableManualInput']}"
- style="#{component.attributes['showInput'] ? null : 'display:
none;'}" maxlength="#{maxlength > 0 ? maxlength : null}"/>
+ cdk:passThrough="accesskey disabled tabindex"
readonly="#{!component.attributes['enableManualInput']}"
+ style="#{component.attributes['showInput'] ? null : 'display:
none;'}" maxlength="#{maxlength > 0 ? maxlength : null}"
+ size="#{inputSize > 0 ? inputSize : null}"/>
</span>
\ No newline at end of file
Modified: branches/RF-9797/ui/input/ui/src/main/templates/inputnumberslider.template.xml
===================================================================
---
branches/RF-9797/ui/input/ui/src/main/templates/inputnumberslider.template.xml 2011-01-13
19:52:30 UTC (rev 21009)
+++
branches/RF-9797/ui/input/ui/src/main/templates/inputnumberslider.template.xml 2011-01-13
20:02:02 UTC (rev 21010)
@@ -39,7 +39,8 @@
</cc:interface>
<cc:implementation>
<span id="#{clientId}" class="rf-insl
#{component.attributes['styleClass']}" cdk:passThroughWithExclusions="id
class">
- <cdk:call expression='int maxlength = (Integer)
component.getAttributes().get("maxlength");' />
+ <cdk:object name="maxlength" type="Integer"
cast="true" value="#{component.attributes['maxlength']}"
/>
+ <cdk:object name="inputSize" type="Integer"
cast="true" value="#{component.attributes['inputSize']}"
/>
<c:if test="#{isInputPosition(component, 'left') ||
isInputPosition(component, 'top')}">
<xi:include xpointer="xpointer(/*)" href="input.template.inc"
/>
<c:if test="#{isInputPosition(component, 'top') and
component.attributes['showInput']}">
Modified:
branches/RF-9797/ui/input/ui/src/test/java/org/richfaces/renderkit/AutocompleteRendererTest.java
===================================================================
---
branches/RF-9797/ui/input/ui/src/test/java/org/richfaces/renderkit/AutocompleteRendererTest.java 2011-01-13
19:52:30 UTC (rev 21009)
+++
branches/RF-9797/ui/input/ui/src/test/java/org/richfaces/renderkit/AutocompleteRendererTest.java 2011-01-13
20:02:02 UTC (rev 21010)
@@ -55,8 +55,8 @@
Assert.assertNotNull(input);
input.type("al");
- //try 5 times to wait .5 second each for filling the page.
- for (int i = 0; i < 5; i++) {
+ //try 7 times to wait .5 second each for filling the page.
+ for (int i = 0; i < 7; i++) {
synchronized (page) {
page.wait(500);
}
Modified:
branches/RF-9797/ui/iteration/ui/src/main/java/org/richfaces/renderkit/AbstractRowsRenderer.java
===================================================================
---
branches/RF-9797/ui/iteration/ui/src/main/java/org/richfaces/renderkit/AbstractRowsRenderer.java 2011-01-13
19:52:30 UTC (rev 21009)
+++
branches/RF-9797/ui/iteration/ui/src/main/java/org/richfaces/renderkit/AbstractRowsRenderer.java 2011-01-13
20:02:02 UTC (rev 21010)
@@ -34,6 +34,7 @@
import org.ajax4jsf.model.DataVisitResult;
import org.ajax4jsf.model.DataVisitor;
import org.richfaces.component.Row;
+import org.richfaces.component.UIDataTableBase;
/**
* @author Anton Belevich
@@ -109,4 +110,46 @@
protected void put(FacesContext context, String key, String value) {
context.getAttributes().put(key, value);
}
+
+ protected String[] getRowClasses(RowHolderBase rowHolder) {
+ String[] rowClasses = new String[0];
+ if (rowHolder.getRow() instanceof UIDataTableBase) {
+ String classes = ((UIDataTableBase)rowHolder.getRow()).getRowClasses();
+ if(null != classes){
+ rowClasses=classes.split(",");
+ }
+ }
+ return rowClasses;
+ }
+
+ protected String[] getColumnClasses(RowHolderBase rowHolder) {
+ String[] columnClasses = new String[0];
+ if (rowHolder.getRow() instanceof UIDataTableBase) {
+ String classes = ((UIDataTableBase)rowHolder.getRow()).getColumnClasses();
+ if(null != classes){
+ columnClasses=classes.split(",");
+ }
+ }
+ return columnClasses;
+ }
+
+ protected String getColumnClass(RowHolderBase rowHolder, int columnNumber) {
+ String styleClass = "";
+ String[] columnClasses = getColumnClasses(rowHolder);
+ if (columnClasses.length > columnNumber) {
+ styleClass = columnClasses[columnNumber];
+ }
+
+ return styleClass;
+ }
+
+ protected String getRowClass(RowHolderBase rowHolder) {
+ String styleClass = "";
+ String[] rowClasses = getRowClasses(rowHolder);
+ if (rowClasses.length > 0) {
+ int styleIndex = rowHolder.getCurrentRow() % rowClasses.length;
+ styleClass = rowClasses[styleIndex];
+ }
+ return styleClass;
+ }
}
Modified:
branches/RF-9797/ui/iteration/ui/src/main/java/org/richfaces/renderkit/AbstractTableBaseRenderer.java
===================================================================
---
branches/RF-9797/ui/iteration/ui/src/main/java/org/richfaces/renderkit/AbstractTableBaseRenderer.java 2011-01-13
19:52:30 UTC (rev 21009)
+++
branches/RF-9797/ui/iteration/ui/src/main/java/org/richfaces/renderkit/AbstractTableBaseRenderer.java 2011-01-13
20:02:02 UTC (rev 21010)
@@ -54,15 +54,6 @@
protected static final String CELL_CLASS_KEY = "cellClass";
- public String getColumnClass(RowHolder rowHolder, int columnNumber) {
- String styleClass = "";
- if (rowHolder.getColumnClasses().length > columnNumber) {
- styleClass = rowHolder.getColumnClasses()[columnNumber];
- }
-
- return styleClass;
- }
-
public void encodeColumn(FacesContext context, ResponseWriter writer, UIColumn
component, RowHolder rowHolder) throws IOException {
String parentId = rowHolder.getParentClientId();
@@ -77,9 +68,10 @@
if (rowHolder.isRowStart()) {
int currentRow = rowHolder.getCurrentRow();
- if (rowHolder.getRowClasses().length > 0) {
- int indeStyleClass = currentRow % rowHolder.getRowClasses().length;
- String rowClass = rowHolder.getRowClasses()[indeStyleClass];
+ String[] rowClasses = getRowClasses(rowHolder);
+ if (rowClasses.length > 0) {
+ int indeStyleClass = currentRow % rowClasses.length;
+ String rowClass = rowClasses[indeStyleClass];
component.getAttributes().put(ROW_CLASS, rowClass);
}
if (rowHolder.getCurrentRow() == 0) {
Modified:
branches/RF-9797/ui/iteration/ui/src/main/java/org/richfaces/renderkit/ExtendedDataTableRenderer.java
===================================================================
---
branches/RF-9797/ui/iteration/ui/src/main/java/org/richfaces/renderkit/ExtendedDataTableRenderer.java 2011-01-13
19:52:30 UTC (rev 21009)
+++
branches/RF-9797/ui/iteration/ui/src/main/java/org/richfaces/renderkit/ExtendedDataTableRenderer.java 2011-01-13
20:02:02 UTC (rev 21010)
@@ -759,6 +759,12 @@
RendererState state = (RendererState) rowHolder;
UIDataTableBase table = state.getRow();
writer.startElement(HtmlConstants.TR_ELEMENT, table);
+
+ String rowClass = getRowClass(rowHolder);
+ if (!"".equals(rowClass)) {
+ writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, rowClass, null);
+ }
+
StringBuilder builder = new StringBuilder();
Collection<Object> selection = table.getSelection();
if (selection != null && selection.contains(table.getRowKey())) {
@@ -784,10 +790,18 @@
writer.writeAttribute(HtmlConstants.ID_ATTRIBUTE,
table.getClientId(facesContext) + ":" + part.getName().getId(),
null);
columns = part.getColumns().iterator();
+ int columnNumber = 0;
while (columns.hasNext()) {
UIComponent column = (UIComponent) columns.next();
if (column.isRendered()) {
writer.startElement(HtmlConstants.TD_ELEM, table);
+
+ String columnClass = getColumnClass(rowHolder, columnNumber);
+ if (!"".equals(columnClass)) {
+ writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, columnClass,
null);
+ }
+ columnNumber++;
+
writer.startElement(HtmlConstants.DIV_ELEM, table);
writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-edt-c
rf-edt-c-"
+ column.getId(), null);
Modified:
branches/RF-9797/ui/iteration/ui/src/main/java/org/richfaces/renderkit/RowHolder.java
===================================================================
---
branches/RF-9797/ui/iteration/ui/src/main/java/org/richfaces/renderkit/RowHolder.java 2011-01-13
19:52:30 UTC (rev 21009)
+++
branches/RF-9797/ui/iteration/ui/src/main/java/org/richfaces/renderkit/RowHolder.java 2011-01-13
20:02:02 UTC (rev 21010)
@@ -25,7 +25,6 @@
import javax.faces.context.FacesContext;
import org.richfaces.component.Row;
-import org.richfaces.component.UIDataTableBase;
/**
* @author Anton Belevich
@@ -43,10 +42,6 @@
private boolean encodeParentTBody;
- private String[] rowClasses = new String[0];
-
- private String[] columnClasses = new String[0];
-
public RowHolder(FacesContext context, Row row) {
this(context, row, 0, true);
}
@@ -55,17 +50,6 @@
super(context);
this.row = row;
this.parentClientId = row.getClientId(context);
-
- if (row instanceof UIDataTableBase) {
- String classes = ((UIDataTableBase)row).getRowClasses();
- if(null != classes){
- rowClasses=classes.split(",");
- }
- classes = (String) ((UIDataTableBase)row).getColumnClasses();
- if(null != classes){
- columnClasses=classes.split(",");
- }
- }
}
public boolean isEncodeParentTBody() {
@@ -103,12 +87,4 @@
public void setRowStart(boolean isRowStart) {
this.isRowStart = isRowStart;
}
-
- public String[] getRowClasses() {
- return this.rowClasses;
- }
-
- public String[] getColumnClasses() {
- return this.columnClasses;
- }
}
Modified:
branches/RF-9797/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ToolbarRendererBase.java
===================================================================
---
branches/RF-9797/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ToolbarRendererBase.java 2011-01-13
19:52:30 UTC (rev 21009)
+++
branches/RF-9797/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ToolbarRendererBase.java 2011-01-13
20:02:02 UTC (rev 21010)
@@ -243,7 +243,8 @@
}
writer.startElement(HtmlConstants.TD_ELEM, component);
- writer.write(" ");
+ writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE,
concatClasses("rf-tb-emp", itemClass), null);
+ writer.writeText("\u00a0", null);
writer.endElement(HtmlConstants.TD_ELEM);
for (Iterator<UIComponent> it = childrenToTheRight.iterator();
it.hasNext();) {
@@ -325,7 +326,7 @@
String itemSeparatorClass = "rf-tb-sep-" +
separator.toString().toLowerCase();
writer.startElement(HtmlConstants.DIV_ELEM, component);
writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, itemSeparatorClass,
null);
- writer.write(" ");
+ writer.writeText("\u00a0", null);
writer.endElement(HtmlConstants.DIV_ELEM);
} else {