JBoss Rich Faces SVN: r11390 - in trunk/test-applications/jsp/src/main: resources and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: adubovsky
Date: 2008-11-26 07:58:55 -0500 (Wed, 26 Nov 2008)
New Revision: 11390
Added:
trunk/test-applications/jsp/src/main/resources/editorconfig.properties
Modified:
trunk/test-applications/jsp/src/main/java/editor/Editor.java
trunk/test-applications/jsp/src/main/webapp/Editor/Editor.jsp
trunk/test-applications/jsp/src/main/webapp/Editor/EditorProperty.jsp
Log:
+ config file for editor
Modified: trunk/test-applications/jsp/src/main/java/editor/Editor.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/editor/Editor.java 2008-11-26 12:39:40 UTC (rev 11389)
+++ trunk/test-applications/jsp/src/main/java/editor/Editor.java 2008-11-26 12:58:55 UTC (rev 11390)
@@ -26,6 +26,7 @@
private String tabindex;
private String dialogType;
private String language;
+ private String configuration;
// private String skin;
public Editor() {
@@ -44,6 +45,7 @@
dialogType = "window";
language = "en";
// skin = "default";
+ configuration = "";
}
/*
@@ -234,6 +236,14 @@
this.language = language;
}
+ public String getConfiguration() {
+ return configuration;
+ }
+
+ public void setConfiguration(String configuration) {
+ this.configuration = configuration;
+ }
+
// public String getSkin() {
// return skin;
// }
Added: trunk/test-applications/jsp/src/main/resources/editorconfig.properties
===================================================================
--- trunk/test-applications/jsp/src/main/resources/editorconfig.properties (rev 0)
+++ trunk/test-applications/jsp/src/main/resources/editorconfig.properties 2008-11-26 12:58:55 UTC (rev 11390)
@@ -0,0 +1,3 @@
+theme_advanced_buttons1 = "forecolor,backcolor"
+theme_advanced_buttons2 = "bullist,numlist,separator,outdent,indent,separator,undo,redo"
+theme_advanced_buttons3 = "hr,removeformat,visualaid,separator,sub,sup,separator,charmap"
\ No newline at end of file
Modified: trunk/test-applications/jsp/src/main/webapp/Editor/Editor.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/Editor/Editor.jsp 2008-11-26 12:39:40 UTC (rev 11389)
+++ trunk/test-applications/jsp/src/main/webapp/Editor/Editor.jsp 2008-11-26 12:58:55 UTC (rev 11390)
@@ -27,7 +27,11 @@
tabindex="#{editor.tabindex}"
dialogType="#{editor.dialogType}"
language="#{editor.language}"
- styleClass="EditorStyleClass" ></rich:editor>
+ styleClass="EditorStyleClass" configuration="#{editor.configuration}">
+
+ <f:param name="theme_advanced_resizing" value="true"/>
+ <f:param name="theme_advanced_statusbar_location" value="top"/>
+ </rich:editor>
<h:panelGrid columns="1">
<f:facet name="header">
Modified: trunk/test-applications/jsp/src/main/webapp/Editor/EditorProperty.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/Editor/EditorProperty.jsp 2008-11-26 12:39:40 UTC (rev 11389)
+++ trunk/test-applications/jsp/src/main/webapp/Editor/EditorProperty.jsp 2008-11-26 12:58:55 UTC (rev 11390)
@@ -75,7 +75,12 @@
<f:selectItem itemValue="null" itemLabel="rich" />
</h:selectOneRadio>
--%>
-
+
+ <h:outputText value="use configuration file: "></h:outputText>
+ <h:selectOneRadio value="#{editor.configuration}" onchange="submit();">
+ <f:selectItem itemValue="" itemLabel="do not use" />
+ <f:selectItem itemValue="editorconfig" itemLabel="use editorconfig.properties" />
+ </h:selectOneRadio>
</h:panelGrid>
<h:commandButton value="add test" action="#{editor.addHtmlEditor}"></h:commandButton>
</f:subview>
\ No newline at end of file
15 years, 5 months
JBoss Rich Faces SVN: r11389 - in trunk: framework/api/src/main/java/org/richfaces/model and 8 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: pkawiak
Date: 2008-11-26 07:39:40 -0500 (Wed, 26 Nov 2008)
New Revision: 11389
Modified:
trunk/framework/api/src/main/java/org/richfaces/event/extdt/ChangeColumnVisibilityEvent.java
trunk/framework/api/src/main/java/org/richfaces/event/extdt/ChangeColumnVisibilityListener.java
trunk/framework/api/src/main/java/org/richfaces/event/extdt/ColumnResizeEvent.java
trunk/framework/api/src/main/java/org/richfaces/event/extdt/ColumnResizeListener.java
trunk/framework/api/src/main/java/org/richfaces/event/extdt/DragDropEvent.java
trunk/framework/api/src/main/java/org/richfaces/event/extdt/DragDropListener.java
trunk/framework/api/src/main/java/org/richfaces/event/extdt/ExtTableFilterEvent.java
trunk/framework/api/src/main/java/org/richfaces/event/extdt/ExtTableFilterListener.java
trunk/framework/api/src/main/java/org/richfaces/event/extdt/ExtTableSortEvent.java
trunk/framework/api/src/main/java/org/richfaces/event/extdt/ExtTableSortListener.java
trunk/framework/api/src/main/java/org/richfaces/model/DataProvider.java
trunk/framework/impl/src/main/java/org/richfaces/model/ExtendedTableDataModel.java
trunk/framework/impl/src/main/java/org/richfaces/model/ExtendedTableDataModifiableModel.java
trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/ExtendedDataTableState.java
trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/ExtendedTableColumnsIterator.java
trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/SortedColumnsIterator.java
trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/UIExtendedDataTable.java
trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/ExtendedTableHolder.java
trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/ExtDraggableRendererContributor.java
trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/ExtDropzoneRendererContributor.java
trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/RichTableMenuRenderer.java
trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/SimpleTableMenuRenderer.java
trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/TableDragDropRenderer.java
trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/TableMenuRenderer.java
trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/TableSelectionRendererContributor.java
trunk/ui/extendedDataTable/src/test/java/org/richfaces/component/DefaultExtendedDataTable.java
trunk/ui/extendedDataTable/src/test/java/org/richfaces/component/renderer/ExtendedDataTableRendererTest.java
trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/AbstractExtendedRowsRendererTest.java
trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/AbstractExtendedTableRendererTest.java
trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/ExtendedRowsRenderer.java
trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/ExtendedTableRenderer.java
trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/ResponseWriterMock.java
trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/html/TableDragDropRendererTest.java
Log:
Updating license info.
Modified: trunk/framework/api/src/main/java/org/richfaces/event/extdt/ChangeColumnVisibilityEvent.java
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/event/extdt/ChangeColumnVisibilityEvent.java 2008-11-26 12:07:40 UTC (rev 11388)
+++ trunk/framework/api/src/main/java/org/richfaces/event/extdt/ChangeColumnVisibilityEvent.java 2008-11-26 12:39:40 UTC (rev 11389)
@@ -1,6 +1,24 @@
/**
- *
- */
+* License Agreement.
+*
+* JBoss RichFaces - Ajax4jsf Component Library
+*
+* Copyright (C) 2008 CompuGROUP Holding AG
+*
+* 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.event.extdt;
import javax.faces.component.UIComponent;
Modified: trunk/framework/api/src/main/java/org/richfaces/event/extdt/ChangeColumnVisibilityListener.java
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/event/extdt/ChangeColumnVisibilityListener.java 2008-11-26 12:07:40 UTC (rev 11388)
+++ trunk/framework/api/src/main/java/org/richfaces/event/extdt/ChangeColumnVisibilityListener.java 2008-11-26 12:39:40 UTC (rev 11389)
@@ -1,6 +1,24 @@
/**
- *
- */
+* License Agreement.
+*
+* JBoss RichFaces - Ajax4jsf Component Library
+*
+* Copyright (C) 2008 CompuGROUP Holding AG
+*
+* 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.event.extdt;
import javax.faces.event.FacesListener;
Modified: trunk/framework/api/src/main/java/org/richfaces/event/extdt/ColumnResizeEvent.java
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/event/extdt/ColumnResizeEvent.java 2008-11-26 12:07:40 UTC (rev 11388)
+++ trunk/framework/api/src/main/java/org/richfaces/event/extdt/ColumnResizeEvent.java 2008-11-26 12:39:40 UTC (rev 11389)
@@ -1,6 +1,24 @@
/**
- *
- */
+* License Agreement.
+*
+* JBoss RichFaces - Ajax4jsf Component Library
+*
+* Copyright (C) 2008 CompuGROUP Holding AG
+*
+* 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.event.extdt;
import javax.faces.component.UIComponent;
Modified: trunk/framework/api/src/main/java/org/richfaces/event/extdt/ColumnResizeListener.java
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/event/extdt/ColumnResizeListener.java 2008-11-26 12:07:40 UTC (rev 11388)
+++ trunk/framework/api/src/main/java/org/richfaces/event/extdt/ColumnResizeListener.java 2008-11-26 12:39:40 UTC (rev 11389)
@@ -1,6 +1,24 @@
/**
- *
- */
+* License Agreement.
+*
+* JBoss RichFaces - Ajax4jsf Component Library
+*
+* Copyright (C) 2008 CompuGROUP Holding AG
+*
+* 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.event.extdt;
import javax.faces.event.FacesListener;
Modified: trunk/framework/api/src/main/java/org/richfaces/event/extdt/DragDropEvent.java
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/event/extdt/DragDropEvent.java 2008-11-26 12:07:40 UTC (rev 11388)
+++ trunk/framework/api/src/main/java/org/richfaces/event/extdt/DragDropEvent.java 2008-11-26 12:39:40 UTC (rev 11389)
@@ -1,6 +1,24 @@
/**
- *
- */
+* License Agreement.
+*
+* JBoss RichFaces - Ajax4jsf Component Library
+*
+* Copyright (C) 2008 CompuGROUP Holding AG
+*
+* 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.event.extdt;
import javax.faces.component.UIComponent;
Modified: trunk/framework/api/src/main/java/org/richfaces/event/extdt/DragDropListener.java
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/event/extdt/DragDropListener.java 2008-11-26 12:07:40 UTC (rev 11388)
+++ trunk/framework/api/src/main/java/org/richfaces/event/extdt/DragDropListener.java 2008-11-26 12:39:40 UTC (rev 11389)
@@ -1,6 +1,24 @@
/**
- *
- */
+* License Agreement.
+*
+* JBoss RichFaces - Ajax4jsf Component Library
+*
+* Copyright (C) 2008 CompuGROUP Holding AG
+*
+* 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.event.extdt;
import javax.faces.event.FacesListener;
Modified: trunk/framework/api/src/main/java/org/richfaces/event/extdt/ExtTableFilterEvent.java
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/event/extdt/ExtTableFilterEvent.java 2008-11-26 12:07:40 UTC (rev 11388)
+++ trunk/framework/api/src/main/java/org/richfaces/event/extdt/ExtTableFilterEvent.java 2008-11-26 12:39:40 UTC (rev 11389)
@@ -1,6 +1,24 @@
/**
- *
- */
+* License Agreement.
+*
+* JBoss RichFaces - Ajax4jsf Component Library
+*
+* Copyright (C) 2008 CompuGROUP Holding AG
+*
+* 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.event.extdt;
import javax.faces.component.UIComponent;
Modified: trunk/framework/api/src/main/java/org/richfaces/event/extdt/ExtTableFilterListener.java
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/event/extdt/ExtTableFilterListener.java 2008-11-26 12:07:40 UTC (rev 11388)
+++ trunk/framework/api/src/main/java/org/richfaces/event/extdt/ExtTableFilterListener.java 2008-11-26 12:39:40 UTC (rev 11389)
@@ -1,6 +1,24 @@
/**
- *
- */
+* License Agreement.
+*
+* JBoss RichFaces - Ajax4jsf Component Library
+*
+* Copyright (C) 2008 CompuGROUP Holding AG
+*
+* 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.event.extdt;
import javax.faces.event.FacesListener;
Modified: trunk/framework/api/src/main/java/org/richfaces/event/extdt/ExtTableSortEvent.java
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/event/extdt/ExtTableSortEvent.java 2008-11-26 12:07:40 UTC (rev 11388)
+++ trunk/framework/api/src/main/java/org/richfaces/event/extdt/ExtTableSortEvent.java 2008-11-26 12:39:40 UTC (rev 11389)
@@ -1,6 +1,24 @@
/**
- *
- */
+* License Agreement.
+*
+* JBoss RichFaces - Ajax4jsf Component Library
+*
+* Copyright (C) 2008 CompuGROUP Holding AG
+*
+* 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.event.extdt;
import javax.faces.component.UIComponent;
Modified: trunk/framework/api/src/main/java/org/richfaces/event/extdt/ExtTableSortListener.java
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/event/extdt/ExtTableSortListener.java 2008-11-26 12:07:40 UTC (rev 11388)
+++ trunk/framework/api/src/main/java/org/richfaces/event/extdt/ExtTableSortListener.java 2008-11-26 12:39:40 UTC (rev 11389)
@@ -1,6 +1,24 @@
/**
- *
- */
+* License Agreement.
+*
+* JBoss RichFaces - Ajax4jsf Component Library
+*
+* Copyright (C) 2008 CompuGROUP Holding AG
+*
+* 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.event.extdt;
import javax.faces.event.FacesListener;
Modified: trunk/framework/api/src/main/java/org/richfaces/model/DataProvider.java
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/model/DataProvider.java 2008-11-26 12:07:40 UTC (rev 11388)
+++ trunk/framework/api/src/main/java/org/richfaces/model/DataProvider.java 2008-11-26 12:39:40 UTC (rev 11389)
@@ -1,6 +1,24 @@
/**
- *
- */
+* License Agreement.
+*
+* JBoss RichFaces - Ajax4jsf Component Library
+*
+* Copyright (C) 2008 CompuGROUP Holding AG
+*
+* 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.model;
import java.io.Serializable;
Modified: trunk/framework/impl/src/main/java/org/richfaces/model/ExtendedTableDataModel.java
===================================================================
--- trunk/framework/impl/src/main/java/org/richfaces/model/ExtendedTableDataModel.java 2008-11-26 12:07:40 UTC (rev 11388)
+++ trunk/framework/impl/src/main/java/org/richfaces/model/ExtendedTableDataModel.java 2008-11-26 12:39:40 UTC (rev 11389)
@@ -1,6 +1,24 @@
/**
- *
- */
+* License Agreement.
+*
+* JBoss RichFaces - Ajax4jsf Component Library
+*
+* Copyright (C) 2008 CompuGROUP Holding AG
+*
+* 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.model;
import java.io.IOException;
Modified: trunk/framework/impl/src/main/java/org/richfaces/model/ExtendedTableDataModifiableModel.java
===================================================================
--- trunk/framework/impl/src/main/java/org/richfaces/model/ExtendedTableDataModifiableModel.java 2008-11-26 12:07:40 UTC (rev 11388)
+++ trunk/framework/impl/src/main/java/org/richfaces/model/ExtendedTableDataModifiableModel.java 2008-11-26 12:39:40 UTC (rev 11389)
@@ -1,6 +1,24 @@
/**
- *
- */
+* License Agreement.
+*
+* JBoss RichFaces - Ajax4jsf Component Library
+*
+* Copyright (C) 2008 CompuGROUP Holding AG
+*
+* 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.model;
import java.io.IOException;
Modified: trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/ExtendedDataTableState.java
===================================================================
--- trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/ExtendedDataTableState.java 2008-11-26 12:07:40 UTC (rev 11388)
+++ trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/ExtendedDataTableState.java 2008-11-26 12:39:40 UTC (rev 11389)
@@ -1,6 +1,24 @@
/**
- *
- */
+* License Agreement.
+*
+* JBoss RichFaces - Ajax4jsf Component Library
+*
+* Copyright (C) 2008 CompuGROUP Holding AG
+*
+* 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.io.Serializable;
Modified: trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/ExtendedTableColumnsIterator.java
===================================================================
--- trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/ExtendedTableColumnsIterator.java 2008-11-26 12:07:40 UTC (rev 11388)
+++ trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/ExtendedTableColumnsIterator.java 2008-11-26 12:39:40 UTC (rev 11389)
@@ -1,6 +1,24 @@
/**
- *
- */
+* License Agreement.
+*
+* JBoss RichFaces - Ajax4jsf Component Library
+*
+* Copyright (C) 2008 CompuGROUP Holding AG
+*
+* 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.Iterator;
Modified: trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/SortedColumnsIterator.java
===================================================================
--- trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/SortedColumnsIterator.java 2008-11-26 12:07:40 UTC (rev 11388)
+++ trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/SortedColumnsIterator.java 2008-11-26 12:39:40 UTC (rev 11389)
@@ -1,6 +1,24 @@
/**
- *
- */
+* License Agreement.
+*
+* JBoss RichFaces - Ajax4jsf Component Library
+*
+* Copyright (C) 2008 CompuGROUP Holding AG
+*
+* 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;
/**
Modified: trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/UIExtendedDataTable.java
===================================================================
--- trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/UIExtendedDataTable.java 2008-11-26 12:07:40 UTC (rev 11388)
+++ trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/UIExtendedDataTable.java 2008-11-26 12:39:40 UTC (rev 11389)
@@ -1,7 +1,25 @@
/**
- *
- */
+* License Agreement.
+*
+* JBoss RichFaces - Ajax4jsf Component Library
+*
+* Copyright (C) 2008 CompuGROUP Holding AG
+*
+* 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.Collection;
Modified: trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/ExtendedTableHolder.java
===================================================================
--- trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/ExtendedTableHolder.java 2008-11-26 12:07:40 UTC (rev 11388)
+++ trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/ExtendedTableHolder.java 2008-11-26 12:39:40 UTC (rev 11389)
@@ -1,6 +1,25 @@
/**
- *
- */
+* License Agreement.
+*
+* JBoss RichFaces - Ajax4jsf Component Library
+*
+* Copyright (C) 2008 CompuGROUP Holding AG
+*
+* 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.renderkit;
import org.richfaces.component.UIColumn;
Modified: trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/ExtDraggableRendererContributor.java
===================================================================
--- trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/ExtDraggableRendererContributor.java 2008-11-26 12:07:40 UTC (rev 11388)
+++ trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/ExtDraggableRendererContributor.java 2008-11-26 12:39:40 UTC (rev 11389)
@@ -1,6 +1,24 @@
/**
- *
- */
+* License Agreement.
+*
+* JBoss RichFaces - Ajax4jsf Component Library
+*
+* Copyright (C) 2008 CompuGROUP Holding AG
+*
+* 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.renderkit.html;
import java.util.HashMap;
Modified: trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/ExtDropzoneRendererContributor.java
===================================================================
--- trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/ExtDropzoneRendererContributor.java 2008-11-26 12:07:40 UTC (rev 11388)
+++ trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/ExtDropzoneRendererContributor.java 2008-11-26 12:39:40 UTC (rev 11389)
@@ -1,6 +1,24 @@
/**
- *
- */
+* License Agreement.
+*
+* JBoss RichFaces - Ajax4jsf Component Library
+*
+* Copyright (C) 2008 CompuGROUP Holding AG
+*
+* 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.renderkit.html;
import java.util.Map;
Modified: trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/RichTableMenuRenderer.java
===================================================================
--- trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/RichTableMenuRenderer.java 2008-11-26 12:07:40 UTC (rev 11388)
+++ trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/RichTableMenuRenderer.java 2008-11-26 12:39:40 UTC (rev 11389)
@@ -1,6 +1,24 @@
/**
- *
- */
+* License Agreement.
+*
+* JBoss RichFaces - Ajax4jsf Component Library
+*
+* Copyright (C) 2008 CompuGROUP Holding AG
+*
+* 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.renderkit.html;
import java.io.IOException;
Modified: trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/SimpleTableMenuRenderer.java
===================================================================
--- trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/SimpleTableMenuRenderer.java 2008-11-26 12:07:40 UTC (rev 11388)
+++ trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/SimpleTableMenuRenderer.java 2008-11-26 12:39:40 UTC (rev 11389)
@@ -1,6 +1,24 @@
/**
- *
- */
+* License Agreement.
+*
+* JBoss RichFaces - Ajax4jsf Component Library
+*
+* Copyright (C) 2008 CompuGROUP Holding AG
+*
+* 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.renderkit.html;
import java.io.IOException;
Modified: trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/TableDragDropRenderer.java
===================================================================
--- trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/TableDragDropRenderer.java 2008-11-26 12:07:40 UTC (rev 11388)
+++ trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/TableDragDropRenderer.java 2008-11-26 12:39:40 UTC (rev 11389)
@@ -1,6 +1,24 @@
/**
- *
- */
+* License Agreement.
+*
+* JBoss RichFaces - Ajax4jsf Component Library
+*
+* Copyright (C) 2008 CompuGROUP Holding AG
+*
+* 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.renderkit.html;
import java.io.IOException;
Modified: trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/TableMenuRenderer.java
===================================================================
--- trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/TableMenuRenderer.java 2008-11-26 12:07:40 UTC (rev 11388)
+++ trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/TableMenuRenderer.java 2008-11-26 12:39:40 UTC (rev 11389)
@@ -1,6 +1,24 @@
/**
- *
- */
+* License Agreement.
+*
+* JBoss RichFaces - Ajax4jsf Component Library
+*
+* Copyright (C) 2008 CompuGROUP Holding AG
+*
+* 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.renderkit.html;
import java.io.IOException;
Modified: trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/TableSelectionRendererContributor.java
===================================================================
--- trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/TableSelectionRendererContributor.java 2008-11-26 12:07:40 UTC (rev 11388)
+++ trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/TableSelectionRendererContributor.java 2008-11-26 12:39:40 UTC (rev 11389)
@@ -1,6 +1,24 @@
/**
- *
- */
+* License Agreement.
+*
+* JBoss RichFaces - Ajax4jsf Component Library
+*
+* Copyright (C) 2008 CompuGROUP Holding AG
+*
+* 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.renderkit.html;
import java.io.IOException;
Modified: trunk/ui/extendedDataTable/src/test/java/org/richfaces/component/DefaultExtendedDataTable.java
===================================================================
--- trunk/ui/extendedDataTable/src/test/java/org/richfaces/component/DefaultExtendedDataTable.java 2008-11-26 12:07:40 UTC (rev 11388)
+++ trunk/ui/extendedDataTable/src/test/java/org/richfaces/component/DefaultExtendedDataTable.java 2008-11-26 12:39:40 UTC (rev 11389)
@@ -1,3 +1,25 @@
+/**
+* License Agreement.
+*
+* JBoss RichFaces - Ajax4jsf Component Library
+*
+* Copyright (C) 2008 CompuGROUP Holding AG
+*
+* 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;
Modified: trunk/ui/extendedDataTable/src/test/java/org/richfaces/component/renderer/ExtendedDataTableRendererTest.java
===================================================================
--- trunk/ui/extendedDataTable/src/test/java/org/richfaces/component/renderer/ExtendedDataTableRendererTest.java 2008-11-26 12:07:40 UTC (rev 11388)
+++ trunk/ui/extendedDataTable/src/test/java/org/richfaces/component/renderer/ExtendedDataTableRendererTest.java 2008-11-26 12:39:40 UTC (rev 11389)
@@ -1,3 +1,25 @@
+/**
+* License Agreement.
+*
+* JBoss RichFaces - Ajax4jsf Component Library
+*
+* Copyright (C) 2008 CompuGROUP Holding AG
+*
+* 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.renderer;
import java.util.HashSet;
Modified: trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/AbstractExtendedRowsRendererTest.java
===================================================================
--- trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/AbstractExtendedRowsRendererTest.java 2008-11-26 12:07:40 UTC (rev 11388)
+++ trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/AbstractExtendedRowsRendererTest.java 2008-11-26 12:39:40 UTC (rev 11389)
@@ -1,3 +1,25 @@
+/**
+* License Agreement.
+*
+* JBoss RichFaces - Ajax4jsf Component Library
+*
+* Copyright (C) 2008 CompuGROUP Holding AG
+*
+* 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.renderkit;
import java.io.IOException;
Modified: trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/AbstractExtendedTableRendererTest.java
===================================================================
--- trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/AbstractExtendedTableRendererTest.java 2008-11-26 12:07:40 UTC (rev 11388)
+++ trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/AbstractExtendedTableRendererTest.java 2008-11-26 12:39:40 UTC (rev 11389)
@@ -1,3 +1,25 @@
+/**
+* License Agreement.
+*
+* JBoss RichFaces - Ajax4jsf Component Library
+*
+* Copyright (C) 2008 CompuGROUP Holding AG
+*
+* 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.renderkit;
import java.io.IOException;
Modified: trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/ExtendedRowsRenderer.java
===================================================================
--- trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/ExtendedRowsRenderer.java 2008-11-26 12:07:40 UTC (rev 11388)
+++ trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/ExtendedRowsRenderer.java 2008-11-26 12:39:40 UTC (rev 11389)
@@ -1,3 +1,25 @@
+/**
+* License Agreement.
+*
+* JBoss RichFaces - Ajax4jsf Component Library
+*
+* Copyright (C) 2008 CompuGROUP Holding AG
+*
+* 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.renderkit;
import java.io.IOException;
Modified: trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/ExtendedTableRenderer.java
===================================================================
--- trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/ExtendedTableRenderer.java 2008-11-26 12:07:40 UTC (rev 11388)
+++ trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/ExtendedTableRenderer.java 2008-11-26 12:39:40 UTC (rev 11389)
@@ -1,3 +1,25 @@
+/**
+* License Agreement.
+*
+* JBoss RichFaces - Ajax4jsf Component Library
+*
+* Copyright (C) 2008 CompuGROUP Holding AG
+*
+* 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.renderkit;
import javax.faces.component.UIComponent;
Modified: trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/ResponseWriterMock.java
===================================================================
--- trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/ResponseWriterMock.java 2008-11-26 12:07:40 UTC (rev 11388)
+++ trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/ResponseWriterMock.java 2008-11-26 12:39:40 UTC (rev 11389)
@@ -1,3 +1,25 @@
+/**
+* License Agreement.
+*
+* JBoss RichFaces - Ajax4jsf Component Library
+*
+* Copyright (C) 2008 CompuGROUP Holding AG
+*
+* 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.renderkit;
import java.io.IOException;
Modified: trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/html/TableDragDropRendererTest.java
===================================================================
--- trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/html/TableDragDropRendererTest.java 2008-11-26 12:07:40 UTC (rev 11388)
+++ trunk/ui/extendedDataTable/src/test/java/org/richfaces/renderkit/html/TableDragDropRendererTest.java 2008-11-26 12:39:40 UTC (rev 11389)
@@ -1,3 +1,25 @@
+/**
+* License Agreement.
+*
+* JBoss RichFaces - Ajax4jsf Component Library
+*
+* Copyright (C) 2008 CompuGROUP Holding AG
+*
+* 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.renderkit.html;
import java.util.Iterator;
15 years, 5 months
JBoss Rich Faces SVN: r11388 - trunk/test-applications/seamApp/web/src/main/webapp/WEB-INF.
by richfaces-svn-commits@lists.jboss.org
Author: adubovsky
Date: 2008-11-26 07:07:40 -0500 (Wed, 26 Nov 2008)
New Revision: 11388
Modified:
trunk/test-applications/seamApp/web/src/main/webapp/WEB-INF/faces-config.xml
Log:
+ phaseTracker
Modified: trunk/test-applications/seamApp/web/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/test-applications/seamApp/web/src/main/webapp/WEB-INF/faces-config.xml 2008-11-26 11:11:49 UTC (rev 11387)
+++ trunk/test-applications/seamApp/web/src/main/webapp/WEB-INF/faces-config.xml 2008-11-26 12:07:40 UTC (rev 11388)
@@ -43,5 +43,7 @@
<supported-locale>tr</supported-locale>
</locale-config>
</application>
-
+ <lifecycle>
+ <phase-listener>org.richfaces.helloworld.domain.util.phaseTracker.PhaseTracker</phase-listener>
+ </lifecycle>
</faces-config>
15 years, 5 months
JBoss Rich Faces SVN: r11387 - in trunk/test-applications/seleniumTest/richfaces/src: main/resources and 6 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-11-26 06:11:49 -0500 (Wed, 26 Nov 2008)
New Revision: 11387
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/resources/core/
trunk/test-applications/seleniumTest/richfaces/src/main/resources/core/scripts/
trunk/test-applications/seleniumTest/richfaces/src/main/resources/core/scripts/user-extensions.js
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DnDBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DnDListener.java
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dnd/dndTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/template/dataTable.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/template/modalPanel.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/template/simple.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DnDTest.java
Log:
RF-5017, RF-5018
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DnDBean.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DnDBean.java 2008-11-26 01:16:00 UTC (rev 11386)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DnDBean.java 2008-11-26 11:11:49 UTC (rev 11387)
@@ -11,6 +11,11 @@
* copied from demo and tailored
*/
public class DnDBean {
+
+ public static final String DRAGLISTENER = "DragListener";
+
+ public static final String DROPLISTENER = "DropListener";
+
private List<Framework> containerPHP;
private List<Framework> containerCF;
@@ -18,10 +23,17 @@
private List<Framework> containerDNET;
private List<Framework> frameworks;
+
+ private String status = "";
+
+ private Object dropValue;
+
+ private Object dragValue;
public DnDBean() {
initList();
}
+
public List<Framework> getContainerPHP() {
return containerPHP;
@@ -56,6 +68,9 @@
}
public String reset() {
+ status = "";
+ dropValue = null;
+ dragValue = null;
initList();
return null;
}
@@ -83,10 +98,15 @@
public void processDropMethod(DropEvent event) {
Dropzone dropzone = (Dropzone) event.getComponent();
moveFramework(event.getDragValue(), dropzone.getDropValue());
+ status += getStatus() + DROPLISTENER;
}
public void processDragMethod(DragEvent event) {
- // TODO Auto-generated method stub
+ event.getAcceptedTypes();
+ status += getStatus() + DRAGLISTENER;
+ dragValue = event.getDragValue();
+ dropValue = event.getDropValue();
+
}
/**
@@ -119,4 +139,51 @@
this.name = name;
}
}
+
+ /**
+ * @return the status
+ */
+ public String getStatus() {
+ return status;
+ }
+
+ /**
+ * @param status the status to set
+ */
+ public void setStatus(String status) {
+ this.status = status;
+ }
+
+
+ /**
+ * @return the dropValue
+ */
+ public Object getDropValue() {
+ return dropValue;
+ }
+
+
+ /**
+ * @param dropValue the dropValue to set
+ */
+ public void setDropValue(Object dropValue) {
+ this.dropValue = dropValue;
+ }
+
+
+ /**
+ * @return the dragValue
+ */
+ public Object getDragValue() {
+ return dragValue;
+ }
+
+
+ /**
+ * @param dragValue the dragValue to set
+ */
+ public void setDragValue(Object dragValue) {
+ this.dragValue = dragValue;
+ }
+
}
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DnDListener.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DnDListener.java 2008-11-26 01:16:00 UTC (rev 11386)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DnDListener.java 2008-11-26 11:11:49 UTC (rev 11387)
@@ -25,7 +25,6 @@
// DropListener implementation
//
public void processDrag(DragEvent event) {
- // TODO Auto-generated method stub
}
//
Added: trunk/test-applications/seleniumTest/richfaces/src/main/resources/core/scripts/user-extensions.js
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/resources/core/scripts/user-extensions.js (rev 0)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/resources/core/scripts/user-extensions.js 2008-11-26 11:11:49 UTC (rev 11387)
@@ -0,0 +1,151 @@
+/*
+ * Copyright 2004 ThoughtWorks, Inc
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * User-extensions javascript for Selenium. Exadel. 2008
+ */
+
+IEBrowserBot.prototype._fireEventOnElement = function(eventType, element, clientX, clientY) {
+ var win = this.getCurrentWindow();
+ triggerEvent(element, 'focus', false);
+
+ var wasChecked = element.checked;
+
+ // Set a flag that records if the page will unload - this isn't always accurate, because
+ // <a href="javascript:alert('foo'):"> triggers the onbeforeunload event, even thought the page won't unload
+ var pageUnloading = false;
+ var pageUnloadDetector = function() {
+ pageUnloading = true;
+ };
+ win.attachEvent("onbeforeunload", pageUnloadDetector);
+ this._modifyElementTarget(element);
+ if (element[eventType] && !this.controlKeyDown && !this.altKeyDown && !this.shiftKeyDown && !this.metaKeyDown) {
+ element[eventType]();
+ }
+ else {
+ this.browserbot.triggerMouseEvent(element, eventType, true, clientX, clientY);
+ }
+
+
+ // If the page is going to unload - still attempt to fire any subsequent events.
+ // However, we can't guarantee that the page won't unload half way through, so we need to handle exceptions.
+ try {
+ win.detachEvent("onbeforeunload", pageUnloadDetector);
+
+ if (this._windowClosed(win)) {
+ return;
+ }
+
+ // Onchange event is not triggered automatically in IE.
+ if (isDefined(element.checked) && wasChecked != element.checked) {
+ triggerEvent(element, 'change', true);
+ }
+
+ }
+ catch (e) {
+ // If the page is unloading, we may get a "Permission denied" or "Unspecified error".
+ // Just ignore it, because the document may have unloaded.
+ if (pageUnloading) {
+ LOG.logHook = function() {
+ };
+ LOG.warn("Caught exception when firing events on unloading page: " + e.message);
+ return;
+ }
+ throw e;
+ }
+};
+
+
+Selenium.prototype.doDragAndDropToObject = function(locatorOfObjectToBeDragged, locatorOfDragDestinationObject) {
+/** Drags an element and drops it on another element
+ *
+ * @param locatorOfObjectToBeDragged an element to be dragged
+ * @param locatorOfDragDestinationObject an element whose location (i.e., whose center-most pixel) will be the point where locatorOfObjectToBeDragged is dropped
+ */
+ var startX = this.getElementPositionLeft(locatorOfObjectToBeDragged);
+ var startY = this.getElementPositionTop(locatorOfObjectToBeDragged);
+
+ var destinationLeftX = this.getElementPositionLeft(locatorOfDragDestinationObject);
+ var destinationTopY = this.getElementPositionTop(locatorOfDragDestinationObject);
+ var destinationWidth = this.getElementWidth(locatorOfDragDestinationObject);
+ var destinationHeight = this.getElementHeight(locatorOfDragDestinationObject);
+
+ var endX = Math.round(destinationLeftX + (destinationWidth / 2));
+ var endY = Math.round(destinationTopY + (destinationHeight / 2));
+
+ var deltaX = endX - startX;
+ var deltaY = endY - startY;
+
+ var movementsString = "" + deltaX + "," + deltaY;
+
+ this.doDragAndDrop(locatorOfObjectToBeDragged, movementsString);
+ var objectToBeDragged = this.browserbot.findElement(locatorOfObjectToBeDragged);
+ var clientStartXY = getClientXY(objectToBeDragged)
+ var clientStartX = clientStartXY[0];
+ var clientStartY = clientStartXY[1];
+
+ var movements = movementsString.split(/,/);
+ var movementX = Number(movements[0]);
+ var movementY = Number(movements[1]);
+
+ var clientFinishX = ((clientStartX + movementX) < 0) ? 0 : (clientStartX + movementX);
+ var clientFinishY = ((clientStartY + movementY) < 0) ? 0 : (clientStartY + movementY);
+
+ // We should also fire event on DragDestinationObject.
+ var dragDestinationObject = this.browserbot.findElement(locatorOfDragDestinationObject);
+ this.browserbot.triggerMouseEvent(dragDestinationObject, 'mouseover', true, clientFinishX, clientFinishY);
+
+ this.browserbot.triggerMouseEvent(objectToBeDragged, 'mousemove', true, clientFinishX, clientFinishY);
+ this.browserbot.triggerMouseEvent(objectToBeDragged, 'mouseup', true, clientFinishX, clientFinishY);
+ this.browserbot.triggerMouseEvent(dragDestinationObject, 'mouseup', true, clientFinishX, clientFinishY);
+
+};
+
+
+Selenium.prototype.doDragAndDrop = function(locator, movementsString) {
+ /** Drags an element a certain distance and then drops it
+ * @param locator an element locator
+ * @param movementsString offset in pixels from the current location to which the element should be moved, e.g., "+70,-300"
+ */
+ var element = this.browserbot.findElement(locator);
+ var clientStartXY = getClientXY(element)
+ var clientStartX = clientStartXY[0];
+ var clientStartY = clientStartXY[1];
+
+ var movements = movementsString.split(/,/);
+ var movementX = Number(movements[0]);
+ var movementY = Number(movements[1]);
+
+ var clientFinishX = ((clientStartX + movementX) < 0) ? 0 : (clientStartX + movementX);
+ var clientFinishY = ((clientStartY + movementY) < 0) ? 0 : (clientStartY + movementY);
+
+ var mouseSpeed = this.mouseSpeed;
+ var move = function(current, dest) {
+ if (current == dest) return current;
+ if (Math.abs(current - dest) < mouseSpeed) return dest;
+ return (current < dest) ? current + mouseSpeed : current - mouseSpeed;
+ }
+
+ this.browserbot.triggerMouseEvent(element, 'mousedown', true, clientStartX, clientStartY);
+ this.browserbot.triggerMouseEvent(element, 'mousemove', true, clientStartX, clientStartY);
+ var clientX = clientStartX;
+ var clientY = clientStartY;
+
+ while ((clientX != clientFinishX) || (clientY != clientFinishY)) {
+ clientX = move(clientX, clientFinishX);
+ clientY = move(clientY, clientFinishY);
+ this.browserbot.triggerMouseEvent(element, 'mousemove', true, clientX, clientY);
+ }
+
+};
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dnd/dndTest.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/template/dataTable.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/template/modalPanel.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/template/simple.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java 2008-11-26 01:16:00 UTC (rev 11386)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java 2008-11-26 11:11:49 UTC (rev 11387)
@@ -115,8 +115,10 @@
@BeforeSuite
public void startSeleniumServer() throws Exception {
RemoteControlConfiguration config = new RemoteControlConfiguration();
+ if (getFirefoxTemplate() != null) {
+ config.setFirefoxProfileTemplate(new File(getFirefoxTemplate()));
+ }
config.setMultiWindow(false);
- config.setUserExtensions(new File(getClass().getClassLoader().getResource("script/selenium/user-extensions.js").toURI()));
seleniumServer = new SeleniumServer(false, config);
seleniumServer.start();
}
@@ -158,6 +160,10 @@
selenium = null;
}
}
+
+ protected String getFirefoxTemplate() {
+ return null;
+ }
protected void loadTemplates(String templateExpr) {
String[] array = new String[]{};
@@ -1290,4 +1296,5 @@
}
+
}
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DnDTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DnDTest.java 2008-11-26 01:16:00 UTC (rev 11386)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DnDTest.java 2008-11-26 11:11:49 UTC (rev 11387)
@@ -2,14 +2,111 @@
import org.ajax4jsf.template.Template;
import org.richfaces.SeleniumTestBase;
+import org.testng.Assert;
import org.testng.annotations.Test;
public class DnDTest extends SeleniumTestBase {
+
+ static final String RESET_METHOD = "#{dndBean.reset}";
+
+ static final String FORMID = "_form:";
+ static final String DATAID = "src:";
+
+ String statusId;
+ String dragValueId;
+ String dropValueId;
+ String phpDropZoneId;
+ String dnetDropZoneId;
+ String cfDropZoneId;
+ String itemsHolderId;
+
+ void initIds(String parentId) {
+ statusId = parentId + FORMID + "status";
+ dragValueId = parentId + FORMID + "dragValue";
+ dropValueId = parentId + FORMID + "dropValue";
+ phpDropZoneId = parentId + FORMID + "PHP";
+ dnetDropZoneId = parentId + FORMID + "DNET";
+ cfDropZoneId = parentId + FORMID + "CF";
+ itemsHolderId = parentId + FORMID + DATAID;
+ }
+
+ @Override
+ protected String getFirefoxTemplate() {
+ return "c:/FFProfile";
+ }
@Test
- public void _testDnDComponents(Template template) {
- renderPage(template);
+ public void testDragValue(Template template) {
+ renderPage(template, RESET_METHOD);
+ initIds(getParentId());
+
+ DragAndDrop(0, phpDropZoneId);
+ waitForAjaxCompletion();
+ assertDragValue("Flexible Ajax", phpDropZoneId);
+
+ DragAndDrop(1, dnetDropZoneId);
+ waitForAjaxCompletion();
+ assertDragValue("AJAXEngine", dnetDropZoneId);
+
+ DragAndDrop(0, cfDropZoneId);
+ waitForAjaxCompletion();
+ assertDragValue("ajaxCFC", cfDropZoneId);
}
+
+
+ @Test
+ public void testDropValue(Template template) {
+ renderPage(template, RESET_METHOD);
+ initIds(getParentId());
+
+ DragAndDrop(0, phpDropZoneId);
+ waitForAjaxCompletion();
+ assertDropValue("PHP");
+ testDropData();
+
+ DragAndDrop(1, dnetDropZoneId);
+ waitForAjaxCompletion();
+ assertDropValue("DNET");
+ testDropData();
+
+ DragAndDrop(0, cfDropZoneId);
+ waitForAjaxCompletion();
+ assertDropValue("CF");
+ testDropData();
+ }
+
+
+
+ void DragAndDrop(int itemNumber, String dropZoneId) {
+ selenium.dragAndDropToObject("id=" + itemsHolderId + itemNumber + ":item", "id=" + dropZoneId + "_body");
+ }
+
+ void testDropData () {
+ String dragData = runScript("window._dropData");
+ if (dragData == null || !dragData.equals("dropData")) {
+ Assert.fail("Data attribute for dropSupport does not work.");
+ }
+ runScript("window._dropData = null;");
+ }
+
+ void assertDragValue(String dragLabel, String dropZoneId) {
+ String text = getTextById(dragValueId);
+ if (text == null || text.indexOf("org.ajax4jsf.bean.DnDBean$Framework") == -1) {
+ Assert.fail("Drag value ["+text+"] is incorrect. It's not refferenced to org.ajax4jsf.bean.DnDBean$Framework class instance");
+ }
+ String dropZoneText = getTextById(dropZoneId);
+ if (dropZoneText == null || dropZoneText.indexOf(dragLabel) == -1) {
+ Assert.fail("Drag label is incorrect. Drop zone text ["+dropZoneText+"] does not contain label of dragged element");
+ }
+ }
+
+ void assertDropValue(String expectedValue) {
+ AssertTextEquals(dropValueId, expectedValue, "Drop Value is incorrect");
+ }
+
+ String getStatusValue() {
+ return getValueById(statusId);
+ }
@Override
public String getTestUrl() {
15 years, 5 months
JBoss Rich Faces SVN: r11386 - in trunk: test-applications/ajaxTest and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2008-11-25 20:16:00 -0500 (Tue, 25 Nov 2008)
New Revision: 11386
Removed:
trunk/test-applications/ajaxTest/src/main/webapp/WEB-INF/classes/
Modified:
trunk/framework/jsf-test/src/main/java/org/richfaces/test/staging/ClasspathServerResource.java
trunk/framework/jsf-test/src/main/java/org/richfaces/test/staging/StagingConnection.java
trunk/framework/jsf-test/src/main/java/org/richfaces/test/staging/StagingServer.java
trunk/test-applications/ajaxTest/pom.xml
trunk/test-applications/ajaxTest/src/main/webapp/repeater.xhtml
trunk/test-applications/ajaxTest/src/test/java/org/richfaces/RepeaterTest.java
Log:
Minor test framework improvements.
Modified: trunk/framework/jsf-test/src/main/java/org/richfaces/test/staging/ClasspathServerResource.java
===================================================================
--- trunk/framework/jsf-test/src/main/java/org/richfaces/test/staging/ClasspathServerResource.java 2008-11-25 23:44:58 UTC (rev 11385)
+++ trunk/framework/jsf-test/src/main/java/org/richfaces/test/staging/ClasspathServerResource.java 2008-11-26 01:16:00 UTC (rev 11386)
@@ -7,7 +7,9 @@
import java.util.logging.Level;
import java.util.logging.Logger;
+import org.richfaces.test.TestException;
+
/**
* This class represents file from classpath in the virtual web application
* content.
@@ -51,8 +53,11 @@
.getContextClassLoader();
if (null == classLoader) {
classLoader = this.getClass().getClassLoader();
+ }
+ url = classLoader.getResource(classpath);
+ if(null == url){
+ throw new TestException("Virtual server resource can't be loaded from "+classpath);
}
- url = classLoader.getResource(classpath);
}
}
Modified: trunk/framework/jsf-test/src/main/java/org/richfaces/test/staging/StagingConnection.java
===================================================================
--- trunk/framework/jsf-test/src/main/java/org/richfaces/test/staging/StagingConnection.java 2008-11-25 23:44:58 UTC (rev 11385)
+++ trunk/framework/jsf-test/src/main/java/org/richfaces/test/staging/StagingConnection.java 2008-11-26 01:16:00 UTC (rev 11386)
@@ -150,17 +150,17 @@
return started;
}
- private void checkStarted() {
- if (!isFinished()) {
- throw new TestException("request have not been started");
- }
- }
+// private void checkStarted() {
+// if (!isFinished()) {
+// throw new TestException("request have not been started");
+// }
+// }
- private void checkNotStarted() {
- if (isStarted()) {
- throw new TestException("request was started, no parameters changes allowed");
- }
- }
+// private void checkNotStarted() {
+// if (isStarted()) {
+// throw new TestException("request was started, no parameters changes allowed");
+// }
+// }
/**
* Execute this connection request on the associated servlet or filter chain.
@@ -215,11 +215,9 @@
* Set request HTTP methos ( GET, POST etc ).
* @param method
* the method to set
- * @throws TestException
- * if connection have already been started.
*/
public void setRequestMethod(HttpMethod method) {
- checkNotStarted();
+// checkNotStarted();
this.method = method;
}
@@ -235,11 +233,9 @@
* Append additional request parameter.
* @param name
* @param value
- * @throws TestException
- * if connection have already been started.
*/
public void addRequestParameter(String name, String value) {
- checkNotStarted();
+// checkNotStarted();
String[] values = requestParameters.get(name);
if (null == values) {
values = new String[1];
@@ -256,10 +252,10 @@
* Get content of the response as String.
* @return content of the response writer or String created from the ServletOutputStream with current response encoding.
* @throws TestException
- * if connection have not been started or response has an unsupported encoding.
+ * if has an unsupported encoding.
*/
public String getContentAsString() {
- checkStarted();
+// checkStarted();
String content = response.getWriterContent();
if (null == content) {
byte[] streamContent = response.getStreamContent();
@@ -283,10 +279,10 @@
* Get content of the response as byte array.
* @return content of the ServletOutputStream or convert String, collected by response writer, with current response encoding.
* @throws TestException
- * if connection have not been started or response has unsupported encoding.
+ * if response has unsupported encoding.
*/
public byte[] getResponseBody() {
- checkStarted();
+// checkStarted();
byte[] content = response.getStreamContent();
if (null == content) {
String writerContent = response.getWriterContent();
@@ -330,41 +326,33 @@
/**
* @return encoding used to write response.
- * @throws TestException
- * if connection have not been started .
*/
public String getResponseCharacterEncoding() {
- checkStarted();
+// checkStarted();
return response.getCharacterEncoding();
}
/**
* @return content type ( eg 'text/html' ) of the response.
- * @throws TestException
- * if connection have not been started .
*/
public String getResponseContentType() {
- checkStarted();
+// checkStarted();
return response.getContentType();
}
/**
* @return HTTP status code of the response.
- * @throws TestException
- * if connection have not been started .
*/
public int getResponseStatus() {
- checkStarted();
+// checkStarted();
return response.getStatus();
}
/**
* @return HTTP error message.
- * @throws TestException
- * if connection have not been started .
*/
public String getErrorMessage() {
- checkStarted();
+// checkStarted();
return response.getErrorMessage();
}
@@ -372,11 +360,9 @@
* Set request Query string. This method does not parse query string, {@link #parseFormParameters(String)} should be used.
* @param queryString
* the queryString to set
- * @throws TestException
- * if connection have already been started .
*/
public void setQueryString(String queryString) {
- checkNotStarted();
+// checkNotStarted();
this.queryString = queryString;
}
@@ -390,11 +376,9 @@
/**
* Get HTTP response headers.
* @return headers name-values map.
- * @throws TestException
- * if connection have not been started .
*/
public Map<String, String[]> getResponseHeaders() {
- checkStarted();
+// checkStarted();
return response.getHeaders();
}
@@ -404,7 +388,7 @@
* @throws UnsupportedEncodingException
*/
public void setRequestCharacterEncoding(String charset) throws UnsupportedEncodingException {
- checkNotStarted();
+// checkNotStarted();
request.setCharacterEncoding(charset);
}
@@ -413,7 +397,7 @@
* @param body
*/
public void setRequestBody(String body) {
- checkNotStarted();
+// checkNotStarted();
request.setRequestBody(body);
}
@@ -422,7 +406,7 @@
* @param contentType
*/
public void setRequestContentType(String contentType) {
- checkNotStarted();
+// checkNotStarted();
request.setContentType(contentType);
}
@@ -432,7 +416,7 @@
* @param headers
*/
public void addRequestHeaders(Map<String, String> headers) {
- checkNotStarted();
+// checkNotStarted();
request.addHeaders(headers);
}
Modified: trunk/framework/jsf-test/src/main/java/org/richfaces/test/staging/StagingServer.java
===================================================================
--- trunk/framework/jsf-test/src/main/java/org/richfaces/test/staging/StagingServer.java 2008-11-25 23:44:58 UTC (rev 11385)
+++ trunk/framework/jsf-test/src/main/java/org/richfaces/test/staging/StagingServer.java 2008-11-26 01:16:00 UTC (rev 11386)
@@ -44,17 +44,19 @@
import org.richfaces.test.TestException;
/**
- * This class implements limited Http servlet container 2.5 functionality. It is designed for a test purposes only ,so that has a limitations:
+ * This class implements limited Http servlet container 2.5 functionality. It is
+ * designed for a test purposes only ,so that has a limitations:
* <ul>
* <li>supports local calls only.</li>
* <li>java code only configuration ( no xml files processed ).</li>
* <li>just one web application, 'deployed' in the root context.</li>
* <li>only one client session</li>
* <li>communicates by the local java calls only, no network connection</li>
- * <li>no JSP compilator support ( but it is possible to register pre-compiled pages as servlets)</li>
+ * <li>no JSP compilator support ( but it is possible to register pre-compiled
+ * pages as servlets)</li>
* <li>...</li>
* </ul>
- * It is main part of the test framework.
+ * It is main part of the test framework.
*
*/
public class StagingServer {
@@ -73,7 +75,8 @@
private final List<RequestChain> servlets = new ArrayList<RequestChain>();
- private RequestChain defaultServlet= new ServletContainer(null, new StaticServlet());
+ private RequestChain defaultServlet = new ServletContainer(null,
+ new StaticServlet());
private final List<EventListener> contextListeners = new ArrayList<EventListener>();
@@ -89,16 +92,17 @@
private ServletContext contextProxy;
- private ServerHttpSession session=null;
+ private ServerHttpSession session = null;
- private HttpSession sessionProxy=null;
+ private HttpSession sessionProxy = null;
- private boolean initialised=false;
+ private boolean initialised = false;
/**
* This inner class links ServletContext calls to the server instance.
+ *
* @author asmirnov
- *
+ *
*/
private class LocalContext extends StagingServletContext {
@@ -116,8 +120,12 @@
return mimeTypes.get(file);
}
- /* (non-Javadoc)
- * @see org.richfaces.test.staging.StagingServletContext#valueBound(javax.servlet.ServletContextAttributeEvent)
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.richfaces.test.staging.StagingServletContext#valueBound(javax
+ * .servlet.ServletContextAttributeEvent)
*/
@Override
protected void valueBound(ServletContextAttributeEvent event) {
@@ -130,8 +138,12 @@
}
}
- /* (non-Javadoc)
- * @see org.richfaces.test.staging.StagingServletContext#valueReplaced(javax.servlet.ServletContextAttributeEvent)
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.richfaces.test.staging.StagingServletContext#valueReplaced(javax
+ * .servlet.ServletContextAttributeEvent)
*/
@Override
protected void valueReplaced(ServletContextAttributeEvent event) {
@@ -144,8 +156,12 @@
}
}
- /* (non-Javadoc)
- * @see org.richfaces.test.staging.StagingServletContext#valueUnbound(javax.servlet.ServletContextAttributeEvent)
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.richfaces.test.staging.StagingServletContext#valueUnbound(javax
+ * .servlet.ServletContextAttributeEvent)
*/
@Override
protected void valueUnbound(ServletContextAttributeEvent event) {
@@ -158,8 +174,12 @@
}
}
- /* (non-Javadoc)
- * @see org.richfaces.test.staging.StagingServletContext#getServerResource(java.lang.String)
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.richfaces.test.staging.StagingServletContext#getServerResource
+ * (java.lang.String)
*/
@Override
protected ServerResource getServerResource(String path) {
@@ -170,20 +190,27 @@
/**
* This inner class links session object calls to the server instance.
+ *
* @author asmirnov
- *
+ *
*/
private class ServerHttpSession extends StagingHttpSession {
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see javax.servlet.http.HttpSession#getServletContext()
*/
public ServletContext getServletContext() {
return context;
}
- /* (non-Javadoc)
- * @see org.richfaces.test.staging.StagingHttpSession#valueBound(javax.servlet.http.HttpSessionBindingEvent)
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.richfaces.test.staging.StagingHttpSession#valueBound(javax.servlet
+ * .http.HttpSessionBindingEvent)
*/
@Override
protected void valueBound(
@@ -197,8 +224,12 @@
});
}
- /* (non-Javadoc)
- * @see org.richfaces.test.staging.StagingHttpSession#valueUnbound(javax.servlet.http.HttpSessionBindingEvent)
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.richfaces.test.staging.StagingHttpSession#valueUnbound(javax.
+ * servlet.http.HttpSessionBindingEvent)
*/
@Override
protected void valueUnbound(
@@ -212,8 +243,12 @@
});
}
- /* (non-Javadoc)
- * @see org.richfaces.test.staging.StagingHttpSession#valueReplaced(javax.servlet.http.HttpSessionBindingEvent)
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.richfaces.test.staging.StagingHttpSession#valueReplaced(javax
+ * .servlet.http.HttpSessionBindingEvent)
*/
@Override
protected void valueReplaced(
@@ -242,8 +277,8 @@
}
/**
- * Append executable server object ( {@link Filter} or {@link Servlet}
- * to the server.
+ * Append executable server object ( {@link Filter} or {@link Servlet} to
+ * the server.
*
* @param servlet
*/
@@ -268,8 +303,9 @@
*
* @param path
* request path relative to web application context.
- * @return Appropriate Filter or Servlet executable object to serve given request. If no servlet was registered for the given path,
- * try to send requested object directly.
+ * @return Appropriate Filter or Servlet executable object to serve given
+ * request. If no servlet was registered for the given path, try to
+ * send requested object directly.
*/
public RequestChain getServlet(String path) {
RequestChain result = null;
@@ -288,7 +324,7 @@
result = defaultServlet;
}
} catch (MalformedURLException e) {
- log.warning("Mailformed request URL "+e.getMessage());
+ log.warning("Mailformed request URL " + e.getMessage());
}
}
return result;
@@ -296,6 +332,7 @@
/**
* Add web application init parameter.
+ *
* @param name
* @param value
*/
@@ -304,7 +341,8 @@
}
/**
- * Add default mime type for serve files with given extension.
+ * Add default mime type for serve files with given extension.
+ *
* @param extension
* @param mimeType
*/
@@ -313,9 +351,14 @@
}
/**
- * Add java resource to the virtual web application content. This method makes all parent directories as needed.
- * @param path path to the file in the virtual web server.
- * @param resource path to the resource in the classpath, as required by the {@link ClassLoader#getResource(String)}.
+ * Add java resource to the virtual web application content. This method
+ * makes all parent directories as needed.
+ *
+ * @param path
+ * path to the file in the virtual web server.
+ * @param resource
+ * path to the resource in the classpath, as required by the
+ * {@link ClassLoader#getResource(String)}.
*/
public void addResource(String path, String resource) {
ServerResourcePath resourcePath = new ServerResourcePath(path);
@@ -324,9 +367,13 @@
}
/**
- * Add resource to the virtual veb application content. This method makes all parent directories as needed.
- * @param path path to the file in the virtual web server.
- * @param resource {@code URL} to the file content.
+ * Add resource to the virtual veb application content. This method makes
+ * all parent directories as needed.
+ *
+ * @param path
+ * path to the file in the virtual web server.
+ * @param resource
+ * {@code URL} to the file content.
*/
public void addResource(String path, URL resource) {
serverRoot.addResource(new ServerResourcePath(path),
@@ -334,9 +381,18 @@
}
/**
- * Add all resources from the directory to the virtual web application content.
- * @param path name of the target directory in the virtual web application. If no such directory exists, it will be created, as well as all parent directories as needed.
- * @param resource {@code URL} to the source directory or any file in the source directory. Only 'file' or 'jar' protocols are supported. If this parameter points to a file, it will be converted to a enclosing directory.
+ * Add all resources from the directory to the virtual web application
+ * content.
+ *
+ * @param path
+ * name of the target directory in the virtual web application.
+ * If no such directory exists, it will be created, as well as
+ * all parent directories as needed.
+ * @param resource
+ * {@code URL} to the source directory or any file in the source
+ * directory. Only 'file' or 'jar' protocols are supported. If
+ * this parameter points to a file, it will be converted to a
+ * enclosing directory.
*/
public void addResourcesFromDirectory(String path, URL resource) {
ServerResourcePath resourcePath = new ServerResourcePath(path);
@@ -357,10 +413,46 @@
}
/**
- * Internal method used by the {@link #addResourcesFromDirectory(String, URL)} to process 'file' protocol.
- * @param resource source directory.
- * @param baseDirectory target virtual directory.
+ * Add all files from the directory to the virtual web application
+ * content.
+ *
+ * @param path
+ * name of the target directory in the virtual web application.
+ * If no such directory exists, it will be created, as well as
+ * all parent directories as needed.
+ * @param resource
+ * {@code File} of the source directory or any file in the source
+ * directory. If this parameter points to a file, it will be converted to a
+ * enclosing directory.
*/
+ public void addResourcesFromDirectory(String path, File directory) {
+ ServerResourcePath resourcePath = new ServerResourcePath(path);
+ ServerResource baseDirectory = serverRoot.getResource(resourcePath);
+ if (null == baseDirectory) {
+ // Create target directory.
+ baseDirectory = new ServerResourcesDirectory();
+ serverRoot.addResource(resourcePath, baseDirectory);
+ }
+ if (!directory.isDirectory()) {
+ directory = directory.getParentFile();
+ }
+ try {
+ addFiles(baseDirectory, directory);
+ } catch (MalformedURLException e) {
+ throw new TestException(e);
+ }
+ }
+
+ /**
+ * Internal method used by the
+ * {@link #addResourcesFromDirectory(String, URL)} to process 'file'
+ * protocol.
+ *
+ * @param resource
+ * source directory.
+ * @param baseDirectory
+ * target virtual directory.
+ */
protected void addResourcesFromFile(URL resource,
ServerResource baseDirectory) {
File file = new File(resource.getPath());
@@ -375,9 +467,14 @@
}
/**
- * Internal method used by the {@link #addResourcesFromDirectory(String, URL)} to process 'jar' protocol.
- * @param resource URL to the any object in the source directory.
- * @param baseDirectory target virtual directory.
+ * Internal method used by the
+ * {@link #addResourcesFromDirectory(String, URL)} to process 'jar'
+ * protocol.
+ *
+ * @param resource
+ * URL to the any object in the source directory.
+ * @param baseDirectory
+ * target virtual directory.
*/
protected void addResourcesFromJar(URL resource,
ServerResource baseDirectory) {
@@ -402,14 +499,16 @@
}
} catch (IOException e) {
- throw new TestException("Error read Jar content",e);
+ throw new TestException("Error read Jar content", e);
} catch (URISyntaxException e) {
throw new TestException(e);
}
}
/**
- * Internal reccursive method process directory content and all subdirectories.
+ * Internal reccursive method process directory content and all
+ * subdirectories.
+ *
* @param baseDirectory
* @param file
* @throws MalformedURLException
@@ -435,8 +534,8 @@
/**
* Add web-application wide listenes, same as it is defined by the
- * <listener> element in the web.xml file for a real server.
- * Supported listener types:
+ * <listener> element in the web.xml file for a real server. Supported
+ * listener types:
* <ul>
* <li>{@link ServletContextListener}</li>
* <li>{@link ServletContextAttributeListener}</li>
@@ -445,7 +544,9 @@
* <li>{@link ServletRequestListener}</li>
* <li>{@link ServletRequestAttributeListener}</li>
* </ul>
- * @param listener web listener instance.
+ *
+ * @param listener
+ * web listener instance.
*/
public void addWebListener(EventListener listener) {
contextListeners.add(listener);
@@ -453,6 +554,7 @@
/**
* Getter method for 'interceptor' events listener.
+ *
* @return the invocationListener
*/
public InvocationListener getInvocationListener() {
@@ -460,8 +562,11 @@
}
/**
- * Set listener which gets events on all calls to any methods of the {@link ServletContext}, {@link HttpSession}, {@link HttpServletRequest}, {@link HttpServletResponse} instances
- * in the virtual server. this interceptor can be used to check internal calls in the tests .
+ * Set listener which gets events on all calls to any methods of the
+ * {@link ServletContext}, {@link HttpSession}, {@link HttpServletRequest},
+ * {@link HttpServletResponse} instances in the virtual server. this
+ * interceptor can be used to check internal calls in the tests .
+ *
* @param invocationListener
* the invocationListener to set
*/
@@ -470,8 +575,10 @@
}
/**
- * Create instance of the {@link InvocationHandler} for the proxy objects. This handler fire events to the
- * registered {@link InvocationListener} ( if present ) after target object method call.
+ * Create instance of the {@link InvocationHandler} for the proxy objects.
+ * This handler fire events to the registered {@link InvocationListener} (
+ * if present ) after target object method call.
+ *
* @return the invocationHandler
*/
InvocationHandler getInvocationHandler(final Object target) {
@@ -502,6 +609,7 @@
/**
* Get virtual server session object. Create new one if necessary.
+ *
* @return instance of the virtual server session.
*/
public HttpSession getSession() {
@@ -509,32 +617,31 @@
}
/**
- *
- * Returns the current <code>HttpSession</code>
- * associated with this server or, if there is no
- * current session and <code>create</code> is true, returns
- * a new session. Staging server supports only one session per instance,
- * different clients for the same server instance does not supported.
- *
- * <p>If <code>create</code> is <code>false</code>
- * and the request has no valid <code>HttpSession</code>,
- * this method returns <code>null</code>.
- *
- *
- * @param create <code>true</code> to create
- * a new session for this request if necessary;
- * <code>false</code> to return <code>null</code>
- * if there's no current session
- *
- *
- * @return the <code>HttpSession</code> associated
- * with this server instance or <code>null</code> if
- * <code>create</code> is <code>false</code>
- * and the server has no session
- *
+ *
+ * Returns the current <code>HttpSession</code> associated with this server
+ * or, if there is no current session and <code>create</code> is true,
+ * returns a new session. Staging server supports only one session per
+ * instance, different clients for the same server instance does not
+ * supported.
+ *
+ * <p>
+ * If <code>create</code> is <code>false</code> and the request has no valid
+ * <code>HttpSession</code>, this method returns <code>null</code>.
+ *
+ *
+ * @param create
+ * <code>true</code> to create a new session for this request if
+ * necessary; <code>false</code> to return <code>null</code> if
+ * there's no current session
+ *
+ *
+ * @return the <code>HttpSession</code> associated with this server instance
+ * or <code>null</code> if <code>create</code> is <code>false</code>
+ * and the server has no session
+ *
*/
public synchronized HttpSession getSession(boolean create) {
- if(!initialised){
+ if (!initialised) {
throw new TestException("Staging server have not been initialised");
}
if (null == this.session && create) {
@@ -560,9 +667,11 @@
}
/**
- * Virtual server initialization. This method creates instances of the {@link ServletContext}, {@link JspFactory},
- * informs {@link ServletContextListener} ind inits all {@link Filter} and {@link Servlet} instances.
- * It should be called from test setUp method to prepare testing environment.
+ * Virtual server initialization. This method creates instances of the
+ * {@link ServletContext}, {@link JspFactory}, informs
+ * {@link ServletContextListener} ind inits all {@link Filter} and
+ * {@link Servlet} instances. It should be called from test setUp method to
+ * prepare testing environment.
*/
public void init() {
log.info("Init staging server");
@@ -595,18 +704,20 @@
}
defaultServlet.init(context);
} catch (ServletException e) {
- throw new TestException("Servlet initialisation error ",e);
+ throw new TestException("Servlet initialisation error ", e);
}
this.initialised = true;
}
/**
- * Stop wirtual server. This method informs {@link ServletContextListener} ind inits all {@link Filter} and {@link Servlet} instances, as well remove all internal objects.
- * It should be called from the testt thearDown method to clean up testing environment.
- *
+ * Stop wirtual server. This method informs {@link ServletContextListener}
+ * ind inits all {@link Filter} and {@link Servlet} instances, as well
+ * remove all internal objects. It should be called from the testt thearDown
+ * method to clean up testing environment.
+ *
*/
public void destroy() {
- if(!initialised){
+ if (!initialised) {
throw new TestException("Staging server have not been initialised");
}
this.initialised = false;
@@ -643,14 +754,18 @@
}
/**
- * Get virtual connection to the given URL. Even thought for an http request to the
- * external servers, only local connection to the virtual server will be created.
- * @param url request url.
- * @return local connection to the appropriate servlet in the virtual server.
+ * Get virtual connection to the given URL. Even thought for an http request
+ * to the external servers, only local connection to the virtual server will
+ * be created.
+ *
+ * @param url
+ * request url.
+ * @return local connection to the appropriate servlet in the virtual
+ * server.
* @throws {@link TestException} if no servlet found to process given URL.
*/
public StagingConnection getConnection(URL url) {
- if(!initialised){
+ if (!initialised) {
throw new TestException("Staging server have not been initialised");
}
return new StagingConnection(this, url);
@@ -658,10 +773,11 @@
/**
* Get instance of virtual web application context.
+ *
* @return context instance.
*/
public ServletContext getContext() {
- if(!initialised){
+ if (!initialised) {
throw new TestException("Staging server have not been initialised");
}
return contextProxy;
@@ -669,7 +785,9 @@
/**
* Inform {@link ServletRequestListener} instances. For internal use only.
- * @param request started request.
+ *
+ * @param request
+ * started request.
*/
void requestStarted(ServletRequest request) {
final ServletRequestEvent event = new ServletRequestEvent(context,
@@ -685,7 +803,9 @@
/**
* Inform {@link ServletRequestListener} instances. For internal use only.
- * @param request finished request.
+ *
+ * @param request
+ * finished request.
*/
void requestFinished(ServletRequest request) {
final ServletRequestEvent event = new ServletRequestEvent(context,
@@ -698,8 +818,7 @@
});
}
- void requestAttributeAdded(ServletRequest request, String name,
- Object o) {
+ void requestAttributeAdded(ServletRequest request, String name, Object o) {
final ServletRequestAttributeEvent event = new ServletRequestAttributeEvent(
context, request, name, o);
fireEvent(REQUEST_ATTRIBUTE_LISTENER_CLASS,
Modified: trunk/test-applications/ajaxTest/pom.xml
===================================================================
--- trunk/test-applications/ajaxTest/pom.xml 2008-11-25 23:44:58 UTC (rev 11385)
+++ trunk/test-applications/ajaxTest/pom.xml 2008-11-26 01:16:00 UTC (rev 11386)
@@ -7,15 +7,13 @@
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<build>
- <testResources>
- <testResource>
- <directory>src/main/webapp</directory>
- </testResource>
- <testResource>
- <directory>src/test/resources</directory>
- </testResource>
- </testResources>
- <finalName>ajaxTest</finalName>
+ <!--
+ <testResources> <testResource> <directory>src/main/webapp</directory>
+ </testResource> <testResource>
+ <directory>src/test/resources</directory> </testResource>
+ </testResources>
+ -->
+ <finalName>ajaxTest</finalName>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
@@ -25,6 +23,32 @@
<target>1.5</target>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>maven-jetty-plugin</artifactId>
+ <configuration>
+ <!-- http://docs.codehaus.org/display/JETTY/Maven+Jetty+Plugin -->
+ <scanIntervalSeconds>10</scanIntervalSeconds>
+ <connectors>
+ <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
+ <port>8080</port>
+ <maxIdleTime>60000</maxIdleTime>
+ </connector>
+ </connectors>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <systemProperties>
+ <property>
+ <name>webapp</name>
+ <value>${basedir}/src/main/webapp</value>
+ </property>
+ </systemProperties>
+ </configuration>
+ </plugin>
</plugins>
</build>
<dependencies>
Modified: trunk/test-applications/ajaxTest/src/main/webapp/repeater.xhtml
===================================================================
--- trunk/test-applications/ajaxTest/src/main/webapp/repeater.xhtml 2008-11-25 23:44:58 UTC (rev 11385)
+++ trunk/test-applications/ajaxTest/src/main/webapp/repeater.xhtml 2008-11-26 01:16:00 UTC (rev 11386)
@@ -7,7 +7,7 @@
<body>
<h:form id="ajaxForm">
<h:inputText id="text" value="#{bean.text}">
- <a4j:support reRender="out" event="onclick"></a4j:support>
+ <a4j:support reRender="out" event="onkeyup"></a4j:support>
</h:inputText>
<h:outputText id="out" value="#{bean.text}"></h:outputText>
</h:form>
Modified: trunk/test-applications/ajaxTest/src/test/java/org/richfaces/RepeaterTest.java
===================================================================
--- trunk/test-applications/ajaxTest/src/test/java/org/richfaces/RepeaterTest.java 2008-11-25 23:44:58 UTC (rev 11385)
+++ trunk/test-applications/ajaxTest/src/test/java/org/richfaces/RepeaterTest.java 2008-11-26 01:16:00 UTC (rev 11386)
@@ -5,17 +5,15 @@
import static org.junit.Assert.*;
-import org.junit.After;
-import org.junit.Before;
+import java.io.File;
+
import org.junit.Test;
import org.richfaces.test.AbstractFacesTest;
import org.richfaces.test.LocalWebClient;
+import org.richfaces.test.TestException;
import org.w3c.dom.Element;
-import com.gargoylesoftware.htmlunit.BrowserVersion;
-import com.gargoylesoftware.htmlunit.NicelyResynchronizingAjaxController;
import com.gargoylesoftware.htmlunit.WebClient;
-import com.gargoylesoftware.htmlunit.html.HtmlForm;
import com.gargoylesoftware.htmlunit.html.HtmlInput;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
@@ -27,30 +25,31 @@
@Override
protected void setupWebContent() {
- facesServer.addResourcesFromDirectory("/", this.getClass().getResource("/repeater.xhtml"));
+ String webappDirectory = System.getProperty("webapp");
+ if (null == webappDirectory) {
+ throw new TestException("The 'webapp' system property does not set");
+ }
+ File webFile = new File(webappDirectory);
+ facesServer.addResourcesFromDirectory("/", webFile);
+ facesServer.addResource("/WEB-INF/faces-config.xml", "test-faces-config.xml");
}
-// @Override
-// protected void setupSunFaces() {
-// }
+ // @Override
+ // protected void setupSunFaces() {
+ // }
/**
* @throws java.lang.Exception
*/
@Test
public void testHelloFacelets() throws Exception {
- WebClient webClient = new LocalWebClient(facesServer,BrowserVersion.FIREFOX_3);
- webClient.setThrowExceptionOnScriptError(true);
- webClient.setAjaxController(new NicelyResynchronizingAjaxController());
+ WebClient webClient = new LocalWebClient(facesServer);
HtmlPage page = webClient.getPage("http://localhost/repeater.jsf");
page.getEnclosingWindow().getThreadManager().joinAll(10000);
-// System.out.println(page.asXml());
- HtmlForm htmlForm = page.getFormByName("ajaxForm");
- HtmlInput htmlInput = htmlForm.getInputByName("ajaxForm:text");
- assertNotNull(htmlForm);
- htmlInput.setValueAttribute("foo");
- htmlInput.click();
-// System.out.println(page.asXml());
+ HtmlInput htmlInput = (HtmlInput) page.getElementById("ajaxForm:text");
+ assertNotNull(htmlInput);
+ htmlInput.type("foo");
+ // System.out.println(page.asXml());
Element element = page.getElementById("ajaxForm:out");
assertEquals("foo", element.getTextContent().trim());
}
15 years, 5 months
JBoss Rich Faces SVN: r11385 - trunk/framework/impl/src/main/javascript/ajaxjsf.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-11-25 18:44:58 -0500 (Tue, 25 Nov 2008)
New Revision: 11385
Modified:
trunk/framework/impl/src/main/javascript/ajaxjsf/queue.js
Log:
https://jira.jboss.org/jira/browse/RF-4961
https://jira.jboss.org/jira/browse/RF-4957
Modified: trunk/framework/impl/src/main/javascript/ajaxjsf/queue.js
===================================================================
--- trunk/framework/impl/src/main/javascript/ajaxjsf/queue.js 2008-11-25 22:24:53 UTC (rev 11384)
+++ trunk/framework/impl/src/main/javascript/ajaxjsf/queue.js 2008-11-25 23:44:58 UTC (rev 11385)
@@ -11,263 +11,279 @@
//queue constructor
A4J.AJAX.EventQueue = function() {
- var Pipeline = function(size, gate, queue) {
- this.size = size || -1;
+ var DROP_NEW = 'dropNew';
+ var DROP_NEXT = 'dropNext';
+ var FIRE_NEW = 'fireNew';
+ var FIRE_NEXT = 'fireNext';
+
+ var extendOptions = function(options) {
+ var opts = {};
- this.gate = gate;
- this.queue = queue;
+ for (var name in options) {
+ opts[name] = options[name];
+ }
- this.items = new Array();
+ for (var name in this.requestOptions) {
+ if (typeof opts[name] == 'undefined') {
+ opts[name] = this.requestOptions[name];
+ }
+ }
+
+ return opts;
};
+
+ var QueueEntry = function() {
+ var ctor = function(queue, query, options, event) {
+ this.queue = queue;
+ this.query = query;
+ this.options = options;
+ this.event = event;
+
+ this.similarityGroupingId = this.options.similarityGroupingId;
+ this.eventsCount = 1;
+ };
- extend(Pipeline.prototype, function() {
-
- return {
- submit: function() {
- var data = this.items.shift();
- if (data) {
- this.createRequest(data);
- }
- },
+ extend(ctor.prototype, {
- createRequest: function(data) {
- LOG.debug("Queue '" + this.queue.name + "' will submit request NOW");
- this.request = data.submit();
- this.similarityGroupingId = data.getSimilarityGroupingId();
- this.request.shouldNotifyQueue = true;
+ isIgnoreDupResponses: function() {
+ return this.options.ignoreDupResponses;
},
- clearRequest: function() {
- this.request = undefined;
- this.similarityGroupingId = undefined;
+ getSimilarityGroupingId: function() {
+ return this.similarityGroupingId;
},
- getSize: function() {
- var size = this.items.length;
+ setSimilarityGroupingId: function(id) {
+ this.similarityGroupingId = id;
+ },
+
+ submit: function() {
+ this.query.appendParameter("AJAX:EVENTS_COUNT", this.eventsCount);
+ this.request = A4J.AJAX.SubmitQuery(this.query, this.options, this.event)
+ var queue = this.queue;
+ this.request.queue = queue;
+
+ return this.request;
+ },
+
+ abort: function() {
if (this.request) {
- size++;
+ this.request.shouldNotifyQueue = false;
+ this.request.abort();
+ this.request = undefined;
}
-
- return size;
},
- dropFirst: function() {
- this.items.shift();
+ onRequestDelayPassed: function() {
+ this.readyToSubmit = true;
+ this.queue.submitFirst();
},
- fireFirst: function() {
- var data = this.items.shift();
- if (data) {
- data.submit()
- }
- },
+ startTimer: function() {
+ var delay = this.options.requestDelay;
+
+ LOG.debug("Queue will wait " + (delay || 0) + "ms before submit");
- addEvent: function(data) {
- if (!this.isFull()) {
- this.items.push(data);
+ if (delay) {
+ var _this = this;
+ this.timer = setTimeout(function() {
+ try {
+ _this.onRequestDelayPassed();
+ } finally {
+ _this.timer = undefined;
+ _this = undefined;
+ }
+ }, delay);
} else {
- //log error
+ this.onRequestDelayPassed();
}
},
- //TODO new good name!
- submitEvent: function() {
- if (!this.request && !this.isEmpty()) {
- this.submit();
+ stopTimer: function() {
+ if (this.timer) {
+ clearTimeout(this.timer);
+ this.timer = undefined;
}
},
- submitNext: function() {
- this.clearRequest();
- LOG.debug("After request: queue '" + this.queue.name + "'");
-
- if (this.getSize() > 0) {
- this.submit();
- } else {
- this.gate.transferIfReady();
- }
+ getEventsCount: function() {
+ return this.eventsCount;
},
- isFull: function() {
- return this.getSize() == this.size;
- },
-
- isEmpty: function() {
- return this.getSize() == 0;
- },
-
- hasNext: function() {
- return this.items.length != 0;
- },
-
- abortCurrentRequest: function() {
- if (this.request) {
- LOG.debug("Current request in queue '" + this.queue.name + "' has been aborted");
-
- this.request.shouldNotifyQueue = false;
- this.request.abort();
- this.clearRequest();
- }
- },
-
- abortDupResponses: function(data) {
- if (!this.hasNext() && data.getSimilarityGroupingId() == this.similarityGroupingId) {
- this.abortCurrentRequest();
- }
+ setEventsCount: function(newCount) {
+ this.eventsCount = newCount;
}
- }
- }());
-
- var Gate = function(queue) {
- this.queue = queue;
+ });
- this.eventsCounter = 0;
+ return ctor;
+ }();
+
+ var Queue = function(name, queueOptions, requestOptions) {
+ this.items = new Array();
+
+ this.name = name;
+ this.queueOptions = queueOptions || {};
+ this.requestOptions = requestOptions || {};
};
+
+ extend(Queue.prototype, {
- extend(Gate.prototype, {
-
- stopRequestDelay: function () {
- if (this.timer) {
- clearTimeout(this.timer);
- this.timer = undefined;
- }
- },
-
- resetRequestDelay: function() {
- this.delayPassed = false;
-
- this.stopRequestDelay();
- this.startRequestDelay();
- },
-
- startRequestDelay: function() {
- var delay = this.data.getRequestDelay();
+ submitFirst: function() {
+ var firstItem = this.items[0];
+ if (firstItem) {
+ if (!firstItem.request) {
+ if (firstItem.readyToSubmit) {
+ LOG.debug("Queue '" + this.name + "' will submit request NOW");
- LOG.debug("Queue will wait " + (delay || 0) + "ms before submit");
-
- if (delay) {
- var _this = this;
- this.timer = setTimeout(function() {
- try {
- _this.transferIfEmpty();
- _this.timer = undefined;
- } finally {
- _this = undefined;
+ var req = firstItem.submit();
+ req.shouldNotifyQueue = true;
+
+ if (this.requestOptions.queueonsubmit) {
+ this.requestOptions.queueonsubmit.call(this, req);
+ }
+ } else {
+ LOG.debug("First item is not ready to be submitted yet");
}
- }, delay);
+ }
} else {
- this.transferIfEmpty();
+ LOG.debug("Queue is empty now");
}
},
- transferIfEmpty: function() {
- this.delayPassed = true;
-
- if (this.pipeline.isEmpty()) {
- this.pipeline.addEvent(this.pop());
- this.pipeline.submitEvent();
- }
+ getQueueSize: function() {
+ return this.queueOptions.size;
},
- transferIfReady: function() {
- if (this.delayPassed) {
- this.pipeline.addEvent(this.pop());
- this.pipeline.submitEvent();
+ getSizeExceededBehavior: function() {
+ var policy = this.queueOptions.sizeExceededBehavior;
+ if (!policy) {
+ policy = DROP_NEXT;
}
+
+ return policy;
},
- pop: function() {
- var data = this.data;
- this.data = undefined;
+ push: function(query, opts, event) {
+ var options = extendOptions.call(this, opts);
- this.eventsCounter = 0;
- this.similarityGroupingId = undefined;
- this.delayPassed = false;
+ var entry = new QueueEntry(this, query, options, event);
+ var similarityGroupingId = entry.getSimilarityGroupingId();
- return data;
- },
+ var lastIdx = this.items.length - 1;
+ var last = this.items[lastIdx];
+ var handled = false;
+
+ if (last) {
+ if (last.getSimilarityGroupingId() == similarityGroupingId) {
+ LOG.debug("Similar request currently in queue '" + this.name + "'");
- push: function() {
- var DROP_NEW = 'dropNew';
- var DROP_NEXT = 'dropNext';
- var FIRE_NEW = 'fireNew';
- var FIRE_NEXT = 'fireNext';
+ if (last.request) {
+ LOG.debug("Request has already beeen sent to server");
+ if (entry.isIgnoreDupResponses()) {
+ LOG.debug("Duplicate responses ignore requested, queue will abort current request");
- return function(data) {
- if (data.isIgnoreDupResponses()) {
- this.pipeline.abortDupResponses(data);
+ last.abort();
+
+ LOG.debug("Current request in queue '" + this.name + "' has been aborted");
+
+ //remove last (that is actually first) from queue - will be safer to do that in LinkedList
+ this.items.shift();
+ }
+ } else {
+ LOG.debug("Combine similar requests and reset timer");
+
+ handled = true;
+ last.stopTimer();
+ entry.setEventsCount(last.getEventsCount() + 1);
+
+ this.items[lastIdx] = entry;
+ entry.startTimer();
+ }
+ } else {
+ LOG.debug("Last queue entry is not the last anymore. Stopping requestDelay timer and marking entry as ready for submission")
+
+ last.stopTimer();
+ last.setSimilarityGroupingId(undefined);
+ last.readyToSubmit = true;
}
-
- var similarityGroupingId = data.getSimilarityGroupingId();
-
- if (this.similarityGroupingId == similarityGroupingId) {
- LOG.debug("Similar request already in queue '" + this.queue.name + "'");
- this.data = data;
- data.setEventsCounter(++this.eventsCounter);
+ }
- this.resetRequestDelay();
- } else {
- LOG.debug("New event added to queue '" + this.queue.name + "'. Queue similarityGroupingId changed to " + similarityGroupingId);
- if (this.data) {
- this.stopRequestDelay();
- this.pipeline.addEvent(this.pop());
+ if (!handled) {
+ if (this.queueOptions.size == this.items.length) {
+ LOG.debug("Queue '" + this.name + "' is currently full")
+
+ var b = this.getSizeExceededBehavior();
+
+ var nextIdx = 0;
+ while (this.items[nextIdx] && this.items[nextIdx].request) {
+ nextIdx++;
}
-
- var newDataHandled = false;
- if (this.pipeline.isFull()) {
- var behavior = data.getSizeExceededBehavior();
+ if (this.queueOptions.onsizeexceeded) {
+ this.queueOptions.onsizeexceeded.call(this, query, opts, event);
+ }
+
+ if (b == DROP_NEW) {
+ LOG.debug("Queue '" + this.name + "' is going to drop new item");
- var queue = this.queue;
- var queueOptions = queue.queueOptions;
-
- if (queueOptions.onsizeexceeded) {
- var query = data.query;
- var options = data.options;
- var event = data.event;
+ handled = true;
+ } else if (b == DROP_NEXT) {
+ LOG.debug("Queue '" + this.name + "' is going to drop [" + nextIdx + "] item that is the next one");
- queueOptions.onsizeexceeded.call(this.queue, query, options, event);
+ var nextEntry = this.items.splice(nextIdx, 1)[0];
+ if (nextEntry) {
+ LOG.debug("Item dropped from queue");
+ nextEntry.stopTimer();
+ } else {
+ LOG.debug("There's no such item, will handle new request instead");
+ handled = true;
}
+ } else if (b == FIRE_NEW) {
+ LOG.debug("Queue '" + this.name + "' will submit new request");
- if (behavior == DROP_NEW ||
- (behavior == DROP_NEXT && !(this.pipeline.hasNext()))) {
-
- newDataHandled = true;
- } else if (behavior == FIRE_NEW ||
- (behavior == FIRE_NEXT && !(this.pipeline.hasNext()))) {
+ entry.submit();
+ handled = true;
+ } else if (b == FIRE_NEXT) {
+ LOG.debug("Queue '" + this.name + "' is going to drop and fire immediately [" + nextIdx + "] item that is the next one");
- data.submit();
- newDataHandled = true;
- } else if (behavior == DROP_NEXT) {
- this.pipeline.dropFirst();
- } else if (behavior == FIRE_NEXT) {
- this.pipeline.fireFirst();
+ var nextEntry = this.items.splice(nextIdx, 1)[0];
+ if (nextEntry) {
+ LOG.debug("Item dropped from queue");
+ nextEntry.stopTimer();
+ nextEntry.submit();
+ } else {
+ LOG.debug("There's no such item, will handle new request instead");
+ entry.submit();
+ handled = true;
}
-
}
-
- this.pipeline.submitEvent();
-
- if (!newDataHandled) {
- this.data = data;
- this.similarityGroupingId = similarityGroupingId;
- this.startRequestDelay();
- }
}
+
+ this.submitFirst();
}
- }()
- });
- return function(name, queueOptions, requestOptions) {
- this.name = name;
- this.queueOptions = queueOptions || {};
- this.requestOptions = requestOptions || {};
-
- this.gate = new Gate(this);
- this.pipeline = new Pipeline(this.queueOptions.size, this.gate, this);
- this.gate.pipeline = this.pipeline;
- };
+ if (!handled) {
+ this.items.push(entry);
+
+ LOG.debug("New request added to queue '" + this.name + "'. Queue similarityGroupingId changed to " + similarityGroupingId);
+
+ entry.startTimer();
+ }
+ },
+
+ pop: function() {
+ LOG.debug("After request: queue '" + this.name + "'");
+
+ this.items.shift();
+
+ LOG.debug("There are " + this.items.length + " requests more in this queue");
+
+ this.submitFirst();
+ }
+ });
+
+ return Queue;
}();
A4J.AJAX.EventQueue.DEFAULT_QUEUE_NAME = "org.richfaces.queue.global";
@@ -317,11 +333,15 @@
var implicitQueueName;
if (queueName) {
+ LOG.debug("Look up queue with name '" + queueName + "'");
+
formQueueName = qualifyName(queueName, formId);
viewQueueName = qualifyNamespace(queueName, namespace);
implicitQueueName = viewQueueName;
} else {
+ LOG.debug("Look up queue with default name");
+
formQueueName = formId;
viewQueueName = qualifyNamespace(A4J.AJAX.EventQueue.DEFAULT_QUEUE_NAME, namespace);
@@ -331,124 +351,26 @@
var queue = A4J.AJAX._eventQueues[formQueueName];
if (!queue) {
queue = A4J.AJAX._eventQueues[viewQueueName];
- if (!queue && implicitQueueName) {
- queue = A4J.AJAX._eventQueues[implicitQueueName];
- if (!queue) {
- LOG.debug("Creating new transient queue '" + implicitQueueName + "' with default settings");
- queue = new A4J.AJAX.EventQueue(implicitQueueName);
- queue._transient = true;
-
- A4J.AJAX.EventQueue.addQueue(queue);
+ if (!queue) {
+ if (implicitQueueName) {
+ queue = A4J.AJAX._eventQueues[implicitQueueName];
+ if (!queue) {
+ LOG.debug("Creating new transient queue '" + implicitQueueName + "' with default settings");
+ queue = new A4J.AJAX.EventQueue(implicitQueueName);
+ queue._transient = true;
+
+ A4J.AJAX.EventQueue.addQueue(queue);
+ } else {
+ LOG.debug("Found transient queue '" + implicitQueueName + "'");
+ }
}
+ } else {
+ LOG.debug("Found view queue '" + viewQueueName + "'");
}
+ } else {
+ LOG.debug("Found form queue '" + formQueueName + "'");
}
return queue;
}
-}();
-
-A4J.AJAX.EventQueue.prototype = function() {
- var EventQueueData = function(queue, query, options, event) {
- this.queue = queue;
- this.query = query;
- this.event = event;
-
- this.options = options || {};
-
- this.eventsCount = 1;
- };
-
- extend(EventQueueData.prototype, {
- submit: function() {
- this.query.appendParameter("AJAX:EVENTS_COUNT", this.eventsCount);
- this.request = A4J.AJAX.SubmitQuery(this.query, this.options, this.event);
-
- var queue = this.queue;
- this.request.queue = queue;
-
- if (this.options.queueonsubmit) {
- this.options.queueonsubmit.call(queue, this.request);
- }
-
- return this.request;
- },
-
- getSimilarityGroupingId: function() {
- return this.options.similarityGroupingId;
- },
-
- getRequestDelay: function() {
- return this.options.requestDelay;
- },
-
- getSizeExceededBehavior: function() {
- return this.queue.getSizeExceededBehavior();
- },
-
- isIgnoreDupResponses: function() {
- return this.options.ignoreDupResponses;
- },
-
- setEventsCounter: function(count) {
- this.eventsCount = count;
- }
- });
-
-
-// LOG.debug("Queue will wait " + (delay || 0) + "ms before submit");
-// LOG.debug("Similar request already in queue '" + this.name + "'");
-
-// LOG.debug("After request: queue '" + this.name + "' is empty now");
-// LOG.debug("Deleting transient queue '" + this.name + "' from queues registry");
-// LOG.debug("After request: queue not empty, processing next event in queue '" + this.name + "'");
-
-// LOG.debug("Queue '" + this.name + "' will submit request NOW");
-// LOG.debug("Delay for request not passed yet, have to wait");
-// LOG.debug("Queue '" + this.name + "' is empty, nothing to submit");
-// LOG.debug("Request in queue '" + this.name + "' is active now, wait until its completion");
-// LOG.debug("New event added to queue '" + this.name + "'. Queue similarityGroupingId changed to " + similarityGroupingId);
-
- var extendOptions = function(options) {
- var opts = {};
-
- for (var name in options) {
- opts[name] = options[name];
- }
-
- for (var name in this.requestOptions) {
- if (typeof opts[name] == 'undefined') {
- opts[name] = this.requestOptions[name];
- }
- }
-
- return opts;
- };
-
- return {
- //TODO separate service functions
-
- getQueueSize: function() {
- return this.queueOptions.size;
- },
-
- getSizeExceededBehavior: function() {
- var policy = this.queueOptions.sizeExceededBehavior;
- if (!policy) {
- policy = 'dropNext';
- }
-
- return policy;
- },
-
- push: function(query, opts, event) {
- var options = extendOptions.call(this, opts);
- var queueData = new EventQueueData(this, query, options, event);
-
- this.gate.push(queueData);
- },
-
- pop: function() {
- this.pipeline.submitNext()
- }
- }
-}();
+}();
\ No newline at end of file
15 years, 5 months
JBoss Rich Faces SVN: r11384 - trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/common.
by richfaces-svn-commits@lists.jboss.org
Author: SergeySmirnov
Date: 2008-11-25 17:24:53 -0500 (Tue, 25 Nov 2008)
New Revision: 11384
Modified:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/common/ComponentNavigator.java
Log:
typo correction
Modified: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/common/ComponentNavigator.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/common/ComponentNavigator.java 2008-11-25 22:19:08 UTC (rev 11383)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/common/ComponentNavigator.java 2008-11-25 22:24:53 UTC (rev 11384)
@@ -200,7 +200,7 @@
List temp = new ArrayList();
try {
InputStream is = this.getClass().getClassLoader().getResourceAsStream(
- "/com/exadel/demo/common/components.properties");
+ "/org/richfaces/demo/common/components.properties");
props.load(is);
} catch (Exception e) {
throw new FacesException(e);
15 years, 5 months
JBoss Rich Faces SVN: r11383 - trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/common.
by richfaces-svn-commits@lists.jboss.org
Author: SergeySmirnov
Date: 2008-11-25 17:19:08 -0500 (Tue, 25 Nov 2008)
New Revision: 11383
Modified:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/common/ComponentNavigator.java
Log:
typo correction
Modified: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/common/ComponentNavigator.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/common/ComponentNavigator.java 2008-11-25 20:41:42 UTC (rev 11382)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/common/ComponentNavigator.java 2008-11-25 22:19:08 UTC (rev 11383)
@@ -200,7 +200,7 @@
List temp = new ArrayList();
try {
InputStream is = this.getClass().getClassLoader().getResourceAsStream(
- "/org/richfaces/demo/common/components.properties");
+ "/com/exadel/demo/common/components.properties");
props.load(is);
} catch (Exception e) {
throw new FacesException(e);
15 years, 5 months
JBoss Rich Faces SVN: r11382 - in trunk/ui/core/src/test: resources/org/ajax4jsf/component and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-11-25 15:41:42 -0500 (Tue, 25 Nov 2008)
New Revision: 11382
Added:
trunk/ui/core/src/test/java/org/ajax4jsf/component/QueuedPollTest.java
trunk/ui/core/src/test/resources/org/ajax4jsf/component/queue-poll.xhtml
Modified:
trunk/ui/core/src/test/resources/org/ajax4jsf/component/simulation.js
Log:
https://jira.jboss.org/jira/browse/RF-5015
Added: trunk/ui/core/src/test/java/org/ajax4jsf/component/QueuedPollTest.java
===================================================================
--- trunk/ui/core/src/test/java/org/ajax4jsf/component/QueuedPollTest.java (rev 0)
+++ trunk/ui/core/src/test/java/org/ajax4jsf/component/QueuedPollTest.java 2008-11-25 20:41:42 UTC (rev 11382)
@@ -0,0 +1,112 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * 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.ajax4jsf.component;
+
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * @author Nick Belaevski
+ * @since 3.3.0
+ */
+
+public class QueuedPollTest extends AbstractQueueComponentTest {
+
+ /**
+ * @param name
+ */
+ public QueuedPollTest(String name) {
+ super(name);
+ }
+
+ private void setFlag(String name) {
+ Map<String, Object> requestMap = facesContext.getExternalContext().getRequestMap();
+ requestMap.put(name, Boolean.TRUE);
+ }
+
+ public void testQueuedDefaultPollRequestDelay() throws Exception {
+ setFlag("queuedDefaultPollEnabled");
+ renderView("/queue-poll.xhtml");
+
+ TestsResult result = getTestsResult();
+ List<RequestData> dataList = result.getDataList();
+
+ assertEquals(1, dataList.size());
+ checkRequestData(dataList.get(0), null, 600, 1600, false);
+ }
+
+ public void testQueuedPollRequestDelay() throws Exception {
+ setFlag("queuedDelayedPollEnabled");
+ renderView("/queue-poll.xhtml");
+
+ TestsResult result = getTestsResult();
+ List<RequestData> dataList = result.getDataList();
+
+ assertEquals(1, dataList.size());
+ checkRequestData(dataList.get(0), null, 300, 1300, false);
+ }
+
+ public void testDelayedQueueDefaultPollRequestDelay() throws Exception {
+ setFlag("delayedQueueDefaultPollEnabled");
+ renderView("/queue-poll.xhtml");
+
+ TestsResult result = getTestsResult();
+ List<RequestData> dataList = result.getDataList();
+
+ assertEquals(1, dataList.size());
+ checkRequestData(dataList.get(0), null, 1500, 2500, false);
+ }
+
+ public void testDelayedQueuePollRequestDelay() throws Exception {
+ setFlag("delayedQueueDelayedPollEnabled");
+ renderView("/queue-poll.xhtml");
+
+ TestsResult result = getTestsResult();
+ List<RequestData> dataList = result.getDataList();
+
+ assertEquals(1, dataList.size());
+ checkRequestData(dataList.get(0), null, 2400, 3400, false);
+ }
+
+ public void testUnqueuedDefaultPollRequestDelay() throws Exception {
+ setFlag("unqueuedDefaultPollEnabled");
+ renderView("/queue-poll.xhtml");
+
+ TestsResult result = getTestsResult();
+ List<RequestData> dataList = result.getDataList();
+
+ assertEquals(1, dataList.size());
+ checkRequestData(dataList.get(0), null, 700, 1700, false);
+ }
+
+ public void testunQueuedPollRequestDelay() throws Exception {
+ setFlag("unqueuedDelayedPollEnabled");
+ renderView("/queue-poll.xhtml");
+
+ TestsResult result = getTestsResult();
+ List<RequestData> dataList = result.getDataList();
+
+ assertEquals(1, dataList.size());
+ checkRequestData(dataList.get(0), null, 950, 1950, false);
+ }
+}
Added: trunk/ui/core/src/test/resources/org/ajax4jsf/component/queue-poll.xhtml
===================================================================
--- trunk/ui/core/src/test/resources/org/ajax4jsf/component/queue-poll.xhtml (rev 0)
+++ trunk/ui/core/src/test/resources/org/ajax4jsf/component/queue-poll.xhtml 2008-11-25 20:41:42 UTC (rev 11382)
@@ -0,0 +1,29 @@
+<html
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:a4j="http://richfaces.org/a4j">
+ <body>
+ <f:view>
+
+ <h:form>
+ <a4j:queue />
+
+ <a4j:poll id="queuedDefaultPoll" enabled="#{queuedDefaultPollEnabled}" interval="600" />
+ <a4j:poll id="queuedDelayedPoll" enabled="#{queuedDelayedPollEnabled}" interval="200" requestDelay="100" />
+ </h:form>
+
+ <h:form>
+ <a4j:queue requestDelay="10000" />
+
+ <a4j:poll id="delayedQueueDefaultPoll" enabled="#{delayedQueueDefaultPollEnabled}" interval="1500" />
+ <a4j:poll id="delayedQueueDelayedPoll" enabled="#{delayedQueueDelayedPollEnabled}" interval="2000" requestDelay="400" />
+ </h:form>
+
+ <h:form>
+ <a4j:poll id="unqueuedDefaultPoll" enabled="#{unqueuedDefaultPollEnabled}" interval="700" />
+ <a4j:poll id="unqueuedDelayedPoll" enabled="#{unqueuedDelayedPollEnabled}" interval="900" requestDelay="50" />
+ </h:form>
+ </f:view>
+ </body>
+</html>
Modified: trunk/ui/core/src/test/resources/org/ajax4jsf/component/simulation.js
===================================================================
--- trunk/ui/core/src/test/resources/org/ajax4jsf/component/simulation.js 2008-11-25 20:40:04 UTC (rev 11381)
+++ trunk/ui/core/src/test/resources/org/ajax4jsf/component/simulation.js 2008-11-25 20:41:42 UTC (rev 11382)
@@ -44,6 +44,7 @@
execute: function() {
while (this.events.length > 0) {
+
var eventData = this.events.shift();
this.currentTime = eventData.eventTime;
@@ -198,7 +199,7 @@
A4J.AJAX.SubmitQuery = function(query, options, event) {
var defaultRequestTime = XMLHttpRequest.defaultRequestTime;
if (typeof defaultRequestTime == "function") {
- defaultRequestTime = defaultRequestTime(event);
+ defaultRequestTime = defaultRequestTime(query, options, event);
}
XMLHttpRequest.requestTime = options.requestTime || defaultRequestTime || DEFAULT_REQUEST_TIME;
15 years, 5 months
JBoss Rich Faces SVN: r11381 - trunk/framework/impl/src/main/javascript/ajaxjsf.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-11-25 15:40:04 -0500 (Tue, 25 Nov 2008)
New Revision: 11381
Modified:
trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js
Log:
https://jira.jboss.org/jira/browse/RF-5015
Modified: trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js
===================================================================
--- trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js 2008-11-25 19:18:55 UTC (rev 11380)
+++ trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js 2008-11-25 20:40:04 UTC (rev 11381)
@@ -591,6 +591,12 @@
A4J.AJAX._headTransformers.push(listener);
};
+A4J.AJAX.SetZeroRequestDelay = function(options) {
+ if (typeof options.requestDelay == "undefined") {
+ options.requestDelay = 0;
+ }
+};
+
// pollers timerId's
A4J.AJAX._pollers = {};
/*
@@ -608,6 +614,9 @@
A4J.AJAX.Poll(containerId,form,options);
};
}
+
+ A4J.AJAX.SetZeroRequestDelay(options);
+
A4J.AJAX._pollers[options.pollId] = window.setTimeout(function(){
A4J.AJAX._pollers[options.pollId]=undefined;
if((typeof(options.onsubmit) == 'function') && (options.onsubmit()==false)){
@@ -643,7 +652,8 @@
try {
if(request.status == 200){
if(request.getResponseHeader("Ajax-Push-Status")=="READY"){
- A4J.AJAX.Submit(containerId,form||options.dummyForm,null,options);
+ A4J.AJAX.SetZeroRequestDelay(options);
+ A4J.AJAX.Submit(containerId,form||options.dummyForm,null,options);
}
}
} catch(e){
15 years, 5 months