JBoss Rich Faces SVN: r21005 - branches/RF-9797.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2011-01-13 14:50:52 -0500 (Thu, 13 Jan 2011)
New Revision: 21005
Modified:
branches/RF-9797/
Log:
Removed merge tracking for "svnmerge" for
https://svn.jboss.org/repos/richfaces/branches/RF-7817
Property changes on: branches/RF-9797
___________________________________________________________________
Name: svnmerge-integrated
- /branches/RF-7817:1-19154 /branches/RF-8742:1-19867 /branches/RF-9309:1-19112,19378 /branches/RF-9323:1-20621
+ /branches/RF-8742:1-19867 /branches/RF-9309:1-19112,19378 /branches/RF-9323:1-20621
13 years, 11 months
JBoss Rich Faces SVN: r21004 - in trunk/cdk: generator/src/main/java/org/richfaces/cdk/xmlconfig/model and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2011-01-13 14:45:26 -0500 (Thu, 13 Jan 2011)
New Revision: 21004
Modified:
trunk/cdk/attributes/src/main/resources/META-INF/cdk/attributes/javax.faces.component.UIComponent.xml
trunk/cdk/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/ElementAdapterBase.java
trunk/cdk/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/ElementBeanBase.java
Log:
RESOLVED - issue RF-9949: Faces-config: several components have attribute actionExpression
https://issues.jboss.org/browse/RF-9949
Modified: trunk/cdk/attributes/src/main/resources/META-INF/cdk/attributes/javax.faces.component.UIComponent.xml
===================================================================
--- trunk/cdk/attributes/src/main/resources/META-INF/cdk/attributes/javax.faces.component.UIComponent.xml 2011-01-13 19:31:58 UTC (rev 21003)
+++ trunk/cdk/attributes/src/main/resources/META-INF/cdk/attributes/javax.faces.component.UIComponent.xml 2011-01-13 19:45:26 UTC (rev 21004)
@@ -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: trunk/cdk/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/ElementAdapterBase.java
===================================================================
--- trunk/cdk/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/ElementAdapterBase.java 2011-01-13 19:31:58 UTC (rev 21003)
+++ trunk/cdk/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/ElementAdapterBase.java 2011-01-13 19:45:26 UTC (rev 21004)
@@ -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: trunk/cdk/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/ElementBeanBase.java
===================================================================
--- trunk/cdk/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/ElementBeanBase.java 2011-01-13 19:31:58 UTC (rev 21003)
+++ trunk/cdk/generator/src/main/java/org/richfaces/cdk/xmlconfig/model/ElementBeanBase.java 2011-01-13 19:45:26 UTC (rev 21004)
@@ -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);
+ // }
}
13 years, 11 months
JBoss Rich Faces SVN: r21003 - in trunk: ui/output/ui/src/main/java/org/richfaces/renderkit/html and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2011-01-13 14:31:58 -0500 (Thu, 13 Jan 2011)
New Revision: 21003
Modified:
trunk/examples/output-demo/src/main/webapp/examples/toolbar.xhtml
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ToolbarRendererBase.java
Log:
RF-10210: Character entity reference is replaced with numeric "\u00a0" since it brakes XHTML
Modified: trunk/examples/output-demo/src/main/webapp/examples/toolbar.xhtml
===================================================================
--- trunk/examples/output-demo/src/main/webapp/examples/toolbar.xhtml 2011-01-13 18:01:32 UTC (rev 21002)
+++ trunk/examples/output-demo/src/main/webapp/examples/toolbar.xhtml 2011-01-13 19:31:58 UTC (rev 21003)
@@ -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: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ToolbarRendererBase.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ToolbarRendererBase.java 2011-01-13 18:01:32 UTC (rev 21002)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ToolbarRendererBase.java 2011-01-13 19:31:58 UTC (rev 21003)
@@ -244,7 +244,7 @@
writer.startElement(HtmlConstants.TD_ELEM, component);
writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, concatClasses("rf-tb-emp", itemClass), null);
- writer.write(" ");
+ writer.writeText("\u00a0", null);
writer.endElement(HtmlConstants.TD_ELEM);
for (Iterator<UIComponent> it = childrenToTheRight.iterator(); it.hasNext();) {
@@ -326,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 {
13 years, 11 months
JBoss Rich Faces SVN: r21002 - trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2011-01-13 13:01:32 -0500 (Thu, 13 Jan 2011)
New Revision: 21002
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ToolbarRendererBase.java
Log:
RF-10182: class 'rf-tb-emp' for empty cell in Toolbar
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ToolbarRendererBase.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ToolbarRendererBase.java 2011-01-13 17:12:46 UTC (rev 21001)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ToolbarRendererBase.java 2011-01-13 18:01:32 UTC (rev 21002)
@@ -243,6 +243,7 @@
}
writer.startElement(HtmlConstants.TD_ELEM, component);
+ writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, concatClasses("rf-tb-emp", itemClass), null);
writer.write(" ");
writer.endElement(HtmlConstants.TD_ELEM);
13 years, 11 months
JBoss Rich Faces SVN: r21001 - in modules/tests/metamer/trunk: application/src/main/webapp/components/richProgressBar and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-01-13 12:12:46 -0500 (Thu, 13 Jan 2011)
New Revision: 21001
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanel/simple.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richProgressBar/ajaxMode.xhtml
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richToolbar/TestRichToolbar.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richToolbarGroup/TestRichToolbarGroup.java
Log:
* minor fixes and refactoring
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richPanel/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richPanel/simple.xhtml 2011-01-13 16:51:27 UTC (rev 21000)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richPanel/simple.xhtml 2011-01-13 17:12:46 UTC (rev 21001)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
@@ -61,7 +61,8 @@
onmouseup="#{richPanelBean.attributes['onmouseup'].value}"
rendered="#{richPanelBean.attributes['rendered'].value}"
style="#{richPanelBean.attributes['style'].value}"
- styleClass="#{richPanelBean.attributes['styleClass'].value}">
+ styleClass="#{richPanelBean.attributes['styleClass'].value}"
+ title="#{richPanelBean.attributes['title'].value}">
<f:facet name="header">header of panel</f:facet>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus a neque turpis, at cursus nunc.
@@ -98,7 +99,8 @@
onmouseup="#{richPanelBean.attributes['onmouseup'].value}"
rendered="#{richPanelBean.attributes['rendered'].value}"
style="#{richPanelBean.attributes['style'].value}"
- styleClass="#{richPanelBean.attributes['styleClass'].value}">
+ styleClass="#{richPanelBean.attributes['styleClass'].value}"
+ title="#{richPanelBean.attributes['title'].value}">
Nulla ornare suscipit urna, eu adipiscing sapien interdum ut. Aenean quis lectus sed eros congue imperdiet.
Duis feugiat eros leo. Aenean orci orci, facilisis vel gravida condimentum, scelerisque et libero. Nullam
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richProgressBar/ajaxMode.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richProgressBar/ajaxMode.xhtml 2011-01-13 16:51:27 UTC (rev 21000)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richProgressBar/ajaxMode.xhtml 2011-01-13 17:12:46 UTC (rev 21001)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
@@ -75,6 +75,7 @@
<a4j:commandButton id="startButton"
action="#{richProgressBarBean.startProcess}"
value="Start Process" execute="@form"
+ render="progressBar"
rendered="#{richProgressBarBean.buttonRendered}"
style="margin: 9px 0px 5px;" />
</f:facet>
@@ -84,6 +85,7 @@
<a4j:commandButton id="restartButton"
action="#{richProgressBarBean.startProcess}"
value="Restart Process" execute="@form"
+ render="progressBar"
rendered="#{richProgressBarBean.buttonRendered}"
style="margin: 9px 0px 5px;" />
</f:facet>
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richToolbar/TestRichToolbar.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richToolbar/TestRichToolbar.java 2011-01-13 16:51:27 UTC (rev 21000)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richToolbar/TestRichToolbar.java 2011-01-13 17:12:46 UTC (rev 21001)
@@ -95,8 +95,7 @@
@Test
@Use(field = "itemSeparator", value = "separators")
public void testItemSeparatorCorrect() {
- JQueryLocator input = pjq("select[id$=itemSeparatorInput]");
- selenium.select(input, optionLabel(itemSeparator));
+ selenium.select(pjq("select[id$=itemSeparatorInput]"), optionLabel(itemSeparator));
selenium.waitForPageToLoad();
JQueryLocator separatorDiv = separator.getDescendant(jq("div.rf-tb-sep-" + itemSeparator));
@@ -121,8 +120,7 @@
@Test
public void testItemSeparatorCustom() {
- JQueryLocator input = pjq("select[id$=itemSeparatorInput]");
- selenium.select(input, optionLabel("star"));
+ selenium.select(pjq("select[id$=itemSeparatorInput]"), optionLabel("star"));
selenium.waitForPageToLoad();
JQueryLocator separatorImg = separator.getDescendant(jq("> img"));
@@ -137,8 +135,7 @@
@Test
public void testItemSeparatorNonExisting() {
- JQueryLocator input = pjq("select[id$=itemSeparatorInput]");
- selenium.select(input, optionLabel("non-existing"));
+ selenium.select(pjq("select[id$=itemSeparatorInput]"), optionLabel("non-existing"));
selenium.waitForPageToLoad();
JQueryLocator separatorImg = separator.getDescendant(jq("> img"));
@@ -219,8 +216,7 @@
@Test
public void testRendered() {
- JQueryLocator input = pjq("input[type=radio][name$=renderedInput][value=false]");
- selenium.click(input);
+ selenium.click(pjq("input[type=radio][name$=renderedInput][value=false]"));
selenium.waitForPageToLoad();
assertFalse(selenium.isElementPresent(toolbar), "Toolbar should not be rendered when rendered=false.");
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richToolbarGroup/TestRichToolbarGroup.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richToolbarGroup/TestRichToolbarGroup.java 2011-01-13 16:51:27 UTC (rev 21000)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richToolbarGroup/TestRichToolbarGroup.java 2011-01-13 17:12:46 UTC (rev 21001)
@@ -244,15 +244,14 @@
@Test
public void testRendered() {
- JQueryLocator renderedInput = pjq("input[type=radio][name$=renderedInput][value=false]");
- selenium.click(renderedInput);
+ selenium.click(pjq("input[type=radio][name$=renderedInput][value=false]"));
selenium.waitForPageToLoad();
assertTrue(selenium.isElementPresent(toolbar), "Toolbar should be present on the page.");
assertTrue(selenium.isVisible(toolbar), "Toolbar should be visible.");
assertFalse(selenium.isElementPresent(separator), "No item separator should be present on the page.");
- assertTrue(selenium.isElementPresent(renderedInput), "Input should be present on the page.");
- assertTrue(selenium.isVisible(renderedInput), "Input should be visible.");
+ assertTrue(selenium.isElementPresent(input), "Input should be present on the page.");
+ assertTrue(selenium.isVisible(input), "Input should be visible.");
assertTrue(selenium.isElementPresent(button), "Button should be present on the page.");
assertTrue(selenium.isVisible(button), "Button should be visible.");
13 years, 11 months
JBoss Rich Faces SVN: r21000 - trunk/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/samples.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2011-01-13 11:51:27 -0500 (Thu, 13 Jan 2011)
New Revision: 21000
Modified:
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/samples/ajaxProgressBar-sample.xhtml
Log:
https://issues.jboss.org/browse/RF-10060
Modified: trunk/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/samples/ajaxProgressBar-sample.xhtml
===================================================================
--- trunk/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/samples/ajaxProgressBar-sample.xhtml 2011-01-13 16:48:52 UTC (rev 20999)
+++ trunk/examples/richfaces-showcase/src/main/webapp/richfaces/progressBar/samples/ajaxProgressBar-sample.xhtml 2011-01-13 16:51:27 UTC (rev 21000)
@@ -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>
13 years, 11 months
JBoss Rich Faces SVN: r20999 - in trunk/ui/input/ui/src/main: templates and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2011-01-13 11:48:52 -0500 (Thu, 13 Jan 2011)
New Revision: 20999
Modified:
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceSelect.js
trunk/ui/input/ui/src/main/templates/inplaceSelect.template.xml
Log:
RF-9817: bug with inplaceSelect width is fixed
Modified: trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceSelect.js
===================================================================
--- trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceSelect.js 2011-01-13 16:44:18 UTC (rev 20998)
+++ trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceSelect.js 2011-01-13 16:48:52 UTC (rev 20999)
@@ -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: trunk/ui/input/ui/src/main/templates/inplaceSelect.template.xml
===================================================================
--- trunk/ui/input/ui/src/main/templates/inplaceSelect.template.xml 2011-01-13 16:44:18 UTC (rev 20998)
+++ trunk/ui/input/ui/src/main/templates/inplaceSelect.template.xml 2011-01-13 16:48:52 UTC (rev 20999)
@@ -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)});
13 years, 11 months
JBoss Rich Faces SVN: r20998 - trunk/cdk/generator/src/test/java/org/richfaces/cdk/templatecompiler/statements.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2011-01-13 11:44:18 -0500 (Thu, 13 Jan 2011)
New Revision: 20998
Modified:
trunk/cdk/generator/src/test/java/org/richfaces/cdk/templatecompiler/statements/DefineObjectTest.java
Log:
RF-10095
Modified: trunk/cdk/generator/src/test/java/org/richfaces/cdk/templatecompiler/statements/DefineObjectTest.java
===================================================================
--- trunk/cdk/generator/src/test/java/org/richfaces/cdk/templatecompiler/statements/DefineObjectTest.java 2011-01-13 16:40:17 UTC (rev 20997)
+++ trunk/cdk/generator/src/test/java/org/richfaces/cdk/templatecompiler/statements/DefineObjectTest.java 2011-01-13 16:44:18 UTC (rev 20998)
@@ -43,7 +43,7 @@
controller.replay();
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, false);
+ statement.setObject("foo",null,HTTP_EXAMPLE_COM, true);
String code = statement.getCode();
- verifyCode(code, "Integer","foo","=");
+ verifyCode(code, "Integer","foo","=", "(Integer)");
controller.verify();
}
13 years, 11 months
JBoss Rich Faces SVN: r20997 - in trunk/ui/input/ui/src/main: java/org/richfaces/renderkit and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2011-01-13 11:40:17 -0500 (Thu, 13 Jan 2011)
New Revision: 20997
Modified:
trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractInplaceInput.java
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/InplaceInputRendererBase.java
trunk/ui/input/ui/src/main/templates/inplaceInput.template.xml
Log:
RF-10096 Inline default values: input components III
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractInplaceInput.java
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractInplaceInput.java 2011-01-13 16:36:05 UTC (rev 20996)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractInplaceInput.java 2011-01-13 16:40:17 UTC (rev 20997)
@@ -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: trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/InplaceInputRendererBase.java
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/InplaceInputRendererBase.java 2011-01-13 16:36:05 UTC (rev 20996)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/InplaceInputRendererBase.java 2011-01-13 16:40:17 UTC (rev 20997)
@@ -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: trunk/ui/input/ui/src/main/templates/inplaceInput.template.xml
===================================================================
--- trunk/ui/input/ui/src/main/templates/inplaceInput.template.xml 2011-01-13 16:36:05 UTC (rev 20996)
+++ trunk/ui/input/ui/src/main/templates/inplaceInput.template.xml 2011-01-13 16:40:17 UTC (rev 20997)
@@ -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)});
13 years, 11 months
JBoss Rich Faces SVN: r20996 - trunk/ui/input/ui/src/test/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2011-01-13 11:36:05 -0500 (Thu, 13 Jan 2011)
New Revision: 20996
Modified:
trunk/ui/input/ui/src/test/java/org/richfaces/renderkit/AutocompleteRendererTest.java
Log:
RF-9072 Unit tests development for autocomplete component
- waiting interval was prolonged.
Modified: trunk/ui/input/ui/src/test/java/org/richfaces/renderkit/AutocompleteRendererTest.java
===================================================================
--- trunk/ui/input/ui/src/test/java/org/richfaces/renderkit/AutocompleteRendererTest.java 2011-01-13 16:26:56 UTC (rev 20995)
+++ trunk/ui/input/ui/src/test/java/org/richfaces/renderkit/AutocompleteRendererTest.java 2011-01-13 16:36:05 UTC (rev 20996)
@@ -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);
}
13 years, 11 months