[richfaces-svn-commits] JBoss Rich Faces SVN: r15965 - in branches/community/3.3.X/ui: columns/src/main/config/component and 13 other directories.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Sun Nov 22 20:53:44 EST 2009


Author: nbelaevski
Date: 2009-11-22 20:53:43 -0500 (Sun, 22 Nov 2009)
New Revision: 15965

Removed:
   branches/community/3.3.X/ui/columns/src/test/java/org/richfaces/jsp/tag/DataTableTagMock.java
Modified:
   branches/community/3.3.X/ui/beanValidator/src/test/java/org/richfaces/component/BeanValidatorComponentTest.java
   branches/community/3.3.X/ui/beanValidator/src/test/java/org/richfaces/component/GraphValidatorComponentTest.java
   branches/community/3.3.X/ui/columns/src/main/config/component/columns.xml
   branches/community/3.3.X/ui/columns/src/test/java/org/richfaces/jsp/tag/ColumnsJspTagTest.java
   branches/community/3.3.X/ui/componentControl/src/test/java/org/richfaces/component/ComponentControlTest.java
   branches/community/3.3.X/ui/contextMenu/src/test/java/org/richfaces/component/ContextMenuComponentTest.java
   branches/community/3.3.X/ui/core/src/test/java/org/ajax4jsf/component/QueueRendererTest.java
   branches/community/3.3.X/ui/core/src/test/java/org/ajax4jsf/component/UIAjaxFormTest.java
   branches/community/3.3.X/ui/core/src/test/resources/org/ajax4jsf/component/queue-ajax-form.xhtml
   branches/community/3.3.X/ui/hotKey/src/test/java/org/richfaces/component/HotKeyComponentTest.java
   branches/community/3.3.X/ui/message/src/test/java/org/richfaces/renderer/RichMessageRendererTest.java
   branches/community/3.3.X/ui/message/src/test/java/org/richfaces/renderer/RichMessagesRendererTest.java
   branches/community/3.3.X/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingBaseComponent.java
   branches/community/3.3.X/ui/simpleTogglePanel/src/test/java/org/richfaces/component/SimpleTogglePanelComponentTest.java
   branches/community/3.3.X/ui/suggestionbox/src/test/java/org/richfaces/component/SuggestionBoxComponentTest.java
   branches/community/3.3.X/ui/toolBar/src/test/java/org/richfaces/component/ToolBarComponentTest.java
   branches/community/3.3.X/ui/tooltip/src/test/java/org/richfaces/renderkit/html/ToolTipRendererTest.java
   branches/community/3.3.X/ui/tree/src/test/java/org/richfaces/component/TreeComponentTest.java
Log:
UI: merged from 3.3.x_jsf2 branch

Modified: branches/community/3.3.X/ui/beanValidator/src/test/java/org/richfaces/component/BeanValidatorComponentTest.java
===================================================================
--- branches/community/3.3.X/ui/beanValidator/src/test/java/org/richfaces/component/BeanValidatorComponentTest.java	2009-11-23 01:42:31 UTC (rev 15964)
+++ branches/community/3.3.X/ui/beanValidator/src/test/java/org/richfaces/component/BeanValidatorComponentTest.java	2009-11-23 01:53:43 UTC (rev 15965)
@@ -63,6 +63,7 @@
 		form.setId("form");
 		facesContext.getViewRoot().getChildren().add(form);
 		input = (HtmlInputText)application.createComponent(HtmlInputText.COMPONENT_TYPE);
+		input.getAttributes().put("onchange", "return true;");
 		validator = (UIAjaxValidator)application.createComponent(UIAjaxValidator.COMPONENT_TYPE);
 		validator.setId("validator");
 		

Modified: branches/community/3.3.X/ui/beanValidator/src/test/java/org/richfaces/component/GraphValidatorComponentTest.java
===================================================================
--- branches/community/3.3.X/ui/beanValidator/src/test/java/org/richfaces/component/GraphValidatorComponentTest.java	2009-11-23 01:42:31 UTC (rev 15964)
+++ branches/community/3.3.X/ui/beanValidator/src/test/java/org/richfaces/component/GraphValidatorComponentTest.java	2009-11-23 01:53:43 UTC (rev 15965)
@@ -51,6 +51,7 @@
 		validator.setId("validator");
 		input = (UIInput) application.createComponent(UIInput.COMPONENT_TYPE);
 		input.setId("input");
+		input.getAttributes().put("onchange", "return true;");
 		validator.getChildren().add(input);
 		form.getChildren().add(validator);
 		messages = (UIMessages) application

Modified: branches/community/3.3.X/ui/columns/src/main/config/component/columns.xml
===================================================================
--- branches/community/3.3.X/ui/columns/src/main/config/component/columns.xml	2009-11-23 01:42:31 UTC (rev 15964)
+++ branches/community/3.3.X/ui/columns/src/main/config/component/columns.xml	2009-11-23 01:53:43 UTC (rev 15965)
@@ -17,7 +17,6 @@
 			<classname>
 				org.richfaces.taglib.ColumnsTag
 			</classname>
-			<test/>
 		</tag>
 		<taghandler generate="false">
 			<classname>org.richfaces.taglib.ColumnsHandler</classname>

Modified: branches/community/3.3.X/ui/columns/src/test/java/org/richfaces/jsp/tag/ColumnsJspTagTest.java
===================================================================
--- branches/community/3.3.X/ui/columns/src/test/java/org/richfaces/jsp/tag/ColumnsJspTagTest.java	2009-11-23 01:42:31 UTC (rev 15964)
+++ branches/community/3.3.X/ui/columns/src/test/java/org/richfaces/jsp/tag/ColumnsJspTagTest.java	2009-11-23 01:53:43 UTC (rev 15965)
@@ -34,177 +34,170 @@
 import javax.el.ValueExpression;
 import javax.faces.component.UIComponent;
 import javax.faces.webapp.UIComponentClassicTagBase;
+import javax.servlet.jsp.JspException;
 
+import org.ajax4jsf.tests.AbstractJspTestCase;
 import org.ajax4jsf.tests.MockPageContext;
 import org.ajax4jsf.tests.MockValueExpression;
-import org.apache.shale.test.base.AbstractJsfTestCase;
 import org.richfaces.component.UIColumn;
+import org.richfaces.component.UIDataTable;
 import org.richfaces.component.html.HtmlDataTable;
 import org.richfaces.taglib.ColumnsTag;
+import org.richfaces.taglib.DataTableTag;
 
 /**
  * Test class for JSP columns tag
  * 
  * @author Andrey Markavtsov
- * 
+ * @author Nick Belaevski
  */
-public class ColumnsJspTagTest extends AbstractJsfTestCase {
+public class ColumnsJspTagTest extends AbstractJspTestCase {
 
-    /** Jsp tag to be tested */
-    private ColumnsTag tag;
+	/** Jsp tag to be tested */
+	private ColumnsTag tag;
 
-    /** Columns count to be created */
-    private int columnsCount;
+	private DataTableTag parentTag;
 
-    /** Key to store executed tags */
-    private static final String COMPONENT_TAG_STACK_ATTR = "javax.faces.webapp.COMPONENT_TAG_STACK";
+	private UIDataTable dataTable;
 
-    /**
-     * TODO Description goes here.
-     * 
-     * @param name
-     */
-    public ColumnsJspTagTest(String name) {
-	super(name);
-	// TODO Auto-generated constructor stub
-    }
+	/** Columns count to be created */
+	private int columnsCount;
 
-    /**
-     * Creates value expression
-     * 
-     * @param o -
-     *                object to be returned by this expression
-     * @param el -
-     *                ELContext
-     * @return - created value expression
-     */
-    private ValueExpression getValueExpression(Object o, ELContext el) {
-	ValueExpression exp = new MockValueExpression(o);
-	return exp;
-    }
+	/**
+	 * TODO Description goes here.
+	 * 
+	 * @param name
+	 */
+	public ColumnsJspTagTest(String name) {
+		super(name);
+		// TODO Auto-generated constructor stub
+	}
 
-    /**
-     * Inits parent tag contained Data Table component
-     */
-    private void initParentTag() {
-
-	HtmlDataTable dataTable = new HtmlDataTable();
-	DataTableTagMock mock = new DataTableTagMock(dataTable);
-	mock.setPageContext(new MockPageContext());
-	List<UIComponentClassicTagBase> list = new ArrayList<UIComponentClassicTagBase>();
-	list.add(mock);
-
-	facesContext.getExternalContext().getRequestMap().put(
-		COMPONENT_TAG_STACK_ATTR, list);
-    }
-
-    /**
-     * Gets table from context
-     * 
-     * @return
-     */
-    private UIComponent getTable() {
-	List list = (List) facesContext.getExternalContext().getRequestMap()
-		.get(COMPONENT_TAG_STACK_ATTR);
-	if (list != null) {
-	    return ((UIComponentClassicTagBase) list.get(list.size() - 1))
-		    .getComponentInstance();
+	/**
+	 * Creates value expression
+	 * 
+	 * @param o
+	 *            - object to be returned by this expression
+	 * @param el
+	 *            - ELContext
+	 * @return - created value expression
+	 */
+	private ValueExpression getValueExpression(Object o, ELContext el) {
+		ValueExpression exp = new MockValueExpression(o);
+		return exp;
 	}
-	return null;
-    }
 
-    private void initTag() {
-	ELContext el = facesContext.getELContext();
-	ValueExpression expr = null;
+	/**
+	 * Inits parent tag contained Data Table component
+	 * 
+	 * @throws JspException
+	 */
+	private void initParentTag() throws JspException {
 
-	// begin
-	expr = getValueExpression(0, el);
-	tag.setBegin(expr);
-
-	// value
-	List<String> list = new ArrayList<String>();
-	columnsCount = (int) Math.random() * 10;
-	if (columnsCount == 0)
-	    columnsCount = 1;
-	for (int i = 0; i < columnsCount; i++) {
-	    list.add(Integer.toString(i));
+		dataTable = new HtmlDataTable();
+		parentTag = new DataTableTag();
+		parentTag.setBinding(application.getExpressionFactory()
+				.createValueExpression(dataTable, UIComponent.class));
+		parentTag.setPageContext(new MockPageContext());
+		List<UIComponentClassicTagBase> list = new ArrayList<UIComponentClassicTagBase>();
+		list.add(parentTag);
 	}
-	expr = getValueExpression(list, el);
-	tag.setValue(expr);
 
-	// style
-	expr = getValueExpression("color: Blue;", el);
-	tag.setStyle(expr);
+	private void initTag() {
+		ELContext el = facesContext.getELContext();
+		ValueExpression expr = null;
 
-	// var
-	expr = getValueExpression("var", el);
-	tag.setVar(expr);
+		// begin
+		expr = getValueExpression(0, el);
+		tag.setBegin(expr);
 
-	// width
-	expr = getValueExpression("100px;", el);
-	tag.setWidth(expr);
+		// value
+		List<String> list = new ArrayList<String>();
+		columnsCount = (int) Math.random() * 10;
+		if (columnsCount == 0)
+			columnsCount = 1;
+		for (int i = 0; i < columnsCount; i++) {
+			list.add(Integer.toString(i));
+		}
+		expr = getValueExpression(list, el);
+		tag.setValue(expr);
 
-	// index
-	expr = getValueExpression("counter", el);
-	tag.setIndex(expr);
+		// style
+		expr = getValueExpression("color: Blue;", el);
+		tag.setStyle(expr);
 
-	MockPageContext pageContext = new MockPageContext();
-	tag.setPageContext(pageContext);
+		// var
+		expr = getValueExpression("var", el);
+		tag.setVar(expr);
 
-    }
+		// width
+		expr = getValueExpression("100px;", el);
+		tag.setWidth(expr);
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see junit.framework.TestCase#setUp()
-     */
-    @Override
-    protected void setUp() throws Exception {
-	super.setUp();
+		// index
+		expr = getValueExpression("counter", el);
+		tag.setIndex(expr);
 
-	facesContext.getApplication().addComponent("org.richfaces.Column",
-		"org.richfaces.component.html.HtmlColumn");
+		MockPageContext pageContext = new MockPageContext();
+		tag.setPageContext(pageContext);
 
-	tag = new ColumnsTag();
-	initTag();
-	initParentTag();
+	}
 
-    }
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see junit.framework.TestCase#setUp()
+	 */
+	@Override
+	public void setUp() throws Exception {
+		super.setUp();
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see junit.framework.TestCase#tearDown()
-     */
-    @Override
-    protected void tearDown() throws Exception {
-	// TODO Auto-generated method stub
-	super.tearDown();
-	this.tag = null;
-	this.columnsCount = 0;
-    }
+		facesContext.getApplication().addComponent("org.richfaces.Column",
+				"org.richfaces.component.html.HtmlColumn");
 
-    /**
-     * Tests JSP columns tag
-     * 
-     * @throws Exception
-     */
-    public void testJspTag() throws Exception {
-	tag.doStartTag();
+		tag = new ColumnsTag();
+		tag.setPageContext(pageContext);
+		initTag();
+		initParentTag();
+	}
 
-	int body = tag.doAfterBody();
-	while (body == tag.EVAL_BODY_AGAIN) {
-	    body = tag.doAfterBody();
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see junit.framework.TestCase#tearDown()
+	 */
+	@Override
+	public void tearDown() throws Exception {
+		// TODO Auto-generated method stub
+		super.tearDown();
+		this.tag = null;
+		this.parentTag = null;
+		this.columnsCount = 0;
+		this.dataTable = null;
 	}
-	tag.doEndTag();
 
-	UIComponent dataTable = getTable();
-	assertNotNull(dataTable);
-	assertTrue(dataTable.getChildCount() == columnsCount);
+	/**
+	 * Tests JSP columns tag
+	 * 
+	 * @throws Exception
+	 */
+	public void testJspTag() throws Exception {
+		parentTag.doStartTag();
+		tag.doStartTag();
 
-	UIColumn column = (UIColumn) dataTable.getChildren().get(0);
-	assertNotNull(column);
-	assertTrue(column.getParent().equals(dataTable));
-    }
+		int body = tag.doAfterBody();
+		while (body == tag.EVAL_BODY_AGAIN) {
+			body = tag.doAfterBody();
+		}
+		tag.doEndTag();
+		parentTag.doEndTag();
 
+		assertNotNull(dataTable);
+		assertTrue(dataTable.getChildCount() == columnsCount);
+
+		UIColumn column = (UIColumn) dataTable.getChildren().get(0);
+		assertNotNull(column);
+		assertTrue(column.getParent().equals(dataTable));
+	}
+
 }

Deleted: branches/community/3.3.X/ui/columns/src/test/java/org/richfaces/jsp/tag/DataTableTagMock.java
===================================================================
--- branches/community/3.3.X/ui/columns/src/test/java/org/richfaces/jsp/tag/DataTableTagMock.java	2009-11-23 01:42:31 UTC (rev 15964)
+++ branches/community/3.3.X/ui/columns/src/test/java/org/richfaces/jsp/tag/DataTableTagMock.java	2009-11-23 01:53:43 UTC (rev 15965)
@@ -1,63 +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
- */
-
-/*
- * DataTableTagMock.java		Date created: 14.12.2007
- * Last modified by: $Author$
- * $Revision$	$Date$
- */
-
-package org.richfaces.jsp.tag;
-
-import javax.faces.component.UIComponent;
-
-import org.richfaces.taglib.DataTableTag;
-
-/**
- * TODO Class description goes here.
- * @author Andrey Markavtsov
- *
- */
-public class DataTableTagMock extends DataTableTag {
-    
-    /** Component to be returned by getComponentInstatnce method  */
-    private UIComponent component;
-       
-    /**
-     * TODO Description goes here.
-     * @param component
-     */
-    public DataTableTagMock(UIComponent component) {
-	super();
-	this.component = component;
-    }
-
-    /* (non-Javadoc)
-     * @see javax.faces.webapp.UIComponentClassicTagBase#getComponentInstance()
-     */
-    @Override
-    public UIComponent getComponentInstance() {
-	return component;
-    }
-    
-    
-
-}

Modified: branches/community/3.3.X/ui/componentControl/src/test/java/org/richfaces/component/ComponentControlTest.java
===================================================================
--- branches/community/3.3.X/ui/componentControl/src/test/java/org/richfaces/component/ComponentControlTest.java	2009-11-23 01:42:31 UTC (rev 15964)
+++ branches/community/3.3.X/ui/componentControl/src/test/java/org/richfaces/component/ComponentControlTest.java	2009-11-23 01:53:43 UTC (rev 15965)
@@ -27,9 +27,13 @@
 import javax.faces.component.UIForm;
 import javax.faces.component.UIInput;
 import javax.faces.component.UIOutput;
+import javax.faces.component.UIPanel;
 import javax.faces.component.UIParameter;
 import javax.faces.component.html.HtmlForm;
+import javax.faces.component.html.HtmlPanelGrid;
+import javax.faces.component.html.HtmlPanelGroup;
 
+import org.ajax4jsf.component.AjaxOutput;
 import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
 
 import com.gargoylesoftware.htmlunit.html.HtmlElement;
@@ -52,7 +56,7 @@
     
     private UIForm form = null;
     private UIComponentControl componentControl = null;
-    private UIInput input = null;
+    private UIPanel panelGrid = null;
     private UIOutput output = null;
     public UIParameter param = null;
 
@@ -65,10 +69,9 @@
         form.setId("form");
         facesContext.getViewRoot().getChildren().add(form);
         
-        input = new UIInput();
-        input.setId("input");
-        input.setValue("value");
-        form.getChildren().add(input);
+        panelGrid = new HtmlPanelGrid();
+        panelGrid.setId("input");
+        form.getChildren().add(panelGrid);
         
         componentControl =  (UIComponentControl) application.createComponent(UIComponentControl.COMPONENT_TYPE);
         componentControl.setEvent("onclick");
@@ -77,7 +80,7 @@
         componentControl.setId("componentControl");
         componentControl.setParams("x:'y'");
         componentControl.setFor("button");
-        input.getChildren().add(componentControl);
+        panelGrid.getChildren().add(componentControl);
 
         output = new UIOutput();
         output.setId("output");
@@ -94,7 +97,7 @@
     	super.tearDown();
     	
     	param = null;
-    	input = null;
+    	panelGrid = null;
     	componentControl = null;
     	output = null;
     	form = null; 
@@ -104,10 +107,10 @@
     	HtmlPage page = renderView();
     	assertNotNull(page);
     	
-    	HtmlInput htmlInput = (HtmlInput)page.getHtmlElementById(input.getClientId(facesContext));
-    	assertNotNull(htmlInput);
+    	HtmlElement htmlElement = (HtmlElement)page.getHtmlElementById(panelGrid.getClientId(facesContext));
+    	assertNotNull(htmlElement);
     	
-    	String eventString = htmlInput.getAttributeValue("onclick");
+    	String eventString = htmlElement.getAttributeValue("onclick");
     	assertNotNull(eventString);
     	assertTrue(eventString.contains("Richfaces.componentControl.performOperation"));
     	
@@ -191,7 +194,7 @@
     	try {
 			renderView();
 			assertTrue("Parameter name is null, but exception isn't thrown!", false);
-		} catch (IllegalArgumentException e) {
+		} catch (Exception e) {
 			
 		}
     }

Modified: branches/community/3.3.X/ui/contextMenu/src/test/java/org/richfaces/component/ContextMenuComponentTest.java
===================================================================
--- branches/community/3.3.X/ui/contextMenu/src/test/java/org/richfaces/component/ContextMenuComponentTest.java	2009-11-23 01:42:31 UTC (rev 15964)
+++ branches/community/3.3.X/ui/contextMenu/src/test/java/org/richfaces/component/ContextMenuComponentTest.java	2009-11-23 01:53:43 UTC (rev 15965)
@@ -22,27 +22,24 @@
 package org.richfaces.component;
 
 import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
 import java.util.Set;
 
 import javax.faces.FacesException;
-import javax.faces.component.UIOutput;
+import javax.faces.component.UIPanel;
 import javax.faces.component.UIParameter;
 import javax.faces.component.html.HtmlForm;
+import javax.faces.component.html.HtmlPanelGroup;
 import javax.faces.context.FacesContext;
 import javax.faces.el.EvaluationException;
 import javax.faces.el.PropertyNotFoundException;
 import javax.faces.el.ValueBinding;
 
 import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
-import org.apache.commons.lang.StringUtils;
 
 import com.gargoylesoftware.htmlunit.html.DomNode;
 import com.gargoylesoftware.htmlunit.html.DomText;
 import com.gargoylesoftware.htmlunit.html.HtmlElement;
 import com.gargoylesoftware.htmlunit.html.HtmlPage;
-import com.gargoylesoftware.htmlunit.html.HtmlScript;
 
 /**
  * Unit test for context menu component.
@@ -54,7 +51,7 @@
 	
 	private UIContextMenu menu = null;
 	private HtmlForm form = null;
-	private UIOutput output = null;
+	private UIPanel panel = null;
 	private UIMenuItem menuItem = null;
 	private UIParameter param = null;
 	private UIMenuGroup menuGroup = null;
@@ -91,9 +88,8 @@
         form.setId("form");
         facesContext.getViewRoot().getChildren().add(form);
         
-        output = new UIOutput();
-        output.setId("output");
-        output.setValue("value");
+        panel = new HtmlPanelGroup();
+        panel.setId("output");
         
         menu = (UIContextMenu)application.createComponent(UIContextMenu.COMPONENT_TYPE);
         menu.setId("contextMenu");
@@ -106,14 +102,14 @@
         
         menuGroup = (UIMenuGroup)application.createComponent(UIMenuGroup.COMPONENT_TYPE);
         
-        output.getChildren().add(menu);
+        panel.getChildren().add(menu);
         
         menuItem = (UIMenuItem)application.createComponent(UIMenuItem.COMPONENT_TYPE);
         menuItem.setId("menuItem");
         menuItem.setValue("value");
         menuGroup.getChildren().add(menuItem);
         
-        form.getChildren().add(output);
+        form.getChildren().add(panel);
     }
     
     public void tearDown() throws Exception {
@@ -122,7 +118,7 @@
     	menuGroup =  null;
     	menu = null;
     	form = null;
-    	output = null;
+    	panel = null;
     	
     	super.tearDown();
     }

Modified: branches/community/3.3.X/ui/core/src/test/java/org/ajax4jsf/component/QueueRendererTest.java
===================================================================
--- branches/community/3.3.X/ui/core/src/test/java/org/ajax4jsf/component/QueueRendererTest.java	2009-11-23 01:42:31 UTC (rev 15964)
+++ branches/community/3.3.X/ui/core/src/test/java/org/ajax4jsf/component/QueueRendererTest.java	2009-11-23 01:53:43 UTC (rev 15965)
@@ -66,7 +66,9 @@
 		
 		form = (UIForm) application.createComponent(UIForm.COMPONENT_TYPE);
 		form.setId("theform");
-		form.getChildren().add(application.createComponent(UIInput.COMPONENT_TYPE));
+		UIComponent createComponent = application.createComponent(UIInput.COMPONENT_TYPE);
+		createComponent.getAttributes().put("onchange", "return true;");
+		form.getChildren().add(createComponent);
 		children.add(form);
 	}
 

Modified: branches/community/3.3.X/ui/core/src/test/java/org/ajax4jsf/component/UIAjaxFormTest.java
===================================================================
--- branches/community/3.3.X/ui/core/src/test/java/org/ajax4jsf/component/UIAjaxFormTest.java	2009-11-23 01:42:31 UTC (rev 15964)
+++ branches/community/3.3.X/ui/core/src/test/java/org/ajax4jsf/component/UIAjaxFormTest.java	2009-11-23 01:53:43 UTC (rev 15965)
@@ -63,6 +63,7 @@
 			}
 		};
 		child.setId("input");
+		child.getAttributes().put("onchange", "return true;");
 		child.addValidator(new TestAjaxFormValidator());
 		childInvoked = 0;
 		child.setId("child");

Modified: branches/community/3.3.X/ui/core/src/test/resources/org/ajax4jsf/component/queue-ajax-form.xhtml
===================================================================
--- branches/community/3.3.X/ui/core/src/test/resources/org/ajax4jsf/component/queue-ajax-form.xhtml	2009-11-23 01:42:31 UTC (rev 15964)
+++ branches/community/3.3.X/ui/core/src/test/resources/org/ajax4jsf/component/queue-ajax-form.xhtml	2009-11-23 01:53:43 UTC (rev 15965)
@@ -17,25 +17,25 @@
 			<a4j:queue oncomplete="window.testResults.viewDefault = true"/>
 
 			<a4j:form ajaxSubmit="true" id="viewDefault">
-				<h:commandButton value="view default queue" id="link" />		
+				<h:commandButton onclick="return true;" value="view default queue" id="link" />		
 			</a4j:form>
 
 			<a4j:queue oncomplete="window.testResults.viewNamed = true" name="viewNamed" />
 
 			<a4j:form ajaxSubmit="true" eventsQueue="viewNamed" id="viewNamed">
-				<h:commandButton value="view named queue" id="link" />		
+				<h:commandButton onclick="return true;" value="view named queue" id="link" />		
 			</a4j:form>
 
 			<a4j:form ajaxSubmit="true" id="formDefault">
 				<a4j:queue oncomplete="window.testResults.formDefault = true" />
 		
-				<h:commandButton value="form default queue" id="link" />		
+				<h:commandButton onclick="return true;" value="form default queue" id="link" />		
 			</a4j:form>
 
 			<a4j:form ajaxSubmit="true" eventsQueue="formQueue" id="formNamed">
 				<a4j:queue oncomplete="window.testResults.formNamed = true" name="formQueue" />
 		
-				<h:commandButton value="form named queue" id="link" />		
+				<h:commandButton onclick="return true;" value="form named queue" id="link" />		
 			</a4j:form>
 		</f:view>
 	</body>	

Modified: branches/community/3.3.X/ui/hotKey/src/test/java/org/richfaces/component/HotKeyComponentTest.java
===================================================================
--- branches/community/3.3.X/ui/hotKey/src/test/java/org/richfaces/component/HotKeyComponentTest.java	2009-11-23 01:42:31 UTC (rev 15964)
+++ branches/community/3.3.X/ui/hotKey/src/test/java/org/richfaces/component/HotKeyComponentTest.java	2009-11-23 01:53:43 UTC (rev 15965)
@@ -153,12 +153,12 @@
 
 		UIComponent input = application.createComponent(UIInput.COMPONENT_TYPE);
 		input.setId("i1");
-		
+		input.getAttributes().put("onchange", "return true;");
 		facesContext.getViewRoot().getChildren().add(input);
 
 		input = application.createComponent(UIInput.COMPONENT_TYPE);
 		input.setId("i2");
-		
+		input.getAttributes().put("onchange", "return true;");
 		this.hotKey.getParent().getChildren().add(input);
 		
 		String scriptBody = processScriptBody();

Modified: branches/community/3.3.X/ui/message/src/test/java/org/richfaces/renderer/RichMessageRendererTest.java
===================================================================
--- branches/community/3.3.X/ui/message/src/test/java/org/richfaces/renderer/RichMessageRendererTest.java	2009-11-23 01:42:31 UTC (rev 15964)
+++ branches/community/3.3.X/ui/message/src/test/java/org/richfaces/renderer/RichMessageRendererTest.java	2009-11-23 01:53:43 UTC (rev 15965)
@@ -77,24 +77,28 @@
 		
 		input1 = (HtmlInputText)application.createComponent("javax.faces.HtmlInputText");
 		input1.setId("input1");
+		input1.getAttributes().put("onchange", "return true;");
 		
 		text1 = (HtmlOutputText)application.createComponent("javax.faces.HtmlOutputText");
 		text1.setValue("Error");
 			
 		input2 = (HtmlInputText)application.createComponent("javax.faces.HtmlInputText");
 		input2.setId("input2");
+		input2.getAttributes().put("onchange", "return true;");
 
 		text2 = (HtmlOutputText)application.createComponent("javax.faces.HtmlOutputText");
 		text2.setValue("Warning");
 		
 		input3 = (HtmlInputText)application.createComponent("javax.faces.HtmlInputText");
 		input3.setId("input3");
+		input3.getAttributes().put("onchange", "return true;");
 		
 		text3 = (HtmlOutputText)application.createComponent("javax.faces.HtmlOutputText");
 		text3.setValue("Fatal");
 		
 		input4 = (HtmlInputText)application.createComponent("javax.faces.HtmlInputText");
 		input4.setId("input4");
+		input4.getAttributes().put("onchange", "return true;");
 		
 		text4 = (HtmlOutputText)application.createComponent("javax.faces.HtmlOutputText");
 		text4.setValue("Info");

Modified: branches/community/3.3.X/ui/message/src/test/java/org/richfaces/renderer/RichMessagesRendererTest.java
===================================================================
--- branches/community/3.3.X/ui/message/src/test/java/org/richfaces/renderer/RichMessagesRendererTest.java	2009-11-23 01:42:31 UTC (rev 15964)
+++ branches/community/3.3.X/ui/message/src/test/java/org/richfaces/renderer/RichMessagesRendererTest.java	2009-11-23 01:53:43 UTC (rev 15965)
@@ -64,6 +64,7 @@
 		
 		input1 = (HtmlInputText)application.createComponent("javax.faces.HtmlInputText");
 		input1.setId("input1");
+		input1.getAttributes().put("onchange", "return true;");
 		
 		output1 = (HtmlOutputText)application.createComponent("javax.faces.HtmlOutputText");
 		output1.setId("output1");
@@ -71,6 +72,7 @@
 		
 		input2 = (HtmlInputText)application.createComponent("javax.faces.HtmlInputText");
 		input2.setId("input2");
+		input2.getAttributes().put("onchange", "return true;");
 		
 		output2 = (HtmlOutputText)application.createComponent("javax.faces.HtmlOutputText");
 		output2.setId("output2");
@@ -78,6 +80,7 @@
 		
 		input3 = (HtmlInputText)application.createComponent("javax.faces.HtmlInputText");
 		input3.setId("input3");
+		input3.getAttributes().put("onchange", "return true;");
 		
 		output3 = (HtmlOutputText)application.createComponent("javax.faces.HtmlOutputText");
 		output3.setId("output3");
@@ -85,6 +88,7 @@
 		
 		input4 = (HtmlInputText)application.createComponent("javax.faces.HtmlInputText");
 		input4.setId("input4");
+		input4.getAttributes().put("onchange", "return true;");
 		
 		output4 = (HtmlOutputText)application.createComponent("javax.faces.HtmlOutputText");
 		output4.setId("output4");

Modified: branches/community/3.3.X/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingBaseComponent.java
===================================================================
--- branches/community/3.3.X/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingBaseComponent.java	2009-11-23 01:42:31 UTC (rev 15964)
+++ branches/community/3.3.X/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingBaseComponent.java	2009-11-23 01:53:43 UTC (rev 15965)
@@ -530,7 +530,14 @@
 		data.trimToSize();
 		return data;
 	}
-
+	
+	public void resetValue() {
+        this.setValue(null);
+        this.setSubmittedValue(null);
+        this.setLocalValueSet(false);
+        this.setValid(true);
+    }
+	
 	public abstract ItemState getItemState();
 	
 	public interface ItemState {

Modified: branches/community/3.3.X/ui/simpleTogglePanel/src/test/java/org/richfaces/component/SimpleTogglePanelComponentTest.java
===================================================================
--- branches/community/3.3.X/ui/simpleTogglePanel/src/test/java/org/richfaces/component/SimpleTogglePanelComponentTest.java	2009-11-23 01:42:31 UTC (rev 15964)
+++ branches/community/3.3.X/ui/simpleTogglePanel/src/test/java/org/richfaces/component/SimpleTogglePanelComponentTest.java	2009-11-23 01:53:43 UTC (rev 15965)
@@ -126,6 +126,7 @@
         input = (UIInput)application.createComponent(UIInput.COMPONENT_TYPE);
         input.setValue("");
         input.setId("opened");
+        input.getAttributes().put("onchange", "return true;");
         stp1.getChildren().add(input);
 
         command = new HtmlCommandLink();

Modified: branches/community/3.3.X/ui/suggestionbox/src/test/java/org/richfaces/component/SuggestionBoxComponentTest.java
===================================================================
--- branches/community/3.3.X/ui/suggestionbox/src/test/java/org/richfaces/component/SuggestionBoxComponentTest.java	2009-11-23 01:42:31 UTC (rev 15964)
+++ branches/community/3.3.X/ui/suggestionbox/src/test/java/org/richfaces/component/SuggestionBoxComponentTest.java	2009-11-23 01:53:43 UTC (rev 15965)
@@ -89,6 +89,7 @@
 
         input = new UIInput();
         input.setId("text");
+        input.getAttributes().put("onchange", "return true;");
         form.getChildren().add(input);
 
         sb = (UISuggestionBox)application.createComponent("org.richfaces.SuggestionBox");

Modified: branches/community/3.3.X/ui/toolBar/src/test/java/org/richfaces/component/ToolBarComponentTest.java
===================================================================
--- branches/community/3.3.X/ui/toolBar/src/test/java/org/richfaces/component/ToolBarComponentTest.java	2009-11-23 01:42:31 UTC (rev 15964)
+++ branches/community/3.3.X/ui/toolBar/src/test/java/org/richfaces/component/ToolBarComponentTest.java	2009-11-23 01:53:43 UTC (rev 15965)
@@ -75,19 +75,23 @@
 
         UICommand button = (UICommand) application.createComponent(HtmlCommandButton.COMPONENT_TYPE);
         button.setValue("Change");
+        button.getAttributes().put("onclick", "return true;");
         toolBar.getChildren().add(button);
 
         button = (UICommand) application.createComponent(HtmlCommandButton.COMPONENT_TYPE);
         button.setValue("Change");
+        button.getAttributes().put("onclick", "return true;");
         toolBar.getChildren().add(button);
 
         UIToolBarGroup toolBarGroup = (UIToolBarGroup) application.createComponent("org.richfaces.ToolBarGroup");
         toolBarGroup.setItemSeparator("disc");
         button = (HtmlCommandButton) application.createComponent(HtmlCommandButton.COMPONENT_TYPE);
         button.setValue("Change");
+        button.getAttributes().put("onclick", "return true;");
         toolBarGroup.getChildren().add(button);
         button = (HtmlCommandButton) application.createComponent(HtmlCommandButton.COMPONENT_TYPE);
         button.setValue("Change");
+        button.getAttributes().put("onclick", "return true;");
         toolBarGroup.getChildren().add(button);
         toolBar.getChildren().add(toolBarGroup);
 
@@ -95,9 +99,11 @@
         toolBarGroup.setItemSeparator("grid");
         button = (HtmlCommandButton) application.createComponent(HtmlCommandButton.COMPONENT_TYPE);
         button.setValue("Change");
+        button.getAttributes().put("onclick", "return true;");
         toolBarGroup.getChildren().add(button);
         button = (HtmlCommandButton) application.createComponent(HtmlCommandButton.COMPONENT_TYPE);
         button.setValue("Change");
+        button.getAttributes().put("onclick", "return true;");
         toolBarGroup.getChildren().add(button);
         toolBar.getChildren().add(toolBarGroup);
 
@@ -105,9 +111,11 @@
         toolBarGroup.setItemSeparator("line");
         button = (HtmlCommandButton) application.createComponent(HtmlCommandButton.COMPONENT_TYPE);
         button.setValue("Change");
+        button.getAttributes().put("onclick", "return true;");
         toolBarGroup.getChildren().add(button);
         button = (HtmlCommandButton) application.createComponent(HtmlCommandButton.COMPONENT_TYPE);
         button.setValue("Change");
+        button.getAttributes().put("onclick", "return true;");
         toolBarGroup.getChildren().add(button);
         toolBar.getChildren().add(toolBarGroup);
     }

Modified: branches/community/3.3.X/ui/tooltip/src/test/java/org/richfaces/renderkit/html/ToolTipRendererTest.java
===================================================================
--- branches/community/3.3.X/ui/tooltip/src/test/java/org/richfaces/renderkit/html/ToolTipRendererTest.java	2009-11-23 01:42:31 UTC (rev 15964)
+++ branches/community/3.3.X/ui/tooltip/src/test/java/org/richfaces/renderkit/html/ToolTipRendererTest.java	2009-11-23 01:53:43 UTC (rev 15965)
@@ -23,6 +23,7 @@
 import java.util.Map;
 
 import javax.faces.component.html.HtmlOutputText;
+import javax.faces.component.html.HtmlPanelGroup;
 
 import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
 import org.richfaces.component.UIToolTip;
@@ -61,9 +62,8 @@
         toolTipContent.setValue("ToolTip Conntent");
         toolTip.getChildren().add(toolTipContent);
         
-        HtmlOutputText parentComp = (HtmlOutputText) application.createComponent("javax.faces.HtmlOutputText");
+        HtmlPanelGroup parentComp = (HtmlPanelGroup) application.createComponent("javax.faces.HtmlPanelGroup");
         parentComp.setId("parentID");
-        parentComp.setValue("Text with tooltip");
         parentComp.getChildren().add(toolTip);
      
         blockToolTip = (UIToolTip)application.createComponent("org.richfaces.component.ToolTip");

Modified: branches/community/3.3.X/ui/tree/src/test/java/org/richfaces/component/TreeComponentTest.java
===================================================================
--- branches/community/3.3.X/ui/tree/src/test/java/org/richfaces/component/TreeComponentTest.java	2009-11-23 01:42:31 UTC (rev 15964)
+++ branches/community/3.3.X/ui/tree/src/test/java/org/richfaces/component/TreeComponentTest.java	2009-11-23 01:53:43 UTC (rev 15965)
@@ -133,7 +133,7 @@
 			}
 		};
 		input.setId("input");
-
+		input.getAttributes().put("onchange", "return true;");
 		form.getChildren().add(input);
 
 		command = new HtmlCommandLink();



More information about the richfaces-svn-commits mailing list