JBoss Rich Faces SVN: r6097 - in trunk: samples/richfaces-demo/src/main/java/org/richfaces/demo/datafilterslider and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2008-02-14 12:56:46 -0500 (Thu, 14 Feb 2008)
New Revision: 6097
Modified:
trunk/samples/dataFilterSliderDemo/src/main/java/org/richfaces/DemoInventoryList.java
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/datafilterslider/DemoInventoryList.java
trunk/test-applications/facelets/src/main/java/dfs/DemoInventoryList.java
trunk/test-applications/jsp/src/main/java/dfs/DemoInventoryList.java
Log:
http://jira.jboss.com/jira/browse/RF-2237
Modified: trunk/samples/dataFilterSliderDemo/src/main/java/org/richfaces/DemoInventoryList.java
===================================================================
--- trunk/samples/dataFilterSliderDemo/src/main/java/org/richfaces/DemoInventoryList.java 2008-02-14 17:53:17 UTC (rev 6096)
+++ trunk/samples/dataFilterSliderDemo/src/main/java/org/richfaces/DemoInventoryList.java 2008-02-14 17:56:46 UTC (rev 6097)
@@ -251,7 +251,8 @@
public void filterCarList(ActionEvent event) {
- getDataFilterSlider().resetDataTable();
+ UIDataFltrSlider slider = getDataFilterSlider();
+ slider.resetDataTable();
try{
filterValue = String.valueOf(carMakeIndexUIData.getRowIndex());
@@ -264,7 +265,7 @@
e.printStackTrace();
}
-
+ slider.filterDataTable(slider.getHandleValue());
}
private static String getAttribute(ActionEvent event, String name) {
Modified: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/datafilterslider/DemoInventoryList.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/datafilterslider/DemoInventoryList.java 2008-02-14 17:53:17 UTC (rev 6096)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/datafilterslider/DemoInventoryList.java 2008-02-14 17:56:46 UTC (rev 6097)
@@ -231,7 +231,8 @@
public void filterCarList(ActionEvent event) {
- getDataFilterSlider().resetDataTable();
+ UIDataFltrSlider slider = getDataFilterSlider();
+ slider.resetDataTable();
try{
filterValue = String.valueOf(carMakeIndexUIData.getRowIndex());
@@ -244,7 +245,7 @@
e.printStackTrace();
}
-
+ slider.filterDataTable(slider.getHandleValue());
}
private static String getAttribute(ActionEvent event, String name) {
Modified: trunk/test-applications/facelets/src/main/java/dfs/DemoInventoryList.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/dfs/DemoInventoryList.java 2008-02-14 17:53:17 UTC (rev 6096)
+++ trunk/test-applications/facelets/src/main/java/dfs/DemoInventoryList.java 2008-02-14 17:56:46 UTC (rev 6097)
@@ -251,7 +251,8 @@
public void filterCarList(ActionEvent event) {
- getDataFilterSlider().resetDataTable();
+ UIDataFltrSlider slider = getDataFilterSlider();
+ slider.resetDataTable();
try{
filterValue = String.valueOf(carMakeIndexUIData.getRowIndex());
@@ -264,7 +265,7 @@
e.printStackTrace();
}
-
+ slider.filterDataTable(slider.getHandleValue());
}
private static String getAttribute(ActionEvent event, String name) {
Modified: trunk/test-applications/jsp/src/main/java/dfs/DemoInventoryList.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/dfs/DemoInventoryList.java 2008-02-14 17:53:17 UTC (rev 6096)
+++ trunk/test-applications/jsp/src/main/java/dfs/DemoInventoryList.java 2008-02-14 17:56:46 UTC (rev 6097)
@@ -251,7 +251,8 @@
public void filterCarList(ActionEvent event) {
- getDataFilterSlider().resetDataTable();
+ UIDataFltrSlider slider = getDataFilterSlider();
+ slider.resetDataTable();
try{
filterValue = String.valueOf(carMakeIndexUIData.getRowIndex());
@@ -264,7 +265,7 @@
e.printStackTrace();
}
-
+ slider.filterDataTable(slider.getHandleValue());
}
private static String getAttribute(ActionEvent event, String name) {
18 years, 2 months
JBoss Rich Faces SVN: r6096 - trunk/sandbox/ui/inplaceInput/src/test/java/org/richfaces/rendekit.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-02-14 12:53:17 -0500 (Thu, 14 Feb 2008)
New Revision: 6096
Modified:
trunk/sandbox/ui/inplaceInput/src/test/java/org/richfaces/rendekit/InplaceInputRendererTest.java
Log:
Modified: trunk/sandbox/ui/inplaceInput/src/test/java/org/richfaces/rendekit/InplaceInputRendererTest.java
===================================================================
--- trunk/sandbox/ui/inplaceInput/src/test/java/org/richfaces/rendekit/InplaceInputRendererTest.java 2008-02-14 17:51:30 UTC (rev 6095)
+++ trunk/sandbox/ui/inplaceInput/src/test/java/org/richfaces/rendekit/InplaceInputRendererTest.java 2008-02-14 17:53:17 UTC (rev 6096)
@@ -1,10 +1,5 @@
package org.richfaces.rendekit;
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.faces.component.UIComponent;
-
import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
import org.richfaces.component.UIInplaceInput;
import org.richfaces.renderkit.html.InplaceInputRenderer;
@@ -14,17 +9,9 @@
public class InplaceInputRendererTest extends AbstractAjax4JsfTestCase{
- private UIComponent form;
private UIInplaceInput iinput;
private InplaceInputRenderer renderer;
- private static Set javaScripts = new HashSet();
-
- static {
- javaScripts.add("scripts/inplaceinput.js");
- javaScripts.add("prototype.js");
- }
-
public InplaceInputRendererTest(String name) {
super(name);
18 years, 2 months
JBoss Rich Faces SVN: r6095 - trunk/sandbox/ui/inplaceInput/src/test/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-02-14 12:51:30 -0500 (Thu, 14 Feb 2008)
New Revision: 6095
Removed:
trunk/sandbox/ui/inplaceInput/src/test/java/org/richfaces/component/JSFComponentTest.java
Log:
Deleted: trunk/sandbox/ui/inplaceInput/src/test/java/org/richfaces/component/JSFComponentTest.java
===================================================================
--- trunk/sandbox/ui/inplaceInput/src/test/java/org/richfaces/component/JSFComponentTest.java 2008-02-14 17:50:56 UTC (rev 6094)
+++ trunk/sandbox/ui/inplaceInput/src/test/java/org/richfaces/component/JSFComponentTest.java 2008-02-14 17:51:30 UTC (rev 6095)
@@ -1,53 +0,0 @@
-/**
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.component;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-import javax.faces.component.UIComponent;
-
-/**
- * Unit test for simple Component.
- */
-public class JSFComponentTest
- extends TestCase
-{
- /**
- * Create the test case
- *
- * @param testName name of the test case
- */
- public JSFComponentTest( String testName )
- {
- super( testName );
- }
-
-
- /**
- * Rigourous Test :-)
- */
- public void testComponent()
- {
- assertTrue( true );
- }
-}
18 years, 2 months
JBoss Rich Faces SVN: r6094 - in trunk/sandbox/ui/inplaceInput/src/test/java/org/richfaces: component and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-02-14 12:50:56 -0500 (Thu, 14 Feb 2008)
New Revision: 6094
Added:
trunk/sandbox/ui/inplaceInput/src/test/java/org/richfaces/component/InplaceInputComponentTest.java
trunk/sandbox/ui/inplaceInput/src/test/java/org/richfaces/rendekit/
trunk/sandbox/ui/inplaceInput/src/test/java/org/richfaces/rendekit/InplaceInputRendererTest.java
Log:
add JUnits
Added: trunk/sandbox/ui/inplaceInput/src/test/java/org/richfaces/component/InplaceInputComponentTest.java
===================================================================
--- trunk/sandbox/ui/inplaceInput/src/test/java/org/richfaces/component/InplaceInputComponentTest.java (rev 0)
+++ trunk/sandbox/ui/inplaceInput/src/test/java/org/richfaces/component/InplaceInputComponentTest.java 2008-02-14 17:50:56 UTC (rev 6094)
@@ -0,0 +1,96 @@
+package org.richfaces.component;
+
+
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import javax.faces.component.UIForm;
+import javax.faces.component.html.HtmlForm;
+
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+import org.apache.commons.lang.StringUtils;
+
+import com.gargoylesoftware.htmlunit.html.HtmlElement;
+import com.gargoylesoftware.htmlunit.html.HtmlPage;
+import com.gargoylesoftware.htmlunit.html.HtmlScript;
+
+public class InplaceInputComponentTest extends AbstractAjax4JsfTestCase {
+
+ UIForm form;
+ UIInplaceInput iinput;
+
+ private static Set javaScripts = new HashSet();
+
+ static {
+ javaScripts.add("a4j_3_2_0-SNAPSHOTorg.ajax4jsf.javascript.PrototypeScript");
+ javaScripts.add("a4j_3_2_0-SNAPSHOTscripts/inplaceinput.js");
+ }
+
+ public InplaceInputComponentTest(String name) {
+ super(name);
+ }
+
+ public void setUp() throws Exception {
+ super.setUp();
+ form = new HtmlForm();
+ form.setId("form");
+ facesContext.getViewRoot().getChildren().add(form);
+ iinput = (UIInplaceInput)application.createComponent("org.richfaces.InplaceInput");
+ iinput.setValue("New York");
+ form.getChildren().add(iinput);
+
+
+ }
+
+ public void testRenderer() throws Exception {
+ HtmlPage page = renderView();
+ assertNotNull(page);
+ }
+
+ public void testComboBoxStyles() throws Exception {
+ HtmlPage page = renderView();
+ assertNotNull(page);
+ List links = page.getDocumentElement().getHtmlElementsByTagName("link");
+ if(links.size()==0){fail();}
+ for (int i = 0; i < links.size(); i++) {
+ HtmlElement link = (HtmlElement) links.get(i);
+ assertTrue(link.getAttributeValue("href").contains(
+ "css/inplaceinput.xcss"));
+ }
+ }
+
+ public void testComboBoxScripts() throws Exception {
+ HtmlPage page = renderView();
+ assertNotNull(page);
+ List scripts = page.getDocumentElement().getHtmlElementsByTagName("script");
+
+ for (Iterator it = scripts.iterator(); it.hasNext();) {
+ HtmlScript item = (HtmlScript) it.next();
+ String srcAttr = item.getSrcAttribute();
+ if (item.getFirstChild() != null) {
+ String scriptBodyString = item.getFirstChild().toString();
+ assertTrue(scriptBodyString.contains("Richfaces.InplaceInput"));
+ assertTrue(scriptBodyString.contains("Richfaces.InplaceInput.CLASSES"));
+
+ }
+ if (StringUtils.isNotBlank(srcAttr)) {
+ boolean found = false;
+ for (Iterator srcIt = javaScripts.iterator(); srcIt.hasNext();) {
+ String src = (String) srcIt.next();
+ found = srcAttr.contains(src);
+ if (found) {
+ break;
+ }
+ }
+ assertTrue(found);
+ }
+ }
+ }
+
+
+ public void tearDown() throws Exception {
+ super.tearDown();
+ }
+}
Added: trunk/sandbox/ui/inplaceInput/src/test/java/org/richfaces/rendekit/InplaceInputRendererTest.java
===================================================================
--- trunk/sandbox/ui/inplaceInput/src/test/java/org/richfaces/rendekit/InplaceInputRendererTest.java (rev 0)
+++ trunk/sandbox/ui/inplaceInput/src/test/java/org/richfaces/rendekit/InplaceInputRendererTest.java 2008-02-14 17:50:56 UTC (rev 6094)
@@ -0,0 +1,58 @@
+package org.richfaces.rendekit;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.faces.component.UIComponent;
+
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+import org.richfaces.component.UIInplaceInput;
+import org.richfaces.renderkit.html.InplaceInputRenderer;
+
+import com.gargoylesoftware.htmlunit.html.HtmlElement;
+import com.gargoylesoftware.htmlunit.html.HtmlPage;
+
+public class InplaceInputRendererTest extends AbstractAjax4JsfTestCase{
+
+ private UIComponent form;
+ private UIInplaceInput iinput;
+ private InplaceInputRenderer renderer;
+
+ private static Set javaScripts = new HashSet();
+
+ static {
+ javaScripts.add("scripts/inplaceinput.js");
+ javaScripts.add("prototype.js");
+ }
+
+
+ public InplaceInputRendererTest(String name) {
+ super(name);
+ }
+
+
+ public void setUp() throws Exception {
+ super.setUp();
+ renderer = new InplaceInputRenderer();
+ iinput = (UIInplaceInput)application.createComponent("org.richfaces.InplaceInput");
+ iinput.setValue("New York");
+ facesContext.getViewRoot().getChildren().add(iinput);
+ }
+
+ public void testRender(){
+
+ try {
+ HtmlPage page = renderView();
+ assertNotNull(page);
+ HtmlElement elem = page.getHtmlElementById(iinput.getClientId(facesContext));
+ assertNotNull(elem);
+ assertEquals(elem.getTagName(), "span");
+ renderer.doEncodeEnd(writer, facesContext, iinput);
+
+ } catch (Exception e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ fail();
+ }
+ }
+}
18 years, 2 months
JBoss Rich Faces SVN: r6093 - in trunk/ui/combobox/src/test/java/org/richfaces: component and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-02-14 12:08:18 -0500 (Thu, 14 Feb 2008)
New Revision: 6093
Added:
trunk/ui/combobox/src/test/java/org/richfaces/component/
trunk/ui/combobox/src/test/java/org/richfaces/component/ComboBoxComponentTest.java
trunk/ui/combobox/src/test/java/org/richfaces/renderkit/
trunk/ui/combobox/src/test/java/org/richfaces/renderkit/ComboBoxRendererTest.java
Log:
rename package's
Added: trunk/ui/combobox/src/test/java/org/richfaces/component/ComboBoxComponentTest.java
===================================================================
--- trunk/ui/combobox/src/test/java/org/richfaces/component/ComboBoxComponentTest.java (rev 0)
+++ trunk/ui/combobox/src/test/java/org/richfaces/component/ComboBoxComponentTest.java 2008-02-14 17:08:18 UTC (rev 6093)
@@ -0,0 +1,162 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.component;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import javax.faces.component.UIForm;
+import javax.faces.component.UISelectItem;
+import javax.faces.component.UISelectItems;
+import javax.faces.component.html.HtmlForm;
+import javax.faces.model.SelectItem;
+
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+import org.apache.commons.lang.StringUtils;
+import org.richfaces.component.UIComboBox;
+
+import com.gargoylesoftware.htmlunit.html.HtmlElement;
+import com.gargoylesoftware.htmlunit.html.HtmlPage;
+import com.gargoylesoftware.htmlunit.html.HtmlScript;
+
+public class ComboBoxComponentTest extends AbstractAjax4JsfTestCase {
+
+ UIComboBox comboBox;
+ UIForm form;
+ String suggestions = "Alabama,Alaska,Arizona,Arkansas,California,Colorado,Connecticut,Delaware,Florida,Massachusetts,Michigan,Georgia,Hawaii,Idaho,Indiana,Iowa,Kansas,Kentucky,Louisiana,Maine,Minnesota,Mississippi,Missouri,Montana,Nebraska";
+ List selectItems = new ArrayList();
+
+
+ private static Set javaScripts = new HashSet();
+
+ static {
+ javaScripts.add("a4j_3_2_0-SNAPSHOTorg.ajax4jsf.javascript.PrototypeScript");
+ javaScripts.add("a4j_3_2_0-SNAPSHOTscripts/comboboxUtils.js");
+ javaScripts.add("a4j_3_2_0-SNAPSHOTscripts/combobox.js");
+ javaScripts.add("a4j_3_2_0-SNAPSHOTorg/richfaces/renderkit/html/scripts/utils.js");
+
+ }
+
+ public ComboBoxComponentTest( String testName ) {
+ super( testName );
+ }
+
+ public void setUp() throws Exception {
+ super.setUp();
+
+ form = new HtmlForm();
+ form.setId("form");
+ facesContext.getViewRoot().getChildren().add(form);
+
+ comboBox = (UIComboBox)application.createComponent("org.richfaces.ComboBox");
+ comboBox.setSuggestionValues(Arrays.asList(suggestions.split(",")));
+
+ selectItems.add(new SelectItem("District of Columbia"));
+ selectItems.add(new SelectItem("Illinois"));
+ selectItems.add(new SelectItem("Maryland"));
+ selectItems.add(new SelectItem("Nevada"));
+ selectItems.add(new SelectItem("New Hampshire"));
+ selectItems.add(new SelectItem("New Jersey"));
+
+ UISelectItem item1 = new UISelectItem();
+ item1.setValue(new SelectItem("Oregon"));
+
+ UISelectItem item2 = new UISelectItem();
+ item2.setValue(new SelectItem("Pennsylvania"));
+
+ UISelectItem item3 = new UISelectItem();
+ item3.setValue(new SelectItem("Rhode Island"));
+
+ UISelectItem item4 = new UISelectItem();
+ item4.setValue(new SelectItem("South Carolina"));
+
+ comboBox.getChildren().add(item1);
+ comboBox.getChildren().add(item2);
+ comboBox.getChildren().add(item3);
+ comboBox.getChildren().add(item4);
+
+ UISelectItems items = new UISelectItems();
+ items.setValue(selectItems);
+ form.getChildren().add(comboBox);
+ }
+
+ public void testRender() throws Exception {
+ HtmlPage page = renderView();
+ assertNotNull(page);
+ }
+
+ public void testComboBoxStyles() throws Exception {
+ HtmlPage page = renderView();
+ assertNotNull(page);
+ List links = page.getDocumentElement().getHtmlElementsByTagName("link");
+ if(links.size()==0){fail();}
+ for (int i = 0; i < links.size(); i++) {
+ HtmlElement link = (HtmlElement) links.get(i);
+ assertTrue(link.getAttributeValue("href").contains(
+ "css/combobox.xcss"));
+ }
+ }
+
+ public void testComboBoxScripts() throws Exception {
+ HtmlPage page = renderView();
+ assertNotNull(page);
+
+ List scripts = page.getDocumentElement().getHtmlElementsByTagName("script");
+ for (Iterator it = scripts.iterator(); it.hasNext();) {
+ HtmlScript item = (HtmlScript) it.next();
+ String srcAttr = item.getSrcAttribute();
+ if (item.getFirstChild() != null) {
+ String scriptBodyString = item.getFirstChild().toString();
+ if (scriptBodyString.contains("Richfaces.ComboBox")) {
+ assertTrue(scriptBodyString.contains("Richfaces.ComboBox.CLASSES"));
+ }
+ }
+
+ if (StringUtils.isNotBlank(srcAttr)) {
+ boolean found = false;
+ for (Iterator srcIt = javaScripts.iterator(); srcIt.hasNext();) {
+ String src = (String) srcIt.next();
+ found = srcAttr.contains(src);
+ if (found) {
+ break;
+ }
+ }
+ assertTrue(found);
+ }
+ }
+ }
+
+ public void tearDown() throws Exception {
+ // TODO Auto-generated method stub
+ form = null;
+ comboBox = null;
+ super.tearDown();
+ }
+
+ public void testComponent() {
+ assertTrue( true );
+ }
+}
Added: trunk/ui/combobox/src/test/java/org/richfaces/renderkit/ComboBoxRendererTest.java
===================================================================
--- trunk/ui/combobox/src/test/java/org/richfaces/renderkit/ComboBoxRendererTest.java (rev 0)
+++ trunk/ui/combobox/src/test/java/org/richfaces/renderkit/ComboBoxRendererTest.java 2008-02-14 17:08:18 UTC (rev 6093)
@@ -0,0 +1,117 @@
+/**
+ *
+ */
+package org.richfaces.renderkit;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import javax.faces.component.UIComponent;
+import javax.faces.component.UISelectItem;
+import javax.faces.component.UISelectItems;
+import javax.faces.component.UISelectOne;
+import javax.faces.model.SelectItem;
+
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+import org.richfaces.component.UIComboBox;
+import org.richfaces.renderkit.html.ComboBoxRenderer;
+
+import com.gargoylesoftware.htmlunit.html.HtmlElement;
+import com.gargoylesoftware.htmlunit.html.HtmlPage;
+import com.gargoylesoftware.htmlunit.html.HtmlSelect;
+
+/**
+ * @author Anton Belevich
+ *
+ */
+public class ComboBoxRendererTest extends AbstractAjax4JsfTestCase {
+
+ private UIComponent form;
+ private UIComboBox comboBox;
+ private ComboBoxRenderer renderer;
+ String suggestions = "Alabama,Alaska,Arizona,Arkansas,California,Colorado,Connecticut,Delaware,Florida,Massachusetts,Michigan,Georgia,Hawaii,Idaho,Indiana,Iowa,Kansas,Kentucky,Louisiana,Maine,Minnesota,Mississippi,Missouri,Montana,Nebraska";
+ List selectItems = new ArrayList();
+
+
+ private static Set javaScripts = new HashSet();
+
+ static {
+ javaScripts.add("org/richfaces/renderkit/html/scripts/combobox.js");
+ javaScripts.add("org/richfaces/renderkit/html/scripts/comboboxUtils.js");
+ javaScripts.add("prototype.js");
+ }
+
+
+ public void setUp() throws Exception {
+ super.setUp();
+ renderer = new ComboBoxRenderer();
+ comboBox = (UIComboBox)application.createComponent("org.richfaces.ComboBox");
+ comboBox.setSuggestionValues(Arrays.asList(suggestions.split(",")));
+
+ selectItems.add(new SelectItem("District of Columbia"));
+ selectItems.add(new SelectItem("Illinois"));
+ selectItems.add(new SelectItem("Maryland"));
+ selectItems.add(new SelectItem("Nevada"));
+ selectItems.add(new SelectItem("New Hampshire"));
+ selectItems.add(new SelectItem("New Jersey"));
+
+ UISelectItem item1 = new UISelectItem();
+ item1.setValue(new SelectItem("Oregon"));
+
+ UISelectItem item2 = new UISelectItem();
+ item2.setValue(new SelectItem("Pennsylvania"));
+
+ UISelectItem item3 = new UISelectItem();
+ item3.setValue(new SelectItem("Rhode Island"));
+
+ UISelectItem item4 = new UISelectItem();
+ item4.setValue(new SelectItem("South Carolina"));
+
+ comboBox.getChildren().add(item1);
+ comboBox.getChildren().add(item2);
+ comboBox.getChildren().add(item3);
+ comboBox.getChildren().add(item4);
+
+ UISelectItems items = new UISelectItems();
+ items.setValue(selectItems);
+ facesContext.getViewRoot().getChildren().add(comboBox);
+
+ }
+
+ public void itemsTextAsJSArrayTest() {
+ String script = renderer.getItemsTextAsJSArray(facesContext, comboBox);
+ assertNotNull(script);
+ }
+
+ public void testRender(){
+
+ try {
+ HtmlPage page = renderView();
+ assertNotNull(page);
+ HtmlElement elem = page.getHtmlElementById("control"+ comboBox.getClientId(facesContext));
+ assertNotNull(elem);
+ assertEquals(elem.getTagName(), "div");
+ renderer.doEncodeEnd(writer, facesContext, comboBox);
+
+ } catch (Exception e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+
+ public void tearDown() throws Exception {
+ super.tearDown();
+ renderer = null;
+ }
+
+
+
+ public ComboBoxRendererTest(String name) {
+ super(name);
+ }
+}
18 years, 2 months
JBoss Rich Faces SVN: r6091 - trunk/sandbox/samples/inplaceSelect-sample.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-02-14 11:44:47 -0500 (Thu, 14 Feb 2008)
New Revision: 6091
Modified:
trunk/sandbox/samples/inplaceSelect-sample/pom.xml
Log:
Modified: trunk/sandbox/samples/inplaceSelect-sample/pom.xml
===================================================================
--- trunk/sandbox/samples/inplaceSelect-sample/pom.xml 2008-02-14 16:41:39 UTC (rev 6090)
+++ trunk/sandbox/samples/inplaceSelect-sample/pom.xml 2008-02-14 16:44:47 UTC (rev 6091)
@@ -9,7 +9,7 @@
<artifactId>inplaceSelect-sample</artifactId>
<packaging>war</packaging>
<name>JSF Maven Webapp</name>
- <version>1.0-SNAPSHOT</version>
+ <version>3.2.0-SNAPSHOT</version>
<build>
<finalName>inplaceSelect-sample</finalName>
<plugins>
@@ -81,5 +81,11 @@
<artifactId>skins</artifactId>
<version>3.2.0-SNAPSHOT</version>
</dependency>
+ <dependency>
+ <groupId>org.richfaces.sandbox.ui</groupId>
+ <artifactId>inplaceSelect</artifactId>
+ <version>3.2.0-SNAPSHOT</version>
+ </dependency>
+
</dependencies>
</project>
\ No newline at end of file
18 years, 2 months
JBoss Rich Faces SVN: r6090 - in trunk/sandbox/ui: inplaceSelect and 22 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-02-14 11:41:39 -0500 (Thu, 14 Feb 2008)
New Revision: 6090
Added:
trunk/sandbox/ui/inplaceSelect/
trunk/sandbox/ui/inplaceSelect/pom.xml
trunk/sandbox/ui/inplaceSelect/src/
trunk/sandbox/ui/inplaceSelect/src/main/
trunk/sandbox/ui/inplaceSelect/src/main/config/
trunk/sandbox/ui/inplaceSelect/src/main/config/component/
trunk/sandbox/ui/inplaceSelect/src/main/config/component/inplaceselect.xml
trunk/sandbox/ui/inplaceSelect/src/main/java/
trunk/sandbox/ui/inplaceSelect/src/main/java/org/
trunk/sandbox/ui/inplaceSelect/src/main/java/org/richfaces/
trunk/sandbox/ui/inplaceSelect/src/main/java/org/richfaces/component/
trunk/sandbox/ui/inplaceSelect/src/main/java/org/richfaces/component/UIInplaceSelect.java
trunk/sandbox/ui/inplaceSelect/src/main/java/org/richfaces/renderkit/
trunk/sandbox/ui/inplaceSelect/src/main/java/org/richfaces/renderkit/InplaceSelectBaseRenderer.java
trunk/sandbox/ui/inplaceSelect/src/main/resources/
trunk/sandbox/ui/inplaceSelect/src/main/resources/org/
trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/
trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/
trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/
trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/css/
trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/css/inplaceselect.xcss
trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/
trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
trunk/sandbox/ui/inplaceSelect/src/main/templates/
trunk/sandbox/ui/inplaceSelect/src/main/templates/README
trunk/sandbox/ui/inplaceSelect/src/main/templates/inplaceselect.jspx
trunk/sandbox/ui/inplaceSelect/src/test/
trunk/sandbox/ui/inplaceSelect/src/test/java/
trunk/sandbox/ui/inplaceSelect/src/test/java/org/
trunk/sandbox/ui/inplaceSelect/src/test/java/org/richfaces/
trunk/sandbox/ui/inplaceSelect/src/test/java/org/richfaces/component/
trunk/sandbox/ui/inplaceSelect/src/test/java/org/richfaces/component/JSFComponentTest.java
trunk/sandbox/ui/inplaceSelect/target/
Log:
initial commit
Added: trunk/sandbox/ui/inplaceSelect/pom.xml
===================================================================
--- trunk/sandbox/ui/inplaceSelect/pom.xml (rev 0)
+++ trunk/sandbox/ui/inplaceSelect/pom.xml 2008-02-14 16:41:39 UTC (rev 6090)
@@ -0,0 +1,55 @@
+<?xml version="1.0"?><project>
+ <parent>
+ <artifactId>ui</artifactId>
+ <groupId>org.richfaces.sandbox</groupId>
+ <version>3.2.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces</groupId>
+ <artifactId>inplaceSelect</artifactId>
+ <name>inplaceSelect</name>
+ <version>3.2.0-SNAPSHOT</version>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.richfaces.cdk</groupId>
+ <artifactId>maven-cdk-plugin</artifactId>
+ <version>3.2.0-SNAPSHOT</version>
+ <executions>
+ <execution>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <library>
+ <prefix>org.richfaces</prefix>
+ <taglib>
+ <shortName>inplaceSelect</shortName>
+ </taglib>
+ </library>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.framework</groupId>
+ <artifactId>richfaces-impl</artifactId>
+ <version>3.2.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.framework</groupId>
+ <artifactId>richfaces-api</artifactId>
+ <version>3.2.0-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Added: trunk/sandbox/ui/inplaceSelect/src/main/config/component/inplaceselect.xml
===================================================================
--- trunk/sandbox/ui/inplaceSelect/src/main/config/component/inplaceselect.xml (rev 0)
+++ trunk/sandbox/ui/inplaceSelect/src/main/config/component/inplaceselect.xml 2008-02-14 16:41:39 UTC (rev 6090)
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" >
+<components>
+ <component>
+ <name>org.richfaces.InplaceSelect</name>
+ <family>org.richfaces.InplaceSelect</family>
+ <classname>
+ org.richfaces.component.html.HtmlInplaceSelect
+ </classname>
+ <superclass>org.richfaces.component.UIInplaceSelect</superclass>
+ <test>
+ <classname>org.richfaces.component.html.HtmlInplaceSelectComponentTest</classname>
+ <superclassname>org.ajax4jsf.tests.AbstractAjax4JsfTestCase</superclassname>
+ </test>
+ <description>
+ <![CDATA[ ]]>
+ </description>
+ <renderer generate="true" override="true">
+ <name>org.richfaces.renderkit.InplaceSelectRenderer</name>
+ <template>inplaceselect.jspx</template>
+ </renderer>
+
+ <tag>
+ <name>inplaceSelect</name>
+ <classname>org.richfaces.taglib.InplaceSelectTag</classname>
+ <superclass>
+ org.ajax4jsf.webapp.taglib.HtmlComponentTagBase
+ </superclass>
+ </tag>
+ <properties>
+ <property>
+ <name>editEvent</name>
+ <classname>java.lang.String</classname>
+ <defaultvalue><![CDATA["click"]]></defaultvalue>
+ </property>
+ <property>
+ <name>maxSelectWidth</name>
+ <classname>java.lang.String</classname>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>minSelectWidth</name>
+ <classname>java.lang.String</classname>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>selectWidth</name>
+ <classname>java.lang.String</classname>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>defaultLabel</name>
+ <classname>java.lang.String</classname>
+ <defaultvalue><![CDATA["Click..."]]></defaultvalue>
+ </property>
+ <property>
+ <name>showControls</name>
+ <classname>boolean</classname>
+ <defaultvalue>false</defaultvalue>
+ </property>
+ <property>
+ <name>saveControlIcon</name>
+ <classname>java.lang.String</classname>
+ </property>
+ <property>
+ <name>cancelControlIcon</name>
+ <classname>java.lang.String</classname>
+ </property>
+ <property>
+ <name>controlsPosition</name>
+ <classname>java.lang.String</classname>
+ <defaultvalue><![CDATA["right"]]></defaultvalue>
+ </property>
+ <property>
+ <name>applyFromControlsOnly</name>
+ <classname>boolean</classname>
+ <defaultvalue>false</defaultvalue>
+ </property>
+ <property>
+ <name>oneditactivation</name>
+ <classname>java.lang.String</classname>
+ </property>
+ <property>
+ <name>onviewactivation</name>
+ <classname>java.lang.String</classname>
+ </property>
+ <property>
+ <name>oneditactivated</name>
+ <classname>java.lang.String</classname>
+ </property>
+ <property>
+ <name>onviewactivated</name>
+ <classname>java.lang.String</classname>
+ </property>
+ <property>
+ <name>selectOnEdit</name>
+ <classname>boolean</classname>
+ <defaultvalue>false</defaultvalue>
+ </property>
+ <property>
+ <name>tabindex</name>
+ <classname>int</classname>
+ </property>
+ <property>
+ <name>value</name>
+ <classname>java.lang.String</classname>
+ </property>
+ </properties>
+ </component>
+</components>
Added: trunk/sandbox/ui/inplaceSelect/src/main/java/org/richfaces/component/UIInplaceSelect.java
===================================================================
--- trunk/sandbox/ui/inplaceSelect/src/main/java/org/richfaces/component/UIInplaceSelect.java (rev 0)
+++ trunk/sandbox/ui/inplaceSelect/src/main/java/org/richfaces/component/UIInplaceSelect.java 2008-02-14 16:41:39 UTC (rev 6090)
@@ -0,0 +1,11 @@
+package org.richfaces.component;
+
+import javax.faces.component.UISelectOne;
+
+/**
+ * @author Anton Belevich
+ *
+ */
+public class UIInplaceSelect extends UISelectOne{
+
+}
Added: trunk/sandbox/ui/inplaceSelect/src/main/java/org/richfaces/renderkit/InplaceSelectBaseRenderer.java
===================================================================
--- trunk/sandbox/ui/inplaceSelect/src/main/java/org/richfaces/renderkit/InplaceSelectBaseRenderer.java (rev 0)
+++ trunk/sandbox/ui/inplaceSelect/src/main/java/org/richfaces/renderkit/InplaceSelectBaseRenderer.java 2008-02-14 16:41:39 UTC (rev 6090)
@@ -0,0 +1,21 @@
+/**
+ *
+ */
+package org.richfaces.renderkit;
+
+import javax.faces.component.UIComponent;
+
+import org.ajax4jsf.renderkit.HeaderResourcesRendererBase;
+import org.richfaces.component.UIInplaceSelect;
+
+/**
+ * @author Anton Belevich
+ *
+ */
+public class InplaceSelectBaseRenderer extends HeaderResourcesRendererBase{
+
+ protected Class<? extends UIComponent> getComponentClass() {
+ return UIInplaceSelect.class;
+ }
+
+}
Added: trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/css/inplaceselect.xcss
===================================================================
Added: trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
===================================================================
Added: trunk/sandbox/ui/inplaceSelect/src/main/templates/README
===================================================================
Added: trunk/sandbox/ui/inplaceSelect/src/main/templates/inplaceselect.jspx
===================================================================
--- trunk/sandbox/ui/inplaceSelect/src/main/templates/inplaceselect.jspx (rev 0)
+++ trunk/sandbox/ui/inplaceSelect/src/main/templates/inplaceselect.jspx 2008-02-14 16:41:39 UTC (rev 6090)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<f:root
+ xmlns:f="http://ajax4jsf.org/cdk/template"
+ xmlns:c=" http://java.sun.com/jsf/core"
+ xmlns:ui=" http://ajax4jsf.org/cdk/ui"
+ xmlns:u=" http://ajax4jsf.org/cdk/u"
+ xmlns:jsp=" http://ajax4jsf.org/cdk/jsp"
+ xmlns:x=" http://ajax4jsf.org/cdk/x"
+ baseclass="org.richfaces.renderkit.InplaceSelectBaseRenderer"
+ class="org.richfaces.renderkit.html.InplaceSelectRenderer"
+ component="org.richfaces.component.UIInplaceSelect">
+</f:root>
\ No newline at end of file
Added: trunk/sandbox/ui/inplaceSelect/src/test/java/org/richfaces/component/JSFComponentTest.java
===================================================================
--- trunk/sandbox/ui/inplaceSelect/src/test/java/org/richfaces/component/JSFComponentTest.java (rev 0)
+++ trunk/sandbox/ui/inplaceSelect/src/test/java/org/richfaces/component/JSFComponentTest.java 2008-02-14 16:41:39 UTC (rev 6090)
@@ -0,0 +1,53 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.component;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+import javax.faces.component.UIComponent;
+
+/**
+ * Unit test for simple Component.
+ */
+public class JSFComponentTest
+ extends TestCase
+{
+ /**
+ * Create the test case
+ *
+ * @param testName name of the test case
+ */
+ public JSFComponentTest( String testName )
+ {
+ super( testName );
+ }
+
+
+ /**
+ * Rigourous Test :-)
+ */
+ public void testComponent()
+ {
+ assertTrue( true );
+ }
+}
18 years, 2 months
JBoss Rich Faces SVN: r6089 - trunk/sandbox/ui.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-02-14 11:40:15 -0500 (Thu, 14 Feb 2008)
New Revision: 6089
Modified:
trunk/sandbox/ui/pom.xml
Log:
add inplaceSelect module
Modified: trunk/sandbox/ui/pom.xml
===================================================================
--- trunk/sandbox/ui/pom.xml 2008-02-14 16:19:41 UTC (rev 6088)
+++ trunk/sandbox/ui/pom.xml 2008-02-14 16:40:15 UTC (rev 6089)
@@ -21,5 +21,6 @@
<module>sortableHeader</module>
<module>fileUpload</module>
<module>inplaceInput</module>
+ <module>inplaceSelect</module>
</modules>
</project>
\ No newline at end of file
18 years, 2 months
JBoss Rich Faces SVN: r6088 - trunk/docs/faq/en/src/main/docbook/module.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-02-14 11:19:41 -0500 (Thu, 14 Feb 2008)
New Revision: 6088
Modified:
trunk/docs/faq/en/src/main/docbook/module/RFCfaq.xml
Log:
http://jira.jboss.com/jira/browse/RF-2146 - FAQ is updated according to JBoss forum
Modified: trunk/docs/faq/en/src/main/docbook/module/RFCfaq.xml
===================================================================
--- trunk/docs/faq/en/src/main/docbook/module/RFCfaq.xml 2008-02-14 16:17:11 UTC (rev 6087)
+++ trunk/docs/faq/en/src/main/docbook/module/RFCfaq.xml 2008-02-14 16:19:41 UTC (rev 6088)
@@ -7,13 +7,37 @@
</keywordset>
</sectioninfo>
<title>FAQ</title>
-
<section>
+ <?dbhtml filename="WherecouldIfindadditionalinformationonRichFaces.html"?>
+ <title>Where could I find additional information on RichFaces?</title>
+ <para>
+ Most important links for RichFaces can be found <ulink
+ url="http://jboss.com/index.html?module=bb&op=viewtopic&t=104575"
+ >here</ulink>.
+ </para>
+ </section>
+ <section>
<?dbhtml filename="Wherearebinary/sourcedistributionforRichFacesrelease.html"?>
<title>Where are binary/source distribution for RichFaces?</title>
- <para> Most important links for RichFaces can be found <ulink
- url="http://jboss.com/index.html?module=bb&op=viewtopic&t=104575"
- >here</ulink>.</para>
+ <para>
+ <!-- RichFaces are built using CDK (Component Development Kit).
+ CDK generates the library based on the meta-data, component templates and hand-written java classes.
+ What you see in the richfaces-ui-3.1.0-src.zip is a truly source, i.e. a source for CDK.
+ To the debug purpose, you need the source code that is generated by CDK before it is compiled into the binary.
+ -->
+ There are two places where you can find binary/source distribution:
+ <itemizedlist>
+ <listitem>
+ JBoss RichFaces Downloads area which can be found <ulink url="http://labs.jboss.com/jbossrichfaces/downloads/">here</ulink>.
+ Source distribution you can see in the <property>richfaces-ui-3.1.0-src.zip</property>.
+ Binary stored in <property>richfaces-ui-3.1.0-bin.zip</property>
+ </listitem>
+ <listitem>
+ If you use Maven, Maven knows the place where all distributions are stored.
+ Actual links to the Maven repository can be found <ulink url="http://jboss.com/index.html?module=bb&op=viewtopic&t=104575">here</ulink>
+ </listitem>
+ </itemizedlist>
+ </para>
</section>
<section>
18 years, 2 months