Author: Alex.Kolonitsky
Date: 2011-03-12 09:09:15 -0500 (Sat, 12 Mar 2011)
New Revision: 22183
Added:
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/CollapsibleSubTableToggleEvent.java
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/CollapsibleSubTableToggleListener.java
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/DataScrollEvent.java
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/DataScrollListener.java
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/DataScrollSource.java
Removed:
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/DataScrollerEvent.java
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/DataScrollerListener.java
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/DataScrollerSource.java
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/PagingEvent.java
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/PagingListener.java
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/ToggleEvent.java
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/ToggleListener.java
branches/4.0.X/ui/validator/api/src/main/java/org/richfaces/event/
Modified:
branches/4.0.X/examples/iteration-demo/src/main/java/org/richfaces/demo/SelectionChangeActionListenerImpl.java
branches/4.0.X/examples/iteration-demo/src/main/java/org/richfaces/demo/TreeBean.java
branches/4.0.X/examples/iteration-demo/src/main/java/org/richfaces/demo/model/Employee.java
branches/4.0.X/examples/iteration-demo/src/main/webapp/dataTable.xhtml
branches/4.0.X/examples/misc-demo/src/main/webapp/pages/componentControl.xhtml
branches/4.0.X/ui/input/api/src/main/java/org/richfaces/event/FileUploadEvent.java
branches/4.0.X/ui/input/api/src/main/java/org/richfaces/event/FileUploadListener.java
branches/4.0.X/ui/input/ui/src/main/java/org/richfaces/view/facelets/FileUploadHandler.java
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/component/Expandable.java
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/TreeSelectionChangeEvent.java
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/TreeSelectionChangeListener.java
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/TreeToggleEvent.java
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/TreeToggleListener.java
branches/4.0.X/ui/iteration/ui/src/main/config/faces-config.xml
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractCollapsibleSubTable.java
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractDataScroller.java
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/event/MethodExpressionTreeSelectionChangeListener.java
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/event/MethodExpressionTreeToggleListener.java
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/renderkit/CollapsibleSubTableRenderer.java
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataScrollerBaseRenderer.java
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/taglib/CollapsibleSubTableHandler.java
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/taglib/DataScrollerHandler.java
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/taglib/MethodExpressionScrollListener.java
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/taglib/MethodExpressionToggleListener.java
branches/4.0.X/ui/iteration/ui/src/main/resources/META-INF/cdk/attributes/tree-serverEventListeners-props.xml
Log:
RF-10712 Refactoring Listeners classes, methods and Event names according to standard JSF
convention. [WAS processUpload vs. processFileUpload - naming conventions]
- reviewed by Gleb Galkin
Modified:
branches/4.0.X/examples/iteration-demo/src/main/java/org/richfaces/demo/SelectionChangeActionListenerImpl.java
===================================================================
---
branches/4.0.X/examples/iteration-demo/src/main/java/org/richfaces/demo/SelectionChangeActionListenerImpl.java 2011-03-12
14:03:44 UTC (rev 22182)
+++
branches/4.0.X/examples/iteration-demo/src/main/java/org/richfaces/demo/SelectionChangeActionListenerImpl.java 2011-03-12
14:09:15 UTC (rev 22183)
@@ -11,7 +11,7 @@
*/
public class SelectionChangeActionListenerImpl implements TreeSelectionChangeListener {
- public void processSelectionChange(TreeSelectionChangeEvent event) throws
AbortProcessingException {
+ public void processTreeSelectionChange(TreeSelectionChangeEvent event) throws
AbortProcessingException {
System.out.println("Inside Selection Change Action");
}
}
Modified:
branches/4.0.X/examples/iteration-demo/src/main/java/org/richfaces/demo/TreeBean.java
===================================================================
---
branches/4.0.X/examples/iteration-demo/src/main/java/org/richfaces/demo/TreeBean.java 2011-03-12
14:03:44 UTC (rev 22182)
+++
branches/4.0.X/examples/iteration-demo/src/main/java/org/richfaces/demo/TreeBean.java 2011-03-12
14:09:15 UTC (rev 22183)
@@ -77,7 +77,7 @@
this.fromExpression = fromExpression;
}
- public void processSelectionChange(TreeSelectionChangeEvent event) throws
AbortProcessingException {
+ public void processTreeSelectionChange(TreeSelectionChangeEvent event) throws
AbortProcessingException {
FacesContext facesContext = FacesContext.getCurrentInstance();
facesContext.addMessage(getTree(event).getClientId(facesContext),
createEventMessage(event, fromExpression));
@@ -97,7 +97,7 @@
this.fromExpression = fromExpression;
}
- public void processToggle(TreeToggleEvent event) throws AbortProcessingException
{
+ public void processTreeToggle(TreeToggleEvent event) throws
AbortProcessingException {
FacesContext facesContext = FacesContext.getCurrentInstance();
facesContext.addMessage(getTree(event).getClientId(facesContext),
createEventMessage(event, fromExpression));
}
@@ -266,11 +266,11 @@
}
public void processSelectionChange(TreeSelectionChangeEvent event) {
- new SelectionChangeHandler(true).processSelectionChange(event);
+ new SelectionChangeHandler(true).processTreeSelectionChange(event);
}
public void processToggle(TreeToggleEvent event) {
- new ToggleHandler(true).processToggle(event);
+ new ToggleHandler(true).processTreeToggle(event);
}
public String getToggleNodeEvent() {
Modified:
branches/4.0.X/examples/iteration-demo/src/main/java/org/richfaces/demo/model/Employee.java
===================================================================
---
branches/4.0.X/examples/iteration-demo/src/main/java/org/richfaces/demo/model/Employee.java 2011-03-12
14:03:44 UTC (rev 22182)
+++
branches/4.0.X/examples/iteration-demo/src/main/java/org/richfaces/demo/model/Employee.java 2011-03-12
14:09:15 UTC (rev 22183)
@@ -4,7 +4,7 @@
import java.util.List;
import java.util.Random;
-import org.richfaces.event.ToggleEvent;
+import org.richfaces.event.CollapsibleSubTableToggleEvent;
public class Employee {
@@ -100,7 +100,7 @@
return hash;
}
- public void toggle(ToggleEvent event) {
+ public void toggle(CollapsibleSubTableToggleEvent event) {
this.expand = event.isExpanded();
}
Modified: branches/4.0.X/examples/iteration-demo/src/main/webapp/dataTable.xhtml
===================================================================
--- branches/4.0.X/examples/iteration-demo/src/main/webapp/dataTable.xhtml 2011-03-12
14:03:44 UTC (rev 22182)
+++ branches/4.0.X/examples/iteration-demo/src/main/webapp/dataTable.xhtml 2011-03-12
14:09:15 UTC (rev 22183)
@@ -18,7 +18,8 @@
<it:dataScroller id="scroller1" for="richTable"
page="#{dataBean.page}" maxPages="7"></it:dataScroller>
<it:dataTable keepSaved="true" id="richTable"
var="record" rowKeyVar="rowKey"
value="#{dataBean.employeeList}"
- rows="20" sortMode="single">
+ rows="20" sortMode="single"
rowClass='#{record}'
+ cellClass="cellClQwerty"
firstRowClass="firstRowClass123">
<f:facet name="caption">
<h:outputText id="captioFacet1" value="Caption
Facet"/>
</f:facet>
@@ -60,7 +61,7 @@
<it:collapsibleSubTable id="collapsibleSubTable"
var="company"
value="#{record.companies}"
rows="1" switchType="ajax"
- expanded="true">
+ expanded="true"
rowClass="#{company}">
<f:facet name="header">
<it:dataScroller id="subscroller"
for="collapsibleSubTable"
maxPages="3"></it:dataScroller>
Modified: branches/4.0.X/examples/misc-demo/src/main/webapp/pages/componentControl.xhtml
===================================================================
---
branches/4.0.X/examples/misc-demo/src/main/webapp/pages/componentControl.xhtml 2011-03-12
14:03:44 UTC (rev 22182)
+++
branches/4.0.X/examples/misc-demo/src/main/webapp/pages/componentControl.xhtml 2011-03-12
14:09:15 UTC (rev 22183)
@@ -9,16 +9,7 @@
<h:head></h:head>
<h:body>
<h:form>
- <input:autocomplete id="myInput" value="aaaaaa"/>
- <h:commandButton value="getValue">
- <misc:componentControl target="myInput" operation="getValue"
event="click"/>
- </h:commandButton>
- <h:commandButton value="setValue">
- <misc:componentControl target="myInput" operation="setValue"
- event="click"
onbeforeoperation="alert(event.type+': cancel operation');return
false;">
- <f:param value="bla-bla-bla" />
- </misc:componentControl>
- </h:commandButton>
+ <h:inputText value="${not true}"/>
</h:form>
</h:body>
</f:view>
Modified:
branches/4.0.X/ui/input/api/src/main/java/org/richfaces/event/FileUploadEvent.java
===================================================================
---
branches/4.0.X/ui/input/api/src/main/java/org/richfaces/event/FileUploadEvent.java 2011-03-12
14:03:44 UTC (rev 22182)
+++
branches/4.0.X/ui/input/api/src/main/java/org/richfaces/event/FileUploadEvent.java 2011-03-12
14:09:15 UTC (rev 22183)
@@ -46,7 +46,7 @@
}
public void processListener(FacesListener listener) {
- ((FileUploadListener) listener).processUpload(this);
+ ((FileUploadListener) listener).processFileUpload(this);
}
public UploadedFile getUploadedFile() {
Modified:
branches/4.0.X/ui/input/api/src/main/java/org/richfaces/event/FileUploadListener.java
===================================================================
---
branches/4.0.X/ui/input/api/src/main/java/org/richfaces/event/FileUploadListener.java 2011-03-12
14:03:44 UTC (rev 22182)
+++
branches/4.0.X/ui/input/api/src/main/java/org/richfaces/event/FileUploadListener.java 2011-03-12
14:09:15 UTC (rev 22183)
@@ -25,5 +25,5 @@
public interface FileUploadListener extends FacesListener {
- public void processUpload(FileUploadEvent event);
+ public void processFileUpload(FileUploadEvent event);
}
Modified:
branches/4.0.X/ui/input/ui/src/main/java/org/richfaces/view/facelets/FileUploadHandler.java
===================================================================
---
branches/4.0.X/ui/input/ui/src/main/java/org/richfaces/view/facelets/FileUploadHandler.java 2011-03-12
14:03:44 UTC (rev 22182)
+++
branches/4.0.X/ui/input/ui/src/main/java/org/richfaces/view/facelets/FileUploadHandler.java 2011-03-12
14:09:15 UTC (rev 22183)
@@ -53,7 +53,7 @@
super(expression);
}
- public void processUpload(FileUploadEvent event) throws AbortProcessingException
{
+ public void processFileUpload(FileUploadEvent event) throws
AbortProcessingException {
processEvent(event);
}
}
Modified:
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/component/Expandable.java
===================================================================
---
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/component/Expandable.java 2011-03-12
14:03:44 UTC (rev 22182)
+++
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/component/Expandable.java 2011-03-12
14:09:15 UTC (rev 22183)
@@ -23,7 +23,7 @@
package org.richfaces.component;
-import org.richfaces.event.ToggleListener;
+import org.richfaces.event.CollapsibleSubTableToggleListener;
public interface Expandable {
@@ -31,9 +31,9 @@
public void setExpanded(boolean expand);
- public void addToggleListener(ToggleListener listener);
+ public void addCollapsibleSubTableToggleListener(CollapsibleSubTableToggleListener
listener);
- public void removeToggleListener(ToggleListener listener);
+ public void removeCollapsibleSubTableToggleListener(CollapsibleSubTableToggleListener
listener);
- public ToggleListener[] getToggleListeners();
+ public CollapsibleSubTableToggleListener[] getCollapsibleSubTableToggleListener();
}
Copied:
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/CollapsibleSubTableToggleEvent.java
(from rev 22177,
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/ToggleEvent.java)
===================================================================
---
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/CollapsibleSubTableToggleEvent.java
(rev 0)
+++
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/CollapsibleSubTableToggleEvent.java 2011-03-12
14:09:15 UTC (rev 22183)
@@ -0,0 +1,72 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.richfaces.event;
+
+import javax.faces.component.UIComponent;
+import javax.faces.event.FacesEvent;
+import javax.faces.event.FacesListener;
+
+/**
+ * @author Anton Belevich
+ *
+ */
+public class CollapsibleSubTableToggleEvent extends FacesEvent {
+
+ private static final long serialVersionUID = 2916560585918250885L;
+
+ private String togglerId;
+
+ private boolean expanded;
+
+
+
+ public CollapsibleSubTableToggleEvent(UIComponent source, boolean expanded) {
+ this(source, expanded, null);
+ }
+
+ public CollapsibleSubTableToggleEvent(UIComponent source, boolean expanded, String
toggerId) {
+ super(source);
+ this.expanded = expanded;
+ this.togglerId = toggerId;
+ }
+
+ public String getTogglerId() {
+ return togglerId;
+ }
+
+ public void setTogglerId(String togglerId) {
+ this.togglerId = togglerId;
+ }
+
+ public boolean isExpanded() {
+ return this.expanded;
+ }
+
+ public boolean isAppropriateListener(FacesListener listener) {
+ return (listener instanceof CollapsibleSubTableToggleListener);
+ }
+
+ public void processListener(FacesListener listener) {
+ ((CollapsibleSubTableToggleListener)
listener).processCollapsibleSubTableToggle(this);
+ }
+}
Copied:
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/CollapsibleSubTableToggleListener.java
(from rev 22177,
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/ToggleListener.java)
===================================================================
---
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/CollapsibleSubTableToggleListener.java
(rev 0)
+++
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/CollapsibleSubTableToggleListener.java 2011-03-12
14:09:15 UTC (rev 22183)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.richfaces.event;
+
+import javax.faces.event.FacesListener;
+
+/**
+ * @author Anton Belevich
+ *
+ */
+public interface CollapsibleSubTableToggleListener extends FacesListener {
+
+ public void processCollapsibleSubTableToggle(CollapsibleSubTableToggleEvent event);
+
+}
Copied:
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/DataScrollEvent.java
(from rev 22177,
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/DataScrollerEvent.java)
===================================================================
---
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/DataScrollEvent.java
(rev 0)
+++
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/DataScrollEvent.java 2011-03-12
14:09:15 UTC (rev 22183)
@@ -0,0 +1,94 @@
+/**
+ * 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.richfaces.event;
+
+import javax.faces.component.UIComponent;
+import javax.faces.event.ActionEvent;
+import javax.faces.event.FacesListener;
+
+/**
+ * @author Wesley Hales
+ */
+public class DataScrollEvent extends ActionEvent {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 2657353903701932561L;
+ private String oldScrolVal;
+ private String newScrolVal;
+ private int page;
+
+ /**
+ * Creates a new ScrollerEvent.
+ *
+ * @param component
+ * the source of the event
+ * @param thisOldScrolVal
+ * the previously showing item identifier
+ * @param thisNewScrolVal
+ * the currently showing item identifier
+ */
+ public DataScrollEvent(UIComponent component, String thisOldScrolVal, String
thisNewScrolVal, int page) {
+ super(component);
+ oldScrolVal = thisOldScrolVal;
+ newScrolVal = thisNewScrolVal;
+ this.page = page;
+ }
+
+ public String getOldScrolVal() {
+ return oldScrolVal;
+ }
+
+ public String getNewScrolVal() {
+ return newScrolVal;
+ }
+
+ /**
+ * @since 3.2
+ * @return new page or <code>-1</code> if not applicable
+ */
+ public int getPage() {
+ return page;
+ }
+
+ public boolean isAppropriateListener(FacesListener listener) {
+ return super.isAppropriateListener(listener) || (listener instanceof
DataScrollListener);
+ }
+
+ /**
+ * Delivers this event to the SliderListener.
+ *
+ * @param listener
+ * the slider listener
+ */
+ public void processListener(FacesListener listener) {
+ if (listener instanceof DataScrollListener) {
+ DataScrollListener dataScrollerListener = (DataScrollListener) listener;
+ dataScrollerListener.processDataScroll(this);
+ }
+
+ if (super.isAppropriateListener(listener)) {
+ super.processListener(listener);
+ }
+ }
+}
Copied:
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/DataScrollListener.java
(from rev 22177,
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/DataScrollerListener.java)
===================================================================
---
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/DataScrollListener.java
(rev 0)
+++
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/DataScrollListener.java 2011-03-12
14:09:15 UTC (rev 22183)
@@ -0,0 +1,30 @@
+/**
+ * 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.richfaces.event;
+
+import javax.faces.event.FacesListener;
+
+public interface DataScrollListener extends FacesListener {
+
+ public void processDataScroll(org.richfaces.event.DataScrollEvent event);
+
+}
Copied:
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/DataScrollSource.java
(from rev 22177,
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/DataScrollerSource.java)
===================================================================
---
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/DataScrollSource.java
(rev 0)
+++
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/DataScrollSource.java 2011-03-12
14:09:15 UTC (rev 22183)
@@ -0,0 +1,48 @@
+/**
+ * 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.richfaces.event;
+
+public interface DataScrollSource {
+
+ /**
+ * Adds a DataScrollListener to this DataScrollSource.
+ *
+ * @param listener
+ * the Scroll listener to be added
+ */
+ public void addScrollListener(org.richfaces.event.DataScrollListener listener);
+
+ /**
+ * Removes a DataFilterSliderListener from this DataScrollSource.
+ *
+ * @param listener the Scroll listener to be removed
+ */
+ public void removeScrollListener(DataScrollListener listener);
+
+ /**
+ * Returns all ScrollListeners for this DataScrollSource.
+ *
+ * @return the Scroll listener array
+ */
+ public DataScrollListener[] getScrollListeners();
+
+}
Deleted:
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/DataScrollerEvent.java
===================================================================
---
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/DataScrollerEvent.java 2011-03-12
14:03:44 UTC (rev 22182)
+++
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/DataScrollerEvent.java 2011-03-12
14:09:15 UTC (rev 22183)
@@ -1,94 +0,0 @@
-/**
- * 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.richfaces.event;
-
-import javax.faces.component.UIComponent;
-import javax.faces.event.ActionEvent;
-import javax.faces.event.FacesListener;
-
-/**
- * @author Wesley Hales
- */
-public class DataScrollerEvent extends ActionEvent {
-
- /**
- *
- */
- private static final long serialVersionUID = 2657353903701932561L;
- private String oldScrolVal;
- private String newScrolVal;
- private int page;
-
- /**
- * Creates a new ScrollerEvent.
- *
- * @param component
- * the source of the event
- * @param thisOldScrolVal
- * the previously showing item identifier
- * @param thisNewScrolVal
- * the currently showing item identifier
- */
- public DataScrollerEvent(UIComponent component, String thisOldScrolVal, String
thisNewScrolVal, int page) {
- super(component);
- oldScrolVal = thisOldScrolVal;
- newScrolVal = thisNewScrolVal;
- this.page = page;
- }
-
- public String getOldScrolVal() {
- return oldScrolVal;
- }
-
- public String getNewScrolVal() {
- return newScrolVal;
- }
-
- /**
- * @since 3.2
- * @return new page or <code>-1</code> if not applicable
- */
- public int getPage() {
- return page;
- }
-
- public boolean isAppropriateListener(FacesListener listener) {
- return super.isAppropriateListener(listener) || (listener instanceof
DataScrollerListener);
- }
-
- /**
- * Delivers this event to the SliderListener.
- *
- * @param listener
- * the slider listener
- */
- public void processListener(FacesListener listener) {
- if (listener instanceof DataScrollerListener) {
- DataScrollerListener dataScrollerListener = (DataScrollerListener) listener;
- dataScrollerListener.processScroller(this);
- }
-
- if (super.isAppropriateListener(listener)) {
- super.processListener(listener);
- }
- }
-}
Deleted:
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/DataScrollerListener.java
===================================================================
---
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/DataScrollerListener.java 2011-03-12
14:03:44 UTC (rev 22182)
+++
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/DataScrollerListener.java 2011-03-12
14:09:15 UTC (rev 22183)
@@ -1,30 +0,0 @@
-/**
- * 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.richfaces.event;
-
-import javax.faces.event.FacesListener;
-
-public interface DataScrollerListener extends FacesListener {
-
- public void processScroller(org.richfaces.event.DataScrollerEvent event);
-
-}
Deleted:
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/DataScrollerSource.java
===================================================================
---
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/DataScrollerSource.java 2011-03-12
14:03:44 UTC (rev 22182)
+++
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/DataScrollerSource.java 2011-03-12
14:09:15 UTC (rev 22183)
@@ -1,48 +0,0 @@
-/**
- * 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.richfaces.event;
-
-public interface DataScrollerSource {
-
- /**
- * Adds a DataScrollerListener to this DataScrollerSource.
- *
- * @param listener
- * the Scroler listener to be added
- */
- public void addScrollerListener(org.richfaces.event.DataScrollerListener listener);
-
- /**
- * Removes a DataFilterSliderListener from this DataScrollerSourceSource.
- *
- * @param listener the Scroler listener to be removed
- */
- public void removeScrollerListener(DataScrollerListener listener);
-
- /**
- * Returns all ScrollerListeners for this DataScrollerSource.
- *
- * @return the Scroler listener array
- */
- public DataScrollerListener[] getScrollerListeners();
-
-}
Deleted:
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/PagingEvent.java
===================================================================
---
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/PagingEvent.java 2011-03-12
14:03:44 UTC (rev 22182)
+++
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/PagingEvent.java 2011-03-12
14:09:15 UTC (rev 22183)
@@ -1,44 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright ${year}, Red Hat, Inc. and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-
-package org.richfaces.event;
-
-import javax.faces.component.UIComponent;
-import javax.faces.event.FacesEvent;
-import javax.faces.event.FacesListener;
-
-public class PagingEvent extends FacesEvent {
-
- private static final long serialVersionUID = -8176111805839316345L;
-
- public PagingEvent(UIComponent component) {
- super(component);
- }
-
- public boolean isAppropriateListener(FacesListener listener) {
- return listener instanceof PagingListener;
- }
-
- public void processListener(FacesListener listener) {
- ((PagingListener) listener).processPaging(this);
- }
-}
Deleted:
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/PagingListener.java
===================================================================
---
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/PagingListener.java 2011-03-12
14:03:44 UTC (rev 22182)
+++
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/PagingListener.java 2011-03-12
14:09:15 UTC (rev 22183)
@@ -1,31 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright ${year}, Red Hat, Inc. and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-
-package org.richfaces.event;
-
-import javax.faces.event.FacesListener;
-
-public interface PagingListener extends FacesListener {
-
- public void processPaging(PagingEvent event);
-
-}
Deleted:
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/ToggleEvent.java
===================================================================
---
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/ToggleEvent.java 2011-03-12
14:03:44 UTC (rev 22182)
+++
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/ToggleEvent.java 2011-03-12
14:09:15 UTC (rev 22183)
@@ -1,72 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright ${year}, Red Hat, Inc. and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-
-package org.richfaces.event;
-
-import javax.faces.component.UIComponent;
-import javax.faces.event.FacesEvent;
-import javax.faces.event.FacesListener;
-
-/**
- * @author Anton Belevich
- *
- */
-public class ToggleEvent extends FacesEvent {
-
- private static final long serialVersionUID = 2916560585918250885L;
-
- private String togglerId;
-
- private boolean expanded;
-
-
-
- public ToggleEvent(UIComponent source, boolean expanded) {
- this(source, expanded, null);
- }
-
- public ToggleEvent(UIComponent source, boolean expanded, String toggerId) {
- super(source);
- this.expanded = expanded;
- this.togglerId = toggerId;
- }
-
- public String getTogglerId() {
- return togglerId;
- }
-
- public void setTogglerId(String togglerId) {
- this.togglerId = togglerId;
- }
-
- public boolean isExpanded() {
- return this.expanded;
- }
-
- public boolean isAppropriateListener(FacesListener listener) {
- return (listener instanceof ToggleListener);
- }
-
- public void processListener(FacesListener listener) {
- ((ToggleListener) listener).processToggle(this);
- }
-}
Deleted:
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/ToggleListener.java
===================================================================
---
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/ToggleListener.java 2011-03-12
14:03:44 UTC (rev 22182)
+++
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/ToggleListener.java 2011-03-12
14:09:15 UTC (rev 22183)
@@ -1,35 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright ${year}, Red Hat, Inc. and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-
-package org.richfaces.event;
-
-import javax.faces.event.FacesListener;
-
-/**
- * @author Anton Belevich
- *
- */
-public interface ToggleListener extends FacesListener {
-
- public void processToggle(ToggleEvent event);
-
-}
Modified:
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/TreeSelectionChangeEvent.java
===================================================================
---
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/TreeSelectionChangeEvent.java 2011-03-12
14:03:44 UTC (rev 22182)
+++
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/TreeSelectionChangeEvent.java 2011-03-12
14:09:15 UTC (rev 22183)
@@ -53,7 +53,7 @@
@Override
public void processListener(FacesListener listener) {
- ((TreeSelectionChangeListener) listener).processSelectionChange(this);
+ ((TreeSelectionChangeListener) listener).processTreeSelectionChange(this);
}
public Collection<Object> getOldSelection() {
Modified:
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/TreeSelectionChangeListener.java
===================================================================
---
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/TreeSelectionChangeListener.java 2011-03-12
14:03:44 UTC (rev 22182)
+++
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/TreeSelectionChangeListener.java 2011-03-12
14:09:15 UTC (rev 22183)
@@ -30,6 +30,6 @@
*/
public interface TreeSelectionChangeListener extends FacesListener {
- public void processSelectionChange(TreeSelectionChangeEvent event) throws
AbortProcessingException;
+ public void processTreeSelectionChange(TreeSelectionChangeEvent event) throws
AbortProcessingException;
}
Modified:
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/TreeToggleEvent.java
===================================================================
---
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/TreeToggleEvent.java 2011-03-12
14:03:44 UTC (rev 22182)
+++
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/TreeToggleEvent.java 2011-03-12
14:09:15 UTC (rev 22183)
@@ -56,7 +56,7 @@
@Override
public void processListener(FacesListener listener) {
- ((TreeToggleListener) listener).processToggle(this);
+ ((TreeToggleListener) listener).processTreeToggle(this);
}
}
Modified:
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/TreeToggleListener.java
===================================================================
---
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/TreeToggleListener.java 2011-03-12
14:03:44 UTC (rev 22182)
+++
branches/4.0.X/ui/iteration/api/src/main/java/org/richfaces/event/TreeToggleListener.java 2011-03-12
14:09:15 UTC (rev 22183)
@@ -30,6 +30,6 @@
*/
public interface TreeToggleListener extends FacesListener {
- public void processToggle(TreeToggleEvent event) throws AbortProcessingException;
+ public void processTreeToggle(TreeToggleEvent event) throws
AbortProcessingException;
}
Modified: branches/4.0.X/ui/iteration/ui/src/main/config/faces-config.xml
===================================================================
--- branches/4.0.X/ui/iteration/ui/src/main/config/faces-config.xml 2011-03-12 14:03:44
UTC (rev 22182)
+++ branches/4.0.X/ui/iteration/ui/src/main/config/faces-config.xml 2011-03-12 14:09:15
UTC (rev 22183)
@@ -26,7 +26,7 @@
<cdk:event-class>org.richfaces.event.TreeToggleEvent</cdk:event-class>
<cdk:listener-class>org.richfaces.event.TreeToggleListener</cdk:listener-class>
<cdk:source-class>org.richfaces.event.TreeToggleSource</cdk:source-class>
- <cdk:listener-method>processToggle</cdk:listener-method>
+ <cdk:listener-method>processTreeToggle</cdk:listener-method>
<cdk:tag>
<cdk:tag-name>treeToggleListener</cdk:tag-name>
<cdk:tag-type>Facelets</cdk:tag-type>
@@ -39,7 +39,7 @@
<cdk:event-class>org.richfaces.event.TreeSelectionChangeEvent</cdk:event-class>
<cdk:listener-class>org.richfaces.event.TreeSelectionChangeListener</cdk:listener-class>
<cdk:source-class>org.richfaces.event.TreeSelectionChangeSource</cdk:source-class>
-
<cdk:listener-method>processSelectionChange</cdk:listener-method>
+
<cdk:listener-method>processTreeSelectionChange</cdk:listener-method>
<cdk:tag>
<cdk:tag-name>treeSelectionChangeListener</cdk:tag-name>
<cdk:tag-type>Facelets</cdk:tag-type>
Modified:
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractCollapsibleSubTable.java
===================================================================
---
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractCollapsibleSubTable.java 2011-03-12
14:03:44 UTC (rev 22182)
+++
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractCollapsibleSubTable.java 2011-03-12
14:09:15 UTC (rev 22183)
@@ -34,8 +34,8 @@
import org.richfaces.cdk.annotations.JsfRenderer;
import org.richfaces.cdk.annotations.Tag;
import org.richfaces.cdk.annotations.TagType;
-import org.richfaces.event.ToggleEvent;
-import org.richfaces.event.ToggleListener;
+import org.richfaces.event.CollapsibleSubTableToggleEvent;
+import org.richfaces.event.CollapsibleSubTableToggleListener;
/**
@@ -84,8 +84,8 @@
public abstract String getExpandMode();
public void broadcast(FacesEvent event) throws AbortProcessingException {
- if (event instanceof ToggleEvent) {
- ToggleEvent toggleEvent = (ToggleEvent) event;
+ if (event instanceof CollapsibleSubTableToggleEvent) {
+ CollapsibleSubTableToggleEvent toggleEvent = (CollapsibleSubTableToggleEvent)
event;
boolean newValue = toggleEvent.isExpanded();
getStateHelper().put(PropertyKeys.expanded, newValue);
@@ -129,16 +129,16 @@
throw new IllegalArgumentException("subtable is not sortable
element");
}
- public void addToggleListener(ToggleListener listener) {
+ public void addCollapsibleSubTableToggleListener(CollapsibleSubTableToggleListener
listener) {
addFacesListener(listener);
}
- public void removeToggleListener(ToggleListener listener) {
+ public void removeCollapsibleSubTableToggleListener(CollapsibleSubTableToggleListener
listener) {
removeFacesListener(listener);
}
- public ToggleListener[] getToggleListeners() {
- return (ToggleListener[]) getFacesListeners(ToggleListener.class);
+ public CollapsibleSubTableToggleListener[] getCollapsibleSubTableToggleListener() {
+ return (CollapsibleSubTableToggleListener[])
getFacesListeners(CollapsibleSubTableToggleListener.class);
}
public void setIterationState(Object stateObject) {
Modified:
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractDataScroller.java
===================================================================
---
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractDataScroller.java 2011-03-12
14:03:44 UTC (rev 22182)
+++
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractDataScroller.java 2011-03-12
14:09:15 UTC (rev 22183)
@@ -47,9 +47,9 @@
import org.richfaces.cdk.annotations.Tag;
import org.richfaces.cdk.annotations.TagType;
import org.richfaces.component.util.MessageUtil;
-import org.richfaces.event.DataScrollerEvent;
-import org.richfaces.event.DataScrollerListener;
-import org.richfaces.event.DataScrollerSource;
+import org.richfaces.event.DataScrollEvent;
+import org.richfaces.event.DataScrollListener;
+import org.richfaces.event.DataScrollSource;
@JsfComponent(
@@ -59,7 +59,7 @@
renderer = @JsfRenderer(type = "org.richfaces.DataScrollerRenderer"),
tag = @Tag(name="dataScroller",
handler="org.richfaces.taglib.DataScrollerHandler", type=TagType.Facelets)
)
-public abstract class AbstractDataScroller extends UIComponentBase implements
DataScrollerSource, IterationStateHolder {
+public abstract class AbstractDataScroller extends UIComponentBase implements
DataScrollSource, IterationStateHolder {
public static final String COMPONENT_TYPE = "org.richfaces.DataScroller";
@@ -139,21 +139,21 @@
getStateHelper().put("for", forId);
}
- public void addScrollerListener(DataScrollerListener listener) {
+ public void addScrollListener(DataScrollListener listener) {
addFacesListener(listener);
}
- public DataScrollerListener[] getScrollerListeners() {
- return (DataScrollerListener[]) getFacesListeners(DataScrollerListener.class);
+ public DataScrollListener[] getScrollListeners() {
+ return (DataScrollListener[]) getFacesListeners(DataScrollListener.class);
}
- public void removeScrollerListener(DataScrollerListener listener) {
+ public void removeScrollListener(DataScrollListener listener) {
removeFacesListener(listener);
}
public void broadcast(FacesEvent event) throws AbortProcessingException {
- if (event instanceof DataScrollerEvent) {
- DataScrollerEvent dataScrollerEvent = (DataScrollerEvent) event;
+ if (event instanceof DataScrollEvent) {
+ DataScrollEvent dataScrollerEvent = (DataScrollEvent) event;
updateModel(dataScrollerEvent.getPage());
Modified:
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/event/MethodExpressionTreeSelectionChangeListener.java
===================================================================
---
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/event/MethodExpressionTreeSelectionChangeListener.java 2011-03-12
14:03:44 UTC (rev 22182)
+++
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/event/MethodExpressionTreeSelectionChangeListener.java 2011-03-12
14:09:15 UTC (rev 22183)
@@ -43,7 +43,7 @@
super(methodExpressionOneArg);
}
- public void processSelectionChange(TreeSelectionChangeEvent event) throws
AbortProcessingException {
+ public void processTreeSelectionChange(TreeSelectionChangeEvent event) throws
AbortProcessingException {
processEvent(event);
}
Modified:
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/event/MethodExpressionTreeToggleListener.java
===================================================================
---
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/event/MethodExpressionTreeToggleListener.java 2011-03-12
14:03:44 UTC (rev 22182)
+++
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/event/MethodExpressionTreeToggleListener.java 2011-03-12
14:09:15 UTC (rev 22183)
@@ -42,7 +42,7 @@
super(methodExpressionOneArg);
}
- public void processToggle(TreeToggleEvent event) throws AbortProcessingException {
+ public void processTreeToggle(TreeToggleEvent event) throws AbortProcessingException
{
processEvent(event);
}
Modified:
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/renderkit/CollapsibleSubTableRenderer.java
===================================================================
---
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/renderkit/CollapsibleSubTableRenderer.java 2011-03-12
14:03:44 UTC (rev 22182)
+++
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/renderkit/CollapsibleSubTableRenderer.java 2011-03-12
14:09:15 UTC (rev 22183)
@@ -29,7 +29,7 @@
import org.richfaces.component.AbstractDataTable;
import org.richfaces.component.Row;
import org.richfaces.component.UIDataTableBase;
-import org.richfaces.event.ToggleEvent;
+import org.richfaces.event.CollapsibleSubTableToggleEvent;
import org.richfaces.renderkit.util.AjaxRendererUtils;
import javax.faces.application.ResourceDependencies;
@@ -111,7 +111,7 @@
}
if(subTable.isExpanded() != isExpanded) {
- new ToggleEvent(subTable, isExpanded, togglerId).queue();
+ new CollapsibleSubTableToggleEvent(subTable, isExpanded,
togglerId).queue();
}
}
}
Modified:
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataScrollerBaseRenderer.java
===================================================================
---
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataScrollerBaseRenderer.java 2011-03-12
14:03:44 UTC (rev 22182)
+++
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataScrollerBaseRenderer.java 2011-03-12
14:09:15 UTC (rev 22183)
@@ -42,7 +42,7 @@
import org.ajax4jsf.javascript.JSReference;
import org.richfaces.component.AbstractDataScroller;
import org.richfaces.component.DataScrollerControlsMode;
-import org.richfaces.event.DataScrollerEvent;
+import org.richfaces.event.DataScrollEvent;
import org.richfaces.renderkit.util.AjaxRendererUtils;
@ResourceDependencies( {
@@ -68,7 +68,7 @@
int page = scroller.getPage();
if (newPage != 0 && newPage != page) {
- new DataScrollerEvent(scroller, String.valueOf(page), param,
newPage).queue();
+ new DataScrollEvent(scroller, String.valueOf(page), param,
newPage).queue();
}
}
}
Modified:
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/taglib/CollapsibleSubTableHandler.java
===================================================================
---
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/taglib/CollapsibleSubTableHandler.java 2011-03-12
14:03:44 UTC (rev 22182)
+++
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/taglib/CollapsibleSubTableHandler.java 2011-03-12
14:09:15 UTC (rev 22183)
@@ -60,7 +60,7 @@
static class CollapsibleSubTableMapper extends Metadata {
- private static final Class[] SIGNATURE = new Class[] {
org.richfaces.event.ToggleEvent.class };
+ private static final Class[] SIGNATURE = new Class[] {
org.richfaces.event.CollapsibleSubTableToggleEvent.class };
private final TagAttribute attribute;
@@ -69,7 +69,7 @@
}
public void applyMetadata(FaceletContext ctx, Object instance) {
- ((AbstractCollapsibleSubTable) instance).addToggleListener((new
MethodExpressionToggleListener(this.attribute.getMethodExpression(ctx, null,
SIGNATURE))));
+ ((AbstractCollapsibleSubTable)
instance).addCollapsibleSubTableToggleListener((new
MethodExpressionToggleListener(this.attribute.getMethodExpression(ctx, null,
SIGNATURE))));
}
}
}
Modified:
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/taglib/DataScrollerHandler.java
===================================================================
---
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/taglib/DataScrollerHandler.java 2011-03-12
14:03:44 UTC (rev 22182)
+++
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/taglib/DataScrollerHandler.java 2011-03-12
14:09:15 UTC (rev 22183)
@@ -70,7 +70,7 @@
private static final class ScrollListenerMapper extends Metadata {
- private static final Class[] SIGNATURE = new Class[] {
org.richfaces.event.DataScrollerEvent.class };
+ private static final Class[] SIGNATURE = new Class[] {
org.richfaces.event.DataScrollEvent.class };
private final TagAttribute attribute;
@@ -81,7 +81,7 @@
@Override
public void applyMetadata(FaceletContext ctx, Object instance) {
- ((AbstractDataScroller) instance).addScrollerListener((new
MethodExpressionScrollListener(this.attribute
+ ((AbstractDataScroller) instance).addScrollListener((new
MethodExpressionScrollListener(this.attribute
.getMethodExpression(ctx, null, SIGNATURE))));
}
}
Modified:
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/taglib/MethodExpressionScrollListener.java
===================================================================
---
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/taglib/MethodExpressionScrollListener.java 2011-03-12
14:03:44 UTC (rev 22182)
+++
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/taglib/MethodExpressionScrollListener.java 2011-03-12
14:09:15 UTC (rev 22183)
@@ -3,14 +3,14 @@
import javax.el.MethodExpression;
import javax.faces.context.FacesContext;
-import org.richfaces.event.DataScrollerEvent;
-import org.richfaces.event.DataScrollerListener;
+import org.richfaces.event.DataScrollEvent;
+import org.richfaces.event.DataScrollListener;
/**
* @author Anton Belevich
*
*/
-public class MethodExpressionScrollListener implements DataScrollerListener {
+public class MethodExpressionScrollListener implements DataScrollListener {
private MethodExpression methodExpression;
@@ -23,7 +23,7 @@
this.methodExpression = methodExpression;
}
- public void processScroller(DataScrollerEvent dataScrollerEvent) {
+ public void processDataScroll(DataScrollEvent dataScrollerEvent) {
FacesContext facesContext = FacesContext.getCurrentInstance();
methodExpression.invoke(facesContext.getELContext(), new Object[] {
dataScrollerEvent });
}
Modified:
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/taglib/MethodExpressionToggleListener.java
===================================================================
---
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/taglib/MethodExpressionToggleListener.java 2011-03-12
14:03:44 UTC (rev 22182)
+++
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/taglib/MethodExpressionToggleListener.java 2011-03-12
14:09:15 UTC (rev 22183)
@@ -25,10 +25,10 @@
import javax.el.MethodExpression;
import javax.faces.context.FacesContext;
-import org.richfaces.event.ToggleEvent;
-import org.richfaces.event.ToggleListener;
+import org.richfaces.event.CollapsibleSubTableToggleEvent;
+import org.richfaces.event.CollapsibleSubTableToggleListener;
-public class MethodExpressionToggleListener implements ToggleListener {
+public class MethodExpressionToggleListener implements CollapsibleSubTableToggleListener
{
private MethodExpression methodExpression;
@@ -41,7 +41,7 @@
this.methodExpression = methodExpression;
}
- public void processToggle(ToggleEvent toggleEvent) {
+ public void processCollapsibleSubTableToggle(CollapsibleSubTableToggleEvent
toggleEvent) {
FacesContext facesContext = FacesContext.getCurrentInstance();
methodExpression.invoke(facesContext.getELContext(), new Object[]{toggleEvent});
}
Modified:
branches/4.0.X/ui/iteration/ui/src/main/resources/META-INF/cdk/attributes/tree-serverEventListeners-props.xml
===================================================================
---
branches/4.0.X/ui/iteration/ui/src/main/resources/META-INF/cdk/attributes/tree-serverEventListeners-props.xml 2011-03-12
14:03:44 UTC (rev 22182)
+++
branches/4.0.X/ui/iteration/ui/src/main/resources/META-INF/cdk/attributes/tree-serverEventListeners-props.xml 2011-03-12
14:09:15 UTC (rev 22183)
@@ -17,14 +17,14 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee">
<property>
- <property-name>selectionChangeListener</property-name>
+ <property-name>treeSelectionChangeListener</property-name>
<property-class>javax.el.MethodExpression</property-class>
<property-extension>
<cdk:generate>false</cdk:generate>
</property-extension>
</property>
<property>
- <property-name>toggleListener</property-name>
+ <property-name>treeToggleListener</property-name>
<property-class>javax.el.MethodExpression</property-class>
<property-extension>
<cdk:generate>false</cdk:generate>