JBoss Rich Faces SVN: r22170 - in branches/4.0.X/ui/iteration/ui/src: test/java/org/richfaces/component and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2011-03-11 10:36:17 -0500 (Fri, 11 Mar 2011)
New Revision: 22170
Added:
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/component/DataTableDataChilderIterator.java
Removed:
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/component/DataTableDataIterator.java
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/component/DataTableIteratorBase.java
branches/4.0.X/ui/iteration/ui/src/test/java/org/richfaces/component/IteratorBaseTest.java
Modified:
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/component/DataTableColumnsIterator.java
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/component/DataTableFixedChildrenIterator.java
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/component/UIDataTableBase.java
branches/4.0.X/ui/iteration/ui/src/test/java/org/richfaces/component/UIDataTableTest.java
Log:
https://issues.jboss.org/browse/RF-10734
Reviewed by Konstantin
Modified: branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/component/DataTableColumnsIterator.java
===================================================================
--- branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/component/DataTableColumnsIterator.java 2011-03-11 15:36:16 UTC (rev 22169)
+++ branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/component/DataTableColumnsIterator.java 2011-03-11 15:36:17 UTC (rev 22170)
@@ -24,34 +24,38 @@
import java.util.Iterator;
+import javax.faces.component.UIColumn;
import javax.faces.component.UIComponent;
+import com.google.common.collect.AbstractIterator;
+
/**
* Iterator for all children table columns.
*
* @author asmirnov
*
*/
-class DataTableColumnsIterator extends DataTableIteratorBase<UIComponent> {
+class DataTableColumnsIterator extends AbstractIterator<UIComponent> {
- protected Iterator<UIComponent> childrenIterator;
-
- public DataTableColumnsIterator(UIComponent dataTable) {
- this.childrenIterator = dataTable.getChildren().iterator();
+ private Iterator<UIComponent> childrenIterator;
+
+ public DataTableColumnsIterator(UIComponent component) {
+ super();
+ this.childrenIterator = component.getChildren().iterator();
}
- protected UIComponent nextItem() {
- while (childrenIterator != null && childrenIterator.hasNext()) {
+ @Override
+ protected UIComponent computeNext() {
+ while (childrenIterator.hasNext()) {
UIComponent child = childrenIterator.next();
- if (child instanceof javax.faces.component.UIColumn || child instanceof Column) {
+
+ if (child instanceof UIColumn || child instanceof Column) {
return child;
}
}
-
- // TODO nick - free childrenIterator field
-
- return null;
+
+ return endOfData();
}
-
+
}
Added: branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/component/DataTableDataChilderIterator.java
===================================================================
--- branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/component/DataTableDataChilderIterator.java (rev 0)
+++ branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/component/DataTableDataChilderIterator.java 2011-03-11 15:36:17 UTC (rev 22170)
@@ -0,0 +1,69 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.richfaces.component;
+
+import java.util.Iterator;
+
+import javax.faces.component.UIColumn;
+import javax.faces.component.UIComponent;
+
+import com.google.common.collect.AbstractIterator;
+import com.google.common.collect.Iterators;
+
+/**
+ * @author Nick Belaevski
+ *
+ */
+class DataTableDataChilderIterator extends AbstractIterator<UIComponent> {
+
+ private Iterator<UIComponent> dataTableChildren;
+
+ private Iterator<UIComponent> columnChildren = Iterators.emptyIterator();
+
+ public DataTableDataChilderIterator(UIComponent dataTable) {
+ super();
+ this.dataTableChildren = dataTable.getChildren().iterator();
+ }
+
+ @Override
+ protected UIComponent computeNext() {
+ while (columnChildren.hasNext() || dataTableChildren.hasNext()) {
+ if (columnChildren.hasNext()) {
+ return columnChildren.next();
+ }
+
+ UIComponent child = dataTableChildren.next();
+ if (child instanceof UIColumn || child instanceof AbstractColumn) {
+ columnChildren = child.getChildren().iterator();
+ } else {
+ columnChildren = Iterators.emptyIterator();
+ return child;
+ }
+ }
+
+ dataTableChildren = Iterators.emptyIterator();
+ columnChildren = Iterators.emptyIterator();
+
+ return endOfData();
+ }
+
+}
Deleted: branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/component/DataTableDataIterator.java
===================================================================
--- branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/component/DataTableDataIterator.java 2011-03-11 15:36:16 UTC (rev 22169)
+++ branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/component/DataTableDataIterator.java 2011-03-11 15:36:17 UTC (rev 22170)
@@ -1,71 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright ${year}, Red Hat, Inc. and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.richfaces.component;
-
-import java.util.Iterator;
-
-import javax.faces.component.UIColumn;
-import javax.faces.component.UIComponent;
-
-
-class DataTableDataIterator extends DataTableIteratorBase<UIComponent> {
-
- private Iterator<UIComponent> facetsIterator;
-
- private Iterator<UIComponent> childrenIterator;
-
- public DataTableDataIterator(UIDataTableBase dataTable) {
- this.childrenIterator = dataTable.getChildren().iterator();
- this.facetsIterator = dataTable.getFacets().values().iterator();
- }
-
- protected UIComponent nextItem() {
-
- UIComponent nextColumn = null;
- while (nextColumn == null && childrenIterator.hasNext()) {
- UIComponent child = childrenIterator.next();
- if ((child instanceof UIColumn) || (child instanceof Column)) {
- nextColumn = child;
- }
- }
-
- // TODO nick - free childrenIterator
-
- while (nextColumn == null && facetsIterator.hasNext()) {
- nextColumn = facetsIterator.next();
- }
-
- // TODO nick - free facetsIterator
-
- return nextColumn;
- }
-
- protected Iterator<UIComponent> getFacetsIterator() {
- return this.facetsIterator;
- }
-
- protected Iterator<UIComponent> getChildrenIterator() {
- return this.childrenIterator;
- }
-
-}
Modified: branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/component/DataTableFixedChildrenIterator.java
===================================================================
--- branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/component/DataTableFixedChildrenIterator.java 2011-03-11 15:36:16 UTC (rev 22169)
+++ branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/component/DataTableFixedChildrenIterator.java 2011-03-11 15:36:17 UTC (rev 22170)
@@ -27,56 +27,45 @@
import javax.faces.component.UIColumn;
import javax.faces.component.UIComponent;
+import com.google.common.collect.AbstractIterator;
+import com.google.common.collect.Iterators;
-class DataTableFixedChildrenIterator extends DataTableDataIterator {
- private Iterator<UIComponent> currentColumnIterator;
+class DataTableFixedChildrenIterator extends AbstractIterator<UIComponent> {
- public DataTableFixedChildrenIterator(UIDataTableBase dataTable) {
- super(dataTable);
+ private Iterator<UIComponent> facetsIterator;
+
+ private Iterator<UIComponent> dataTableChildren;
+
+ private Iterator<UIComponent> columnFacets = Iterators.emptyIterator();
+
+ public DataTableFixedChildrenIterator(UIComponent dataTable) {
+ super();
+
+ this.facetsIterator = dataTable.getFacets().values().iterator();
+ this.dataTableChildren = dataTable.getChildren().iterator();
}
- protected UIComponent nextItem() {
- UIComponent next = null;
-
- if (currentColumnIterator != null && currentColumnIterator.hasNext()) {
- next = currentColumnIterator.next();
- checkColumnIterator();
+ @Override
+ protected UIComponent computeNext() {
+ if (facetsIterator.hasNext()) {
+ return facetsIterator.next();
}
-
- if (next == null) {
- Iterator<UIComponent> childrenIterator = getChildrenIterator();
- while (next == null && childrenIterator.hasNext()) {
- UIComponent child = childrenIterator.next();
- if ((child instanceof UIColumn) && child.isRendered()) {
- currentColumnIterator = getChildFacetIterator(child);
- next = nextItem();
- }
+
+ while (columnFacets.hasNext() || dataTableChildren.hasNext()) {
+ if (columnFacets.hasNext()) {
+ return columnFacets.next();
}
+
+ UIComponent child = dataTableChildren.next();
+ if (child instanceof UIColumn || child instanceof AbstractColumn) {
+ columnFacets = child.getFacets().values().iterator();
+ }
}
- if (next == null) {
- next = getNextFacet();
- }
- return next;
- }
+ dataTableChildren = Iterators.emptyIterator();
+ columnFacets = Iterators.emptyIterator();
- protected UIComponent getNextFacet() {
- Iterator<UIComponent> facetsIterator = getFacetsIterator();
- if(facetsIterator.hasNext()) {
- return facetsIterator.next();
- }
- return null;
+ return endOfData();
}
-
- protected void checkColumnIterator() {
- if (!currentColumnIterator.hasNext()) {
- currentColumnIterator = null;
- }
- }
-
- protected Iterator<UIComponent> getChildFacetIterator(UIComponent component) {
- return component.getFacets().values().iterator();
- }
-
}
Deleted: branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/component/DataTableIteratorBase.java
===================================================================
--- branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/component/DataTableIteratorBase.java 2011-03-11 15:36:16 UTC (rev 22169)
+++ branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/component/DataTableIteratorBase.java 2011-03-11 15:36:17 UTC (rev 22170)
@@ -1,72 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright ${year}, Red Hat, Inc. and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.richfaces.component;
-
-import java.util.Iterator;
-import java.util.NoSuchElementException;
-
-/**
- * @author Anton Belevich
- * @author Nick Belaevski
- */
-public abstract class DataTableIteratorBase<E> implements Iterator<E> {
-
- private boolean isCompleted = false;
-
- private E next = null;
-
- private void setupNext() {
- if (!isCompleted) {
- if (next == null) {
- next = nextItem();
-
- if (next == null) {
- isCompleted = true;
- }
- }
- }
- }
-
- public boolean hasNext() {
- setupNext();
-
- return next != null;
- }
-
- public E next() {
- setupNext();
-
- if (next == null) {
- throw new NoSuchElementException();
- }
-
- E result = next;
- next = null;
- return result;
- }
-
- public void remove() {
- throw new UnsupportedOperationException("Iterator is read-only");
- }
-
- protected abstract E nextItem();
-}
Modified: branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/component/UIDataTableBase.java
===================================================================
--- branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/component/UIDataTableBase.java 2011-03-11 15:36:16 UTC (rev 22169)
+++ branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/component/UIDataTableBase.java 2011-03-11 15:36:17 UTC (rev 22170)
@@ -32,7 +32,6 @@
import java.util.Map;
import java.util.Set;
-import javax.faces.component.UIColumn;
import javax.faces.component.UIComponent;
import javax.faces.component.visit.VisitCallback;
import javax.faces.component.visit.VisitContext;
@@ -42,7 +41,6 @@
import javax.faces.event.PhaseId;
import javax.faces.event.PreRenderComponentEvent;
-import org.ajax4jsf.component.IterationStateHolder;
import org.ajax4jsf.model.DataVisitor;
import org.ajax4jsf.model.ExtendedDataModel;
import org.ajax4jsf.model.Range;
@@ -173,7 +171,7 @@
}
protected Iterator<UIComponent> dataChildren() {
- return new DataTableDataIterator(this);
+ return new DataTableDataChilderIterator(this);
}
public boolean isColumnFacetPresent(String facetName) {
@@ -394,50 +392,4 @@
return SUPPORTED_META_COMPONENTS;
}
- private boolean isStateful(UIComponent component) {
- if (component instanceof IterationStateHolder) {
- return true;
- }
-
- if (component instanceof UIColumn || component instanceof Column) {
- return false;
- }
-
- return true;
- }
-
- @Override
- protected void saveChildState(FacesContext facesContext) {
- Iterator<UIComponent> dataChildren = dataChildren();
- while (dataChildren.hasNext()) {
- UIComponent child = dataChildren.next();
-
- if (isStateful(child)) {
- saveChildState(facesContext, child);
- } else {
- for (UIComponent grandKid: child.getChildren()) {
- saveChildState(facesContext, grandKid);
- }
- }
- }
- }
-
- @Override
- protected void restoreChildState(FacesContext facesContext) {
- Iterator<UIComponent> dataChildren = dataChildren();
- while (dataChildren.hasNext()) {
- UIComponent child = dataChildren.next();
-
- if (isStateful(child)) {
- restoreChildState(facesContext, child);
- } else {
- //reset cached clientId
- child.setId(child.getId());
-
- for (UIComponent grandKid: child.getChildren()) {
- restoreChildState(facesContext, grandKid);
- }
- }
- }
- }
}
Deleted: branches/4.0.X/ui/iteration/ui/src/test/java/org/richfaces/component/IteratorBaseTest.java
===================================================================
--- branches/4.0.X/ui/iteration/ui/src/test/java/org/richfaces/component/IteratorBaseTest.java 2011-03-11 15:36:16 UTC (rev 22169)
+++ branches/4.0.X/ui/iteration/ui/src/test/java/org/richfaces/component/IteratorBaseTest.java 2011-03-11 15:36:17 UTC (rev 22170)
@@ -1,150 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat, Inc. and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.richfaces.component;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.NoSuchElementException;
-
-import org.junit.Test;
-
-
-/**
- * @author Nick Belaevski
- */
-public class IteratorBaseTest {
-
- private static final List<String> strings = Collections.unmodifiableList(Arrays.asList("a", "b", "c"));
-
- private static class IteratorImpl<E> extends DataTableIteratorBase<E> {
-
- private Iterator<E> iterator;
-
- public IteratorImpl(List<E> list) {
- super();
-
- this.iterator = list.iterator();
- }
-
- @Override
- protected E nextItem() {
- if (iterator.hasNext()) {
- return iterator.next();
- }
-
- return null;
- }
-
- }
-
- private Iterator<String> createTestIterator(List<String> list) {
- return new IteratorImpl<String>(list);
- }
-
- private Iterator<String> createStringsIterator() {
- return createTestIterator(strings);
- }
-
- private Iterator<String> createEmptyIterator() {
- return createTestIterator(Collections.<String>emptyList());
- }
-
- @Test
- public void testIteration() throws Exception {
- Iterator<String> testIterator = createStringsIterator();
- assertTrue(testIterator.hasNext());
- assertEquals("a", testIterator.next());
- assertTrue(testIterator.hasNext());
- assertEquals("b", testIterator.next());
- assertTrue(testIterator.hasNext());
- assertEquals("c", testIterator.next());
- assertFalse(testIterator.hasNext());
- try {
- testIterator.next();
-
- fail();
- } catch (NoSuchElementException e) {
- //should be thrown - ignore
- }
- }
-
- @Test
- public void testIterationWithoutHasNext() throws Exception {
- Iterator<String> testIterator = createStringsIterator();
- assertEquals("a", testIterator.next());
- assertEquals("b", testIterator.next());
- assertEquals("c", testIterator.next());
- try {
- testIterator.next();
-
- fail();
- } catch (NoSuchElementException e) {
- //should be thrown - ignore
- }
- assertFalse(testIterator.hasNext());
- }
-
- @Test
- public void testEmptyList() throws Exception {
- Iterator<String> testIterator = createEmptyIterator();
- assertFalse(testIterator.hasNext());
- try {
- testIterator.next();
-
- fail();
- } catch (NoSuchElementException e) {
- //should be thrown - ignore
- }
- }
-
- @Test
- public void testEmptyListWithoutHasNext() throws Exception {
- Iterator<String> testIterator = createEmptyIterator();
- try {
- testIterator.next();
-
- fail();
- } catch (NoSuchElementException e) {
- //should be thrown - ignore
- }
- }
-
- @Test
- public void testRemove() throws Exception {
- Iterator<String> testIterator = createStringsIterator();
- testIterator.next();
- try {
- testIterator.remove();
-
- fail();
- } catch (Exception e) {
- //unsupported - ignore
- }
- }
-}
Modified: branches/4.0.X/ui/iteration/ui/src/test/java/org/richfaces/component/UIDataTableTest.java
===================================================================
--- branches/4.0.X/ui/iteration/ui/src/test/java/org/richfaces/component/UIDataTableTest.java 2011-03-11 15:36:16 UTC (rev 22169)
+++ branches/4.0.X/ui/iteration/ui/src/test/java/org/richfaces/component/UIDataTableTest.java 2011-03-11 15:36:17 UTC (rev 22170)
@@ -144,7 +144,7 @@
*/
@Test
public void testDataChildren() {
- Assert.assertTrue(table.dataChildren() instanceof DataTableDataIterator);
+ Assert.assertTrue(table.dataChildren() instanceof DataTableDataChilderIterator);
}
/**
13 years, 3 months
JBoss Rich Faces SVN: r22169 - branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2011-03-11 10:36:16 -0500 (Fri, 11 Mar 2011)
New Revision: 22169
Modified:
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
Log:
RF-10683 Reviewer: Nick Belaevski
Modified: branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
===================================================================
--- branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2011-03-11 15:00:09 UTC (rev 22168)
+++ branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2011-03-11 15:36:16 UTC (rev 22169)
@@ -461,7 +461,7 @@
writer.startElement(element, column);
- encodeStyleClass(writer, context, column, null, cellClass);
+ encodeStyleClass(writer, context, column, facetName + "Class", cellClass);
writer.writeAttribute(HtmlConstants.SCOPE_ATTRIBUTE, HtmlConstants.COL_ELEMENT, null);
getUtils().encodeAttribute(context, column, HtmlConstants.COLSPAN_ATTRIBUTE);
13 years, 3 months
JBoss Rich Faces SVN: r22168 - branches/4.0.X/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2011-03-11 10:00:09 -0500 (Fri, 11 Mar 2011)
New Revision: 22168
Modified:
branches/4.0.X/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/AutocompleteBase.js
Log:
https://issues.jboss.org/browse/RF-10652
Reviewed by Nick Belaevski
Modified: branches/4.0.X/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/AutocompleteBase.js
===================================================================
--- branches/4.0.X/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/AutocompleteBase.js 2011-03-11 14:49:04 UTC (rev 22167)
+++ branches/4.0.X/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/AutocompleteBase.js 2011-03-11 15:00:09 UTC (rev 22168)
@@ -171,13 +171,14 @@
}
break;
case rf.KEYS.RETURN:
-
- event.preventDefault();
- this.__onEnter(event);
- //TODO: bind form submit event handler to cancel form submit under the opera
- //cancelSubmit = true;
- this.__hide(event);
- return false;
+ if (this.isVisible) {
+ event.preventDefault();
+ this.__onEnter(event);
+ //TODO: bind form submit event handler to cancel form submit under the opera
+ //cancelSubmit = true;
+ this.__hide(event);
+ return false;
+ }
break;
case rf.KEYS.ESC:
this.__hide(event);
13 years, 3 months
JBoss Rich Faces SVN: r22166 - branches/4.0.X/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2011-03-11 09:38:12 -0500 (Fri, 11 Mar 2011)
New Revision: 22166
Modified:
branches/4.0.X/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/AutocompleteBase.js
Log:
https://jira.jboss.org/browse/RF-10690
Reviewed by Nick Belaevski
Modified: branches/4.0.X/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/AutocompleteBase.js
===================================================================
--- branches/4.0.X/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/AutocompleteBase.js 2011-03-11 14:21:26 UTC (rev 22165)
+++ branches/4.0.X/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/AutocompleteBase.js 2011-03-11 14:38:12 UTC (rev 22166)
@@ -147,26 +147,26 @@
}
break;
case rf.KEYS.PAGEUP:
- event.preventDefault();
if (this.isVisible) {
+ event.preventDefault();
this.__onPageUp(event);
}
break;
case rf.KEYS.PAGEDOWN:
- event.preventDefault();
if (this.isVisible) {
+ event.preventDefault();
this.__onPageDown(event);
}
break;
case rf.KEYS.HOME:
- event.preventDefault();
if (this.isVisible) {
+ event.preventDefault();
this.__onKeyHome(event);
}
break;
case rf.KEYS.END:
- event.preventDefault();
if (this.isVisible) {
+ event.preventDefault();
this.__onKeyEnd(event);
}
break;
13 years, 3 months
JBoss Rich Faces SVN: r22165 - branches/4.0.X/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2011-03-11 09:21:26 -0500 (Fri, 11 Mar 2011)
New Revision: 22165
Modified:
branches/4.0.X/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceInput.ecss
Log:
RF-10699 inplaceInput : controls are below the input
- reviewed by Konstantin Mishin
Modified: branches/4.0.X/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceInput.ecss
===================================================================
--- branches/4.0.X/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceInput.ecss 2011-03-11 13:57:06 UTC (rev 22164)
+++ branches/4.0.X/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceInput.ecss 2011-03-11 14:21:26 UTC (rev 22165)
@@ -95,7 +95,7 @@
.rf-ii-btn-prepos {
position : absolute;
- bottom : 0px;
+ top : -4px;
right : 0px;
width : 1px;
height : 1px;
@@ -104,7 +104,7 @@
.rf-ii-btn-pos {
position : absolute;
top : 1px;
- right : 0px;
+ left : 0px;
white-space : nowrap;
}
13 years, 3 months
JBoss Rich Faces SVN: r22164 - in branches/4.0.X: archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: juankprada
Date: 2011-03-11 08:57:06 -0500 (Fri, 11 Mar 2011)
New Revision: 22164
Modified:
branches/4.0.X/archetypes/richfaces-archetype-simpleapp/readme.txt
branches/4.0.X/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/readme.txt
branches/4.0.X/dist/readme-examples.txt
branches/4.0.X/dist/readme-ui.txt
branches/4.0.X/examples/richfaces-showcase/readme.txt
Log:
RF-10583
Updates readme files for distribution package as well as readme files used in the archetype description and in a maven generated project.
Modified: branches/4.0.X/archetypes/richfaces-archetype-simpleapp/readme.txt
===================================================================
--- branches/4.0.X/archetypes/richfaces-archetype-simpleapp/readme.txt 2011-03-11 13:28:44 UTC (rev 22163)
+++ branches/4.0.X/archetypes/richfaces-archetype-simpleapp/readme.txt 2011-03-11 13:57:06 UTC (rev 22164)
@@ -1,9 +1,85 @@
-RichFaces 4 Archetype
+========================================================================
+ RichFaces - Ajax enabled JSF 2.0 component library
-This archetype creates a simple RichFaces 4 application. To generate a project from the archetype, run
+ RichFaces 4.0.CR1
+ http://richfaces.org
+ March 2011
+ This software is distributed under the terms of the
+ FSF Lesser Gnu Public License (see lgpl.txt)
- mvn archetype:generate -DarchetypeGroupId=org.richfaces.archetypes -DarchetypeArtifactId=richfaces-archetype-simpleapp
- -DarchetypeVersion=<version> -DgroupId=<yourGroupId> -DartifactId=<yourArtifactId> -Dversion=1.0-SNAPSHOT
+========================================================================
+This project is an application generated with richfaces-achttype-simpleapp.
+This file explains how to build and set up the project using Maven. If you
+find any issue related to RichFaces framework, please report the issue on
+the RichFaces user forum (http://community.jboss.org/en/richfaces) or
+jira (https://issues.jboss.org/browse/RF).
+
+SETTING UP THE APPLICATION
+--------------------------
+
+1. Requirements
+
+In order to build the Examples applications you will need:
+ - Maven 2.1.0 or later
+ - Servers: Apache Tomcat 6.0 or any JEE6 application server
+ (e.g. Jboss AS 6)
+ - JDK 1.6
+
+Also optional Additional Software would make it easy for you to work
+with the sources of the application:
+
+ - Eclipse IDE + JBoss Tools (to explore and run the application
+ in IDE). You're obviously free to use any other IDE you wish, but
+ JBoss Tools is recommended.
+
+2. Build/Deploy
+
+ - Deploying on Tomcat
+
+ To build the project for Tomcat you need to navigate to the
+ /examples/richfaces-showcase and run:
+
+ mvn clean package
+
+ When you see the BUILD SUCCESSFUL message you can deploy the
+ application on the server. To deploy it on Tomcat, copy the .war
+ file from 'target' folder to TOMCAT_HOME/webapps folder. Then,
+ launch the startup.sh or startup.bat script from TOMCAT_HOME/bin/
+ directory to start the server.
+
+ - Deploying on JEE6 server (JBoss AS 6)
+
+ To build the project for a JEE6 server you need to navigate to the
+ /examples/richfaces-showcase and run
+
+ mvn clean package -Pjee6
+
+ When you see the BUILD SUCCESSFUL message you can deploy the
+ application on the server. To deploy it on the application server
+ copy the .war file from 'target' folder to the JBOSS_HOME/server/default/deploy
+ folder (or change "default/" to used profile folder). Then, launch
+ the run.sh or run.bat script from JBOSS_HOME/bin/ directory to start
+ the server.
+
+
+ - If you wan to create a binaries for both Tomcat 6 and JBoss 6 run
+
+ mvn clean package -P release
+
+
+After deploying the examples to your server open a browser and type
+http://localhost:8080/projectName to execute the application.
+
+
+MORE INFORMATION AND RESOURCES
+------------------------------
+
+For more information on this project please contact the developer.
+
+For more information on RichFaces 4, please visit RichFaces
+website at:
+
+ - http://www.jboss.org/richfaces.
Modified: branches/4.0.X/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/readme.txt
===================================================================
--- branches/4.0.X/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/readme.txt 2011-03-11 13:28:44 UTC (rev 22163)
+++ branches/4.0.X/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/readme.txt 2011-03-11 13:57:06 UTC (rev 22164)
@@ -1,9 +1,85 @@
-Project generated with richfaces-archetype-simpleapp
+========================================================================
-To build this project for Tomcat 6 run
+ RichFaces - Ajax enabled JSF 2.0 component library
- mvn clean package
+ RichFaces 4.0.CR1
+ http://richfaces.org
+ March 2011
+ This software is distributed under the terms of the
+ FSF Lesser Gnu Public License (see lgpl.txt)
-If you wan to create a binaries for both Tomcat 6 and JBoss 6 run
+========================================================================
- mvn clean package -P release
\ No newline at end of file
+This project is an application generated with richfaces-achttype-simpleapp.
+This file explains how to build and set up the project using Maven. If you
+find any issue related to RichFaces framework, please report the issue on
+the RichFaces user forum (http://community.jboss.org/en/richfaces) or
+jira (https://issues.jboss.org/browse/RF).
+
+
+SETTING UP THE APPLICATION
+--------------------------
+
+1. Requirements
+
+In order to build the Examples applications you will need:
+ - Maven 2.1.0 or later
+ - Servers: Apache Tomcat 6.0 or any JEE6 application server
+ (e.g. Jboss AS 6)
+ - JDK 1.6
+
+Also optional Additional Software would make it easy for you to work
+with the sources of the application:
+
+ - Eclipse IDE + JBoss Tools (to explore and run the application
+ in IDE). You're obviously free to use any other IDE you wish, but
+ JBoss Tools is recommended.
+
+2. Build/Deploy
+
+ - Deploying on Tomcat
+
+ To build the project for Tomcat you need to navigate to the
+ /examples/richfaces-showcase and run:
+
+ mvn clean package
+
+ When you see the BUILD SUCCESSFUL message you can deploy the
+ application on the server. To deploy it on Tomcat, copy the .war
+ file from 'target' folder to TOMCAT_HOME/webapps folder. Then,
+ launch the startup.sh or startup.bat script from TOMCAT_HOME/bin/
+ directory to start the server.
+
+ - Deploying on JEE6 server (JBoss AS 6)
+
+ To build the project for a JEE6 server you need to navigate to the
+ /examples/richfaces-showcase and run
+
+ mvn clean package -Pjee6
+
+ When you see the BUILD SUCCESSFUL message you can deploy the
+ application on the server. To deploy it on the application server
+ copy the .war file from 'target' folder to the JBOSS_HOME/server/default/deploy
+ folder (or change "default/" to used profile folder). Then, launch
+ the run.sh or run.bat script from JBOSS_HOME/bin/ directory to start
+ the server.
+
+
+ - If you wan to create a binaries for both Tomcat 6 and JBoss 6 run
+
+ mvn clean package -P release
+
+
+After deploying the examples to your server open a browser and type
+http://localhost:8080/projectName to execute the application.
+
+
+MORE INFORMATION AND RESOURCES
+------------------------------
+
+For more information on this project please contact the developer.
+
+For more information on RichFaces 4, please visit RichFaces
+website at:
+
+ - http://www.jboss.org/richfaces.
Modified: branches/4.0.X/dist/readme-examples.txt
===================================================================
--- branches/4.0.X/dist/readme-examples.txt 2011-03-11 13:28:44 UTC (rev 22163)
+++ branches/4.0.X/dist/readme-examples.txt 2011-03-11 13:57:06 UTC (rev 22164)
@@ -1,39 +1,134 @@
-RichFaces 4.0 Examples
-=========================================================
-Version 4.0.0.M3
+========================================================================
-This software is distributed under the terms of the FSF Lesser Gnu Public License (see lgpl.txt).
+ RichFaces - Ajax enabled JSF 2.0 component library
-Getting up and running quickly
--------------------------------
-The core-demo and richfaces-showcase demo applications should be built using Maven 2.1.0
+ RichFaces 4.0.CR1 EXAMPLES
+ http://richfaces.org
+ March 2011
+ This software is distributed under the terms of the
+ FSF Lesser Gnu Public License (see lgpl.txt)
-tomcat6/jetty targeted build:
+========================================================================
-1) execute "mvn clean package" in root application folder(examples/richfaces-showcase or examples/core-demo)
-2) Deploy to tomcat 6.x (built .war file is located in the 'target' folder) or just run using maven on jetty using "mvn clean jetty:run-war"
+RichFaces 4 is a component library for JSF2 and an advanced framework for
+easily integrating AJAX capabilities into business applications.
-JEE6 (GlassFish 3, JBoss AS 6) server targeted build:
-1) execute "mvn clean package -Pjee6" in root application folder(examples/richfaces-showcase or examples/core-demo)
-2) Deploy built application (built .war file is located in the 'target' folder) to application server
+This file explains how to set up the RichFaces examples bundled with the
+distribution package. If you find any issue with the project, please report
+the issue on the RichFaces user forum (http://community.jboss.org/en/richfaces)
+or jira (https://issues.jboss.org/browse/RF).
-Type http://localhost:8080/richfaces-showcase http://localhost:8080/core-demo in your browser address bar after starting server.
-More additional information about build profiles for concrete applications and working with them - inside readme's for application itself.
+SETTING UP THE EXAMPLES
+-----------------------
-NOTE: richfaces-showcase contains readme.txt which shows how to publish the application to Google Application Engine.
+ 1. Requirements
+
+ In order to build the Examples applications you will need:
+ - Maven 2.1.0 or later
+ - Servers: Apache Tomcat 6.0 or any JEE6 application server
+ (e.g. Jboss AS 6)
+ - JDK 1.6
-Using IDE to work with examples
--------------------------------
- *You could use JBoss Tools with m2eclipse plugin and just import the examples as maven-based projects.
-
- *Or if you have not using m2eclipse - execute:
- mvn eclipse:ecllipse
- in root example folder and import to ecplise just as existent project after build complete.
+ Also optional Additional Software would make it easy for you to work
+ with the sources of the application:
+ - Eclipse IDE + JBoss Tools (to explore and run the application
+ in IDE). You're free to use any other IDE also but we haven't
+ tested the application in other environments.
+ 2. Build/Deploy
-Learn more
-----------
-RichFaces Project - http://www.jboss.org/richfaces
-RichFaces 4.0 Wiki - http://www.jboss.org/community/wiki/RichFaces40Planning
\ No newline at end of file
+ - Deploy on Tomcat/Jetty
+
+ To build the project for Tomcat you need to navigate to the
+ /examples/richfaces-showcase or /examples/core-demo directories
+ and run:
+
+ mvn clean package
+
+ When you see the BUILD SUCCESSFUL message you can deploy the
+ application on the server. To deploy it on Tomcat, copy the .war
+ file from 'target' folder to TOMCAT_HOME/webapps folder. Then,
+ launch the startup.sh or startup.bat script from TOMCAT_HOME/bin/
+ directory to start the server.
+
+ - Deploy on JEE6 server (JBoss AS 6)
+
+ To build the project for a JEE6 server you need to navigate to the
+ /examples/richfaces-showcase or /examples/core-demo directory
+ and run:
+
+ mvn clean package -Pjee6
+
+ When you see the BUILD SUCCESSFUL message you can deploy the
+ application on the server. To deoploy it on the application server
+ copy the .war file from 'target' folder to the JBOSS_HOME/server/default/deploy
+ folder (or change "default/" to used profile folder). Then, launch
+ the run.sh or run.bat script from JBOSS_HOME/bin/ directory to start
+ the server.
+
+After deploying the examples to your server open a browser and type
+http://localhost:8080/richfaces-showcase or http://localhost:8080/core-demo
+to view the examples.
+
+Additional information about build profiles for these applications
+and working with them can be found inside the readme files for application
+itself.
+
+NOTE: richfaces-showcase contains readme.txt which shows how to
+publish the application to Google Application Engine.
+
+
+USING AN IDE TO WORK WITH EXAMPLES
+----------------------------------
+
+In order to explore, run and deploy the examples using Eclipse IDE you can use
+one of the following options:
+
+ - You could use JBoss Tools with m2eclipse plugin and just import
+ the examples as maven-based projects.
+ * Open Eclipse and go to File > Import
+ * Expand the project type named Maven and select Import Maven
+ Project
+ * Browse the directory in which you placed the examples, select
+ it and press OK.
+ * Press next on the import wizard to finish importing the
+ examples.
+
+ - Or if you are not using m2eclipse execute use Maven to convert the
+ project to an Eclipse project:
+ * Open a terminal inside the RichFaces examples directory
+ * execute mvn eclipse:ecllipse
+ * Open Eclipse and select File > Import
+ * Select Import as existing project into workspace after build
+ is complete.
+ * Follow the instructions on the import wizard.
+
+You are now able to work with the examples within Eclipse.
+
+
+MORE INFORMATION AND RESOURCES
+------------------------------
+
+For more information on RichFaces 4, please visit RichFaces
+website at:
+
+ - http://www.jboss.org/richfaces.
+
+Or check the Wiki for more information on build instructions for the examples at:
+
+ - http://community.jboss.org/wiki/HowtoworkwithRichFaces4xexamplessources
+
+To report or check the status of issues related to RichFaces Examples
+use the project's Jira at:
+
+ - https://issues.jboss.org/browse/RF
+
+Community support and help can be obtained from the RichFaces forums at:
+
+ - http://community.jboss.org/en/richfaces?view=discussions
+
+
+
+###
Modified: branches/4.0.X/dist/readme-ui.txt
===================================================================
--- branches/4.0.X/dist/readme-ui.txt 2011-03-11 13:28:44 UTC (rev 22163)
+++ branches/4.0.X/dist/readme-ui.txt 2011-03-11 13:57:06 UTC (rev 22164)
@@ -1,47 +1,185 @@
-RichFaces - Ajax enabled JSF 2.0 component library
-=========================================================
-Version 4.0.0.CR1
+========================================================================
-This software is distributed under the terms of the FSF Lesser Gnu Public License (see lgpl.txt).
+ RichFaces - Ajax enabled JSF 2.0 component library
-Getting up and running quickly
--------------------------------
+ RichFaces 4.0.CR1
+ http://www.jboss.org/richfaces
+ March 2011
+ This software is distributed under the terms of the
+ FSF Lesser Gnu Public License (see lgpl.txt)
-1) Put RichFaces libraries and its dependencies in your application libraries folder:
- 1.1) richfaces-core-api.jar
- 1.2) richfaces-core-impl.jar
- 1.3) richfaces-components-api.jar
- 1.4) richfaces-components-ui.jar
- 1.5) sac-1.3, cssparser-0.9.5 - required for components CSS work
- 1.6) google-guava-r08 - core runtime dependency.
- 1.7) annotations.jar from org.richfaces.cdk
- - It's optional and only needs to be added if RichFaces components will be
- created/accessed dynamically in your apps actions/listeners.
- 1.8) validation-api.jar and any implementation like hibernate-validators.jar
- - It's optional and should be added if you using Client or Graph Validation. Should be added only if it's not provided by server(Java EE 6 servers)
+========================================================================
-For optimal performance it's recommended to add one of these caching frameworks to application classpath: EhCache, JBoss Cache, OsCache.
+RichFaces 4 is a component library for JSF2 and an advanced framework for
+easily integrating AJAX capabilities into business applications.
-2) As opposed to the previous 3.x.y versions of RichFaces, no special configuration steps are necessary.
-You don't need to modify web.xml or faces-config.xml (except a4j:push component that requires additional configuration in web.xml;
-please refer to the documentation)
+This file explains how to obtain and install the RichFaces component
+library. If you find any issue with the project, please report the issue
+on the RichFaces user forum (http://community.jboss.org/en/richfaces)
+or jira (https://issues.jboss.org/browse/RF).
-3) Add RichFaces namespaces/taglibs declaration to your VDL/XHTML pages which will use RichFaces components
- Use xmlns:a4j="http://richfaces.org/a4j" namespace for core components
- Use xmlns:rich="http://richfaces.org/rich" namespace for rich components
-4) Add one of the available RichFaces components to your page and try it!
-4.1) Take a look at the RichFaces examples for assistance with usage.
+FEATURES
+--------
-For more information on getting started with, or without maven, take a look at wiki's Getting Started Guide.
- - http://community.jboss.org/wiki/GettingstartedwithRichFaces4x
+ - 100+ AJAX enabled components in two libraries.
+ * a4j page centric AJAX controls.
+ * rich self contained, ready to use components.
+ - Whole set of JSF2 benefits while working with AJAX.
+ - Skinnability mechanism.
+ - Component Development Kit (CDK).
+ - Dynamic resource handling.
+ - Testing facilities for components, actions, listeners and pages
+ - Broad cross-browser support.
+ - Large and active community
-Available Components/Behaviors/Tags/Functions
----------------------------------
+OBTAINING RICHFACES 4.X
+-----------------------
+
+ 1. Obtaining the latest stable distribution package
+
+ You can download the distribution package directly from the RichFaces
+ project website at http://www.jboss.org/richfaces. Source code is also
+ available to download from the same site.
+
+
+SETTING UP YOUR PROJECT
+-----------------------
+
+ 1. Manually
+
+ After downloading the distribution package, extract its content in a
+ folder of your choice.
+
+ Search for the 'artifacts' directory in the extracted files. There you
+ will find 'framework' and 'ui' directories, each of them having the
+ jars needed to use RichFaces inside your project.
+
+ - From 'ui' directory: Copy richfaces-components-api-4.x.jar and
+ richfaces-components-ui-4.x.jar to your application libraries
+ folder.
+
+ - From 'framerok' directory: Copy richfaces-core-api-4.x.jar and
+ richfaces-core-impl-4.x.jar to your application libraries folder.
+
+ In addition to the RichFaces jars, a number of dependencies are
+ required in order to properly configure the framework.
+
+
+ a. sac-1.3, cssparser-0.9.5 - required for components CSS work.
+
+ b. google-guava-r08 - core runtime dependency.
+
+ c. annotations.jar - from org.richfaces.cdk.
+
+ - It's optional and only needs to be added if RichFaces components
+ will be created/accessed dynamically in your apps actions/listeners.
+
+ d. validation-api.jar and any implementation like hibernate-validators.jar
+
+ - It's optional and should be added if you using Client or Graph
+ Validation. Should be added only if it's not provided by a
+ server (Java EE 6 servers).
+
+
+ 2. Using Maven
+
+ To setup your project using Maven, follow the instruction on the wiki at
+ http://community.jboss.org/wiki/HowtoaddRichFaces4xtomavenbasedproject
+
+
+For optimal performance it's recommended to add one of these caching frameworks
+to application classpath: EhCache, JBoss Cache, OsCache.
+
+
+GETTING STARTED
+---------------
+
+1. After setting up the project to use RichFaces component library, no
+ special configuration steps are necessary. You don't need to modify
+ web.xml or faces-config.xml as with previous versions of RichFaces,
+ except for a4j:push component that requires additional configuration
+ in web.xml
+
+2. Add RichFaces namespaces/taglibs declarations to your VDL/XHTML pages
+ which will use RichFaces components.
+
+ - Use xmlns:a4j="http://richfaces.org/a4j" namespace for core components
+ - Use xmlns:rich="http://richfaces.org/rich" namespace for rich components
+
+3. Add on of the available RichFaces components to your page and try it!
+ Take a look at the RichFaces examples for assistance with usage.
+
+4. For more information on getting started with RichFaces, visit the wiki's
+ Getting Started Guide at http://community.jboss.org/wiki/GettingStartedWithRichFaces4x
+
+
+
+MORE INFORMATION AND RESOURCES
+------------------------------
+
+For more information on RichFaces 4 features, how to migrate from
+previous versions, and answers to the most frequently asked questions (FAQ),
+please visit RichFaces website at:
+
+http://www.jboss.org/richfaces.
+
+Or the Wiki at:
+
+ - http://community.jboss.org/wiki/richfaceswikihomepage
+
+To report or check the status of issues related to RichFaces use the
+project's Jira at:
+
+ - https://issues.jboss.org/browse/RF
+
+Community support and help can be obtained from the RichFaces forums at:
+
+ - http://community.jboss.org/en/richfaces?view=discussions
+
+Also you can follow us on Twitter at:
+
+ - http://twitter.com/richfaces
+
+
+FUTURE RELEASES
+---------------
+
+For information on future releases and new features that are planned for next
+version please visit project's wiki at:
+http://www.jboss.org/community/wiki/RichFaces40Planning
+
+
+GET INVOLVED
+------------
+
+RichFaces is an Open Source project built by people across the globe.
+If you want to help create the next version of RichFaces take a look at
+this sites
+
+ - RichFaces source code:
+ http://www.jboss.org/richfaces/sourcecode
+
+ - How to build RichFaces 4.0:
+ http://community.jboss.org/docs/DOC-15747?uniqueTitle=false
+
+ - RichFaces 4.0 Directory structure:
+ http://community.jboss.org/wiki/RichFaces40BuildDirectoryStructure
+
+ - RichFaces developer forums
+ http://community.jboss.org/en/richfaces/dev?view=discussions
+
+ - RichFaces Planning (Jira):
+ https://issues.jboss.org/browse/RFPL
+
+We hope to see your contributions!
+
+
+AVAILABLE COMPONENTS/BEHAVIORS/TAGS/FUNCTIONS
+---------------------------------------------
Core:
----------------------------------
-
+---------------------------------------------
a4j:ajax
a4j:commandLink
a4j:commandButton
@@ -153,7 +291,52 @@
rich:validator
rich:graphValidator
-Learn more
-----------
-RichFaces Project - http://www.jboss.org/richfaces
-RichFaces 4.0 Wiki - http://www.jboss.org/community/wiki/RichFaces40Planning
+
+New in Version 4.0.CR1
+----------------------
+
+ - Finally completed with Taglib's corrections for better IDE support
+ https://issues.jboss.org/browse/RF-9936
+ - Stabilized CSV feature with messages, localization and customization
+ improvements https://issues.jboss.org/browse/RF-10556
+ https://issues.jboss.org/browse/RF-10434 https://issues.jboss.org/browse/RF-10611
+ - Stabilized messages components https://issues.jboss.org/browse/RF-10293
+ https://issues.jboss.org/browse/RF-10370
+ - A lots of stabilization issues resolved for Switchable Panels and
+ Panel Menu
+ - Important push problems solved https://issues.jboss.org/browse/RF-10457
+ https://issues.jboss.org/browse/RF-10473 https://issues.jboss.org/browse/RF-10487
+ and more customization options added https://issues.jboss.org/browse/RF-10454
+ - A lot of stabilization issues for MyFaces support got resolved
+ - Environment updates: JQuery 1.5, MyFaces 2.0.4, Mojara 2.0.4, Atmosphere 0.6.4
+ - RichFaces showcase has been updated with new design (https://issues.jboss.org/browse/RF-9636)
+ and now runs under myFaces stable!
+
+
+New in Version 4.0.M6
+---------------------
+
+ - Client Side Validation feature is ready!! All the standard JSF
+ and most of the JSR-303 validators are available on the client by using
+ just <rich:validator> behavior! We will post detailed blog with examples
+ in a few days.
+ - ObjectValidation feature also was finalized and allows you to validate
+ complete objects and dependent fields by just using JSR-303 validators
+ and the <rich:graphValidator> component. This will also be covered in an
+ up coming blog.
+ - The Ajax framework is improved and now provides ignoreDupResponce core
+ feature! Together with queue it adds great optimization to your Ajax'ififed
+ pages.
+ - All the richfaces components client side API are reviewed and stabilized.
+ API Tables will be documented soon in the component reference.
+ - Further review and corrections in components for improving IDE's support.
+ - richfaces-showcase demo application is updated with new showcases for
+ validation components and new examples for previously released components.
+ - Further improvements in Component Development Kit.
+ - Stabilization works for migrated code. Automation tests with quint, junit.
+ Review of attributes and facets for consistency and stability are done
+ and most issues get fixed.
+
+
+
+###
Modified: branches/4.0.X/examples/richfaces-showcase/readme.txt
===================================================================
--- branches/4.0.X/examples/richfaces-showcase/readme.txt 2011-03-11 13:28:44 UTC (rev 22163)
+++ branches/4.0.X/examples/richfaces-showcase/readme.txt 2011-03-11 13:57:06 UTC (rev 22164)
@@ -1,68 +1,170 @@
-RichFaces showcase is an application intended to show RichFaces components in action. It contains set of small use-cases implemented using RichFaces components. These use-cases for the demo are chosen from most popular questions on the user forums. You will be able to find a lot of useful information and will be able to re-use some of it to implement the same cases for your applications.
+========================================================================
-1 Building and Running the application
+ RichFaces - Ajax enabled JSF 2.0 component library
-1.1. Requirements
+ RichFaces 4.0.CR1 SHOWCASE
+ http://richfaces.org
+ March 2011
+ This software is distributed under the terms of the
+ FSF Lesser Gnu Public License (see lgpl.txt)
-- Maven 2.1.0 or later
-- Servers: Apache Tomcat 6.0 or any JEE6 application server (e.g. JBoss AS 6)
-- JDK 1.6
+========================================================================
-1.2 Optional Additional Software
-- Eclipse IDE + JBoss Tools (to explore and run the application in IDE).
-- You're free to use any other IDE also but we haven't tested an application in other environments.
+RichFaces showcase is an application created to show RichFaces components
+in action. It contains a set of small use-cases implemented using RichFaces
+components.
-1.3 Build/Deploy
+The examples shown in the application were chosen from the most popular
+questions at the user forum. You will find a lot of useful information on
+how to implement RichFaces components and re-use the code to implement the
+components in your own application.
-1.3.1) Tomcat
-To build the project you need to navigate to the /examples/richfaces-showcase and run
+This file explains how to build and execute the showcase application on
+your own server.
-mvn clean package
-When you see the BUILD SUCCESSFUL message you can deploy the application on the server. You can deploy it on the server by copying .war file from 'target' folder to
-the TOMCAT_HOME/webapps folder. Then, launch the startup.sh or startup.bat script from TOMCAT_HOME/bin/ directory to start the server.
+BUILDING AND RUNNING THE APPLICATION
+------------------------------------
-1.3.2) JEE6 server(JBoss AS 6)
-To build the project you need to navigate to the /examples/richfaces-showcase and run
+ 1. Requirements
+
+ In order to build the Showcase application you will need:
-mvn clean package -Pjee6
+ - Maven 2.1.0 or later
+ - Servers: Apache Tomcat 6.0 or any JEE6 application server
+ (e.g. JBoss AS 6)
+ - JDK 1.6
-When you see the BUILD SUCCESSFUL message you can deploy the application on the server. You can deploy it on the server by copying .war file from 'target' folder to
-the JBOSS_HOME/server/default/deploy folder(or change "default/" to used profile folder). Then, launch the run.sh or run.bat script from JBOSS_HOME/bin/ directory to start the server.
+ Also optional Additional Software would make it easy for you to work
+ with the sources of the application:
+
+ - Eclipse IDE + JBoss Tools (to explore and run the application
+ in IDE). You're obviously free to use any other IDE you wish, but
+ JBoss Tools is recommended.
-2) Publishing to Google Application Engine
-
-We have completed a resource plugin which generates static resources which allow us to create Google App Engine compatible applications using RichFaces. This means deploying to and working with GAE is a piece of cake. Here is how you can deploy your own RichFaces showcase example.
-
---) Update the GAE application name, and register it with google. Do this by updating the /webapp-gae/WEB-INF/appengine-web.xml following the GAE standard documentation.
-
---) Only if using MyFaces: Configure the MyFaces encryption secret values in the /webapp-gae/WEB-INF/web.xml. Replace the "-- Insert some secret here --" with a base64 encoded password. This is important because otherwise MyFaces will generate random keys, and this causes issues in a cluster environment like GAE.
-
-See below for more information:
- MyFaces - http://wiki.apache.org/myfaces/Secure_Your_Application
- Mojarra - http://wikis.sun.com/display/GlassFish/JavaServerFacesRI#JavaServerFacesR...
-
---) Build using:
-
-mvn clean package -Pgae
+ 2. Build/Deploy
---) Use GAE SDK and the appcfg script just as you would for any other GAE application.
+ - Deploying on Tomcat
-There are some additional changes that were made in order to make richfaces-showcase GAE compatible:
- * WebConfiguration class from com.sun.faces were patched removing code which is not compatible with GAE
- * web.xml with additional properties for GAE created and placed at src\main\webapp-gae\WEB-INF\ (it replaces common one during build with GAE profile)
- * check pom.xml GAE profile section in order to check additional dependencies for that configuration.
+ To build the project for Tomcat you need to navigate to the
+ /examples/richfaces-showcase and run:
+
+ mvn clean package
+
+ When you see the BUILD SUCCESSFUL message you can deploy the
+ application on the server. To deploy it on Tomcat, copy the .war
+ file from 'target' folder to TOMCAT_HOME/webapps folder. Then,
+ launch the startup.sh or startup.bat script from TOMCAT_HOME/bin/
+ directory to start the server.
-3) Working with the project in Eclipse IDE:
-In order to explore, run and deploy the application in Eclipse IDE you can use one of the following options:
+ - Deploying on JEE6 server (JBoss AS 6)
+
+ To build the project for a JEE6 server you need to navigate to the
+ /examples/richfaces-showcase and run
- * Just import as maven project if using m2eclipse plugin.
-
- * without m2eclipse - build it with the
+ mvn clean package -Pjee6
- mvn clean install eclipse:clean eclipse:eclipse
+ When you see the BUILD SUCCESSFUL message you can deploy the
+ application on the server. To deploy it on the application server
+ copy the .war file from 'target' folder to the JBOSS_HOME/server/default/deploy
+ folder (or change "default/" to used profile folder). Then, launch
+ the run.sh or run.bat script from JBOSS_HOME/bin/ directory to start
+ the server.
- comand and just import as existent project.
-You can find more details in the RichFaces Getting Started Guide (visit documentation page at http://jboss.org/richfaces)
+After deploying the examples to your server open a browser and type
+http://localhost:8080/richfaces-showcase to view the examples.
+ - Publishing to Google Application Engine (GAE)
+
+ We have completed a resource plugin which generates static resources
+ allowing us to create Google App Engine compatible applications
+ using RichFaces. This means deploying to and working with GAE is
+ a piece of cake. Here is how you can deploy your own RichFaces showcase
+ example:
+
+ * Update the GAE application name, and register it with google.
+ Do this by updating the /webapp-gae/WEB-INF/appengine-web.xml
+ following the GAE standard documentation.
+
+ * if using MyFaces: Configure the MyFaces encryption secret values
+ in the /webapp-gae/WEB-INF/web.xml. Replace the "-- Insert some secret here --"
+ with a base64 encoded password. This is important because
+ otherwise MyFaces will generate random keys, and this causes
+ issues in a cluster environment like GAE.
+
+ For more information on JSF encryption check:
+ MyFaces - http://wiki.apache.org/myfaces/Secure_Your_Applicatio
+ Mojarra - http://wikis.sun.com/display/GlassFish/JavaServerFacesRI#JavaServerFacesR...
+
+ * Build using: mvn clean package -Pgae
+
+ * Use GAE SDK and the appcfg script just as you would for any other
+ GAE application.
+
+ There are some additional changes that were made in order to make
+ richfaces-showcase GAE compatible:
+
+ * WebConfiguration class from com.sun.faces were patched removing
+ code which is not compatible with GAE
+
+ * web.xml with additional properties for GAE created and placed
+ at src\main\webapp-gae\WEB-INF\ (it replaces common one during
+ build with GAE profile)
+
+ * check pom.xml GAE profile section in order to check additional
+ dependencies for that configuration
+
+
+SETTING UP ECLIPSE TO WORK WITH THE SHOWCASE
+--------------------------------------------
+
+In order to explore, run and deploy the Showcase using Eclipse IDE you can use
+one of the following options:
+
+ - You could use JBoss Tools with m2eclipse plugin and just import
+ the examples as maven-based projects.
+ * Open Eclipse and go to File > Import
+ * Expand the project type named Maven and select Import Maven
+ Project
+ * Browse the directory in which you placed the examples, select
+ it and press OK.
+ * Press next on the import wizard to finish importing the
+ examples.
+
+ - Or if you are not using m2eclipse execute use Maven to convert the
+ project to an Eclipse project:
+ * Open a terminal inside the RichFaces examples directory
+ * execute mvn eclipse:ecllipse
+ * Open Eclipse and select File > Import
+ * Select Import as existing project into workspace after build
+ is complete.
+ * Follow the instructions on the import wizard.
+
+You are now able to work with the Showcase within Eclipse.
+
+
+MORE INFORMATION AND RESOURCES
+------------------------------
+
+For more information on RichFaces 4, please visit RichFaces
+website at:
+
+ - http://www.jboss.org/richfaces.
+
+Or check the Wiki for more information on build instructions for the examples at:
+
+ - http://community.jboss.org/wiki/HowtoworkwithRichFaces4xexamplessources
+
+To report or check the status of issues related to RichFaces Examples
+use the project's Jira at:
+
+ - https://issues.jboss.org/browse/RF
+
+Community support and help can be obtained from the RichFaces forums at:
+
+ - http://community.jboss.org/en/richfaces?view=discussions
+
+
+
+###
13 years, 3 months
JBoss Rich Faces SVN: r22162 - modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceSelect.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-03-11 08:28:18 -0500 (Fri, 11 Mar 2011)
New Revision: 22162
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceSelect/TestRichInplaceSelect.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceSelect/TestRichInplaceSelectFAjax.java
Log:
tests for inplace select fixed
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceSelect/TestRichInplaceSelect.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceSelect/TestRichInplaceSelect.java 2011-03-11 13:27:41 UTC (rev 22161)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceSelect/TestRichInplaceSelect.java 2011-03-11 13:28:18 UTC (rev 22162)
@@ -55,7 +55,7 @@
private JQueryLocator label = pjq("span.rf-is-lbl");
private JQueryLocator input = pjq("input[id$=inplaceSelectInput]");
private JQueryLocator popup = pjq("span.rf-is-lst-cord");
- private JQueryLocator edit = pjq("span.rf-is-edit");
+ private JQueryLocator edit = pjq("span.rf-is-fld-cntr");
private JQueryLocator options = jq("span.rf-is-opt:eq({0})"); // 00..49
private JQueryLocator okButton = jq("input.rf-is-btn[id$=Okbtn]");
private JQueryLocator cancelButton = jq("input.rf-is-btn[id$=Cancelbtn]");
@@ -95,7 +95,7 @@
guardXhr(selenium).fireEvent(input, Event.BLUR);
waitGui.failWith("Output did not change.").until(textEquals.locator(output).text("Hawaii"));
- assertTrue(selenium.belongsClass(select, "rf-is-c-s"), "New class should be added to inplace select.");
+ assertTrue(selenium.belongsClass(select, "rf-is-chng"), "New class should be added to inplace select.");
assertTrue(selenium.belongsClass(edit, "rf-is-none"), "Edit should contain class rf-is-none when popup is closed.");
assertEquals(selenium.getText(label), "Hawaii", "Label should contain selected value.");
@@ -119,6 +119,7 @@
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-10739")
public void testDefaultLabel() {
selenium.type(pjq("input[type=text][id$=defaultLabelInput]"), "new label");
selenium.waitForPageToLoad();
@@ -541,6 +542,7 @@
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-10739")
public void testSaveOnBlurSelectFalseFalse() {
selenium.click(pjq("input[type=radio][name$=saveOnBlurInput][value=false]"));
selenium.waitForPageToLoad();
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceSelect/TestRichInplaceSelectFAjax.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceSelect/TestRichInplaceSelectFAjax.java 2011-03-11 13:27:41 UTC (rev 22161)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceSelect/TestRichInplaceSelectFAjax.java 2011-03-11 13:28:18 UTC (rev 22162)
@@ -51,7 +51,7 @@
private JQueryLocator label = pjq("span.rf-is-lbl");
private JQueryLocator input = pjq("input[id$=inplaceSelectInput]");
private JQueryLocator popup = pjq("span.rf-is-lst-cord");
- private JQueryLocator edit = pjq("span.rf-is-edit");
+ private JQueryLocator edit = pjq("span.rf-is-fld-cntr");
private JQueryLocator options = jq("span.rf-is-opt:eq({0})"); // 00..49
private JQueryLocator output = pjq("span[id$=output]");
@@ -80,7 +80,7 @@
guardXhr(selenium).fireEvent(input, Event.BLUR);
waitGui.failWith("Output did not change.").until(textEquals.locator(output).text("Hawaii"));
- assertTrue(selenium.belongsClass(select, "rf-is-c-s"), "New class should be added to inplace select.");
+ assertTrue(selenium.belongsClass(select, "rf-is-chng"), "New class should be added to inplace select.");
assertTrue(selenium.belongsClass(edit, "rf-is-none"), "Edit should contain class rf-is-none when popup is closed.");
assertEquals(selenium.getText(label), "Hawaii", "Label should contain selected value.");
13 years, 3 months
JBoss Rich Faces SVN: r22161 - modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceInput.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-03-11 08:27:41 -0500 (Fri, 11 Mar 2011)
New Revision: 22161
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceInput/TestRichInplaceInput.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceInput/TestRichInplaceInputFAjax.java
Log:
tests for rich:inplaceInput fixed
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceInput/TestRichInplaceInput.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceInput/TestRichInplaceInput.java 2011-03-11 12:39:15 UTC (rev 22160)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceInput/TestRichInplaceInput.java 2011-03-11 13:27:41 UTC (rev 22161)
@@ -55,7 +55,7 @@
private JQueryLocator inplaceInput = pjq("span[id$=inplaceInput]");
private JQueryLocator label = pjq("span.rf-ii-lbl");
private JQueryLocator input = pjq("input[id$=inplaceInputInput]");
- private JQueryLocator edit = pjq("span.rf-ii-edit");
+ private JQueryLocator edit = pjq("span.rf-ii-fld-cntr");
private JQueryLocator okButton = pjq("input.rf-ii-btn[id$=Okbtn]");
private JQueryLocator cancelButton = pjq("input.rf-ii-btn[id$=Cancelbtn]");
private JQueryLocator output = pjq("span[id$=output]");
@@ -79,13 +79,13 @@
@Test
public void testClick() {
guardNoRequest(selenium).click(inplaceInput);
- assertFalse(selenium.belongsClass(edit, "rf-ii-none"), "Edit should not contain class rf-is-none when popup is open.");
+ assertFalse(selenium.belongsClass(edit, "rf-ii-none"), "Edit should not contain class rf-ii-none when popup is open.");
assertTrue(selenium.isDisplayed(input), "Input should be displayed.");
selenium.type(input, "new value");
selenium.fireEvent(input, Event.BLUR);
- assertTrue(selenium.belongsClass(inplaceInput, "rf-ii-c-s"), "New class should be added to inplace input.");
- assertTrue(selenium.belongsClass(edit, "rf-ii-none"), "Edit should contain class rf-is-none when popup is closed.");
+ assertTrue(selenium.belongsClass(inplaceInput, "rf-ii-chng"), "New class should be added to inplace input.");
+ assertTrue(selenium.belongsClass(edit, "rf-ii-none"), "Edit should contain class rf-ii-none when popup is closed.");
assertEquals(selenium.getText(label), "new value", "Label should contain selected value.");
assertEquals(selenium.getText(output), "new value", "Output did not change.");
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceInput/TestRichInplaceInputFAjax.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceInput/TestRichInplaceInputFAjax.java 2011-03-11 12:39:15 UTC (rev 22160)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceInput/TestRichInplaceInputFAjax.java 2011-03-11 13:27:41 UTC (rev 22161)
@@ -22,7 +22,6 @@
package org.richfaces.tests.metamer.ftest.richInplaceInput;
import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardNoRequest;
-import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardXhr;
import static org.jboss.test.selenium.locator.LocatorFactory.jq;
import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
import static org.testng.Assert.assertEquals;
@@ -33,15 +32,9 @@
import javax.faces.event.PhaseId;
-import org.jboss.test.selenium.css.CssProperty;
import org.jboss.test.selenium.dom.Event;
-import org.jboss.test.selenium.locator.Attribute;
-import org.jboss.test.selenium.locator.AttributeLocator;
import org.jboss.test.selenium.locator.JQueryLocator;
-import org.jboss.test.selenium.waiting.EventFiredCondition;
import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
-import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
-import org.richfaces.tests.metamer.ftest.annotations.RegressionTest;
import org.testng.annotations.Test;
/**
@@ -55,7 +48,7 @@
private JQueryLocator inplaceInput = pjq("span[id$=inplaceInput]");
private JQueryLocator label = pjq("span.rf-ii-lbl");
private JQueryLocator input = pjq("input[id$=inplaceInputInput]");
- private JQueryLocator edit = pjq("span.rf-ii-edit");
+ private JQueryLocator edit = pjq("span.rf-ii-fld-cntr");
private JQueryLocator okButton = pjq("input.rf-ii-btn[id$=Okbtn]");
private JQueryLocator cancelButton = pjq("input.rf-ii-btn[id$=Cancelbtn]");
private JQueryLocator output = pjq("span[id$=output]");
@@ -68,13 +61,13 @@
@Test
public void testClick() {
guardNoRequest(selenium).click(inplaceInput);
- assertFalse(selenium.belongsClass(edit, "rf-ii-none"), "Edit should not contain class rf-is-none when popup is open.");
+ assertFalse(selenium.belongsClass(edit, "rf-ii-none"), "Edit should not contain class rf-ii-none when popup is open.");
assertTrue(selenium.isDisplayed(input), "Input should be displayed.");
selenium.type(input, "new value");
selenium.fireEvent(input, Event.BLUR);
- assertTrue(selenium.belongsClass(inplaceInput, "rf-ii-c-s"), "New class should be added to inplace input.");
- assertTrue(selenium.belongsClass(edit, "rf-ii-none"), "Edit should contain class rf-is-none when popup is closed.");
+ assertTrue(selenium.belongsClass(inplaceInput, "rf-ii-chng"), "New class should be added to inplace input.");
+ assertTrue(selenium.belongsClass(edit, "rf-ii-none"), "Edit should contain class rf-ii-none when popup is closed.");
assertEquals(selenium.getText(label), "new value", "Label should contain selected value.");
assertEquals(selenium.getText(output), "new value", "Output did not change.");
13 years, 3 months
JBoss Rich Faces SVN: r22160 - in branches/4.0.X: examples/iteration-demo/src/main/webapp and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2011-03-11 07:39:15 -0500 (Fri, 11 Mar 2011)
New Revision: 22160
Modified:
branches/4.0.X/examples/iteration-demo/src/main/java/org/richfaces/demo/TreeBean.java
branches/4.0.X/examples/iteration-demo/src/main/webapp/tree.xhtml
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractTree.java
Log:
https://issues.jboss.org/browse/RF-9718
Reviewed by Ilya
Modified: branches/4.0.X/examples/iteration-demo/src/main/java/org/richfaces/demo/TreeBean.java
===================================================================
--- branches/4.0.X/examples/iteration-demo/src/main/java/org/richfaces/demo/TreeBean.java 2011-03-11 11:56:56 UTC (rev 22159)
+++ branches/4.0.X/examples/iteration-demo/src/main/java/org/richfaces/demo/TreeBean.java 2011-03-11 12:39:15 UTC (rev 22160)
@@ -52,7 +52,9 @@
import org.richfaces.event.TreeToggleListener;
import org.richfaces.log.LogFactory;
import org.richfaces.log.Logger;
+import org.richfaces.model.SwingTreeNodeDataModelImpl;
import org.richfaces.model.SwingTreeNodeImpl;
+import org.richfaces.model.TreeDataModel;
import org.richfaces.model.TreeNodeImpl;
/**
@@ -112,6 +114,8 @@
private List<TreeNode> lazyRootNodes;
+ private TreeDataModel<?> treeDataModel;
+
private SwitchType toggleType = SwitchType.DEFAULT;
private SwitchType selectionType = SwitchType.client;
@@ -187,6 +191,8 @@
rootNodes = parser.getRootNodes();
lazyRootNodes = createLazyNodes(rootNodes);
classicTreeNode = createRootClassicNode(rootNodes);
+ treeDataModel = new SwingTreeNodeDataModelImpl();
+ treeDataModel.setWrappedData(rootNodes);
} catch (Exception e) {
LOGGER.error(e.getMessage(), e);
}
@@ -307,4 +313,8 @@
return INTEGER_SEQUENCE_KEY_CONVERTER;
}
+ public TreeDataModel<?> getTreeDataModel() {
+ return treeDataModel;
+ }
+
}
Modified: branches/4.0.X/examples/iteration-demo/src/main/webapp/tree.xhtml
===================================================================
--- branches/4.0.X/examples/iteration-demo/src/main/webapp/tree.xhtml 2011-03-11 11:56:56 UTC (rev 22159)
+++ branches/4.0.X/examples/iteration-demo/src/main/webapp/tree.xhtml 2011-03-11 12:39:15 UTC (rev 22160)
@@ -131,8 +131,12 @@
</it:treeNode>
</it:tree>
+ <h:commandLink value="Re-render">
+ <f:ajax render=":form:tree" execute="@all" />
+ </h:commandLink>
+
org.richfaces.model.TreeNode support:
- <it:tree value="#{treeBean.classicTreeNode}" var="node"
+ <it:tree id="treeNodeSupport" value="#{treeBean.classicTreeNode}" var="node"
selectionType="#{treeBean.selectionType}" toggleType="#{treeBean.toggleType}"
rowKeyConverter="#{treeBean.integerSequenceKeyConveter}">
<it:treeNode>
@@ -143,9 +147,17 @@
</it:treeNode>
</it:tree>
- <h:commandLink value="Re-render">
- <f:ajax render=":form:tree" execute="@all" />
- </h:commandLink>
+ org.richfaces.model.TreeDataModel support:
+ <it:tree id="treeDataModelSupport" value="#{treeBean.treeDataModel}" var="node"
+ selectionType="#{treeBean.selectionType}" toggleType="#{treeBean.toggleType}"
+ rowKeyConverter="#{treeBean.integerSequenceKeyConveter}">
+ <it:treeNode>
+ #{node.data} -
+ <h:commandLink value="link" action="#{treeBean.clickNode}">
+ <f:ajax render=":messages" />
+ </h:commandLink>
+ </it:treeNode>
+ </it:tree>
Tree with customized look:
<it:tree id="customizedTree" var="node" value="#{treeBean.rootNodes}"
Modified: branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractTree.java
===================================================================
--- branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractTree.java 2011-03-11 11:56:56 UTC (rev 22159)
+++ branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractTree.java 2011-03-11 12:39:15 UTC (rev 22160)
@@ -478,6 +478,14 @@
} else if (value instanceof TreeNode) {
dataModel = new ClassicTreeNodeDataModelImpl();
dataModel.setWrappedData(value);
+ } else if (value instanceof TreeDataModel<?>) {
+ if (value instanceof ExtendedDataModel<?>) {
+ dataModel = (ExtendedDataModel<?>) value;
+ } else {
+ throw new IllegalArgumentException(
+ MessageFormat.format("TreeDataModel implementation {0} is not a subclass of ExtendedDataModel",
+ value.getClass().getName()));
+ }
} else {
dataModel = new SwingTreeNodeDataModelImpl();
dataModel.setWrappedData(value);
13 years, 3 months