JBoss Rich Faces SVN: r1454 - in trunk: framework/api/src/main/java/org/ajax4jsf/component and 26 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2007-07-03 18:03:50 -0400 (Tue, 03 Jul 2007)
New Revision: 1454
Added:
trunk/framework/api/src/main/java/org/ajax4jsf/application/AjaxSingleException.java
trunk/framework/api/src/main/java/org/ajax4jsf/context/ViewIdHolder.java
trunk/framework/api/src/main/java/org/ajax4jsf/event/AjaxActionEvent.java
trunk/framework/api/src/main/java/org/ajax4jsf/event/AjaxEvent.java
trunk/framework/api/src/main/java/org/ajax4jsf/event/AjaxListener.java
trunk/framework/api/src/main/java/org/ajax4jsf/event/AjaxRenderEvent.java
trunk/framework/api/src/main/java/org/ajax4jsf/event/AjaxRenderListener.java
trunk/framework/api/src/main/java/org/ajax4jsf/event/AjaxSingleEvent.java
trunk/framework/api/src/main/java/org/ajax4jsf/event/AjaxSource.java
trunk/framework/api/src/main/java/org/richfaces/event/AjaxSelectedEvent.java
trunk/framework/api/src/main/java/org/richfaces/event/NodeExpandedEvent.java
trunk/framework/api/src/main/java/org/richfaces/event/NodeExpandedListener.java
trunk/framework/api/src/main/java/org/richfaces/event/NodeSelectedEvent.java
trunk/framework/api/src/main/java/org/richfaces/event/NodeSelectedListener.java
Removed:
trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxActionEvent.java
trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxEvent.java
trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxListener.java
trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxRenderEvent.java
trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxRenderListener.java
trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxSingleEvent.java
trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxSingleException.java
trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxSource.java
trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/ViewIdHolder.java
trunk/framework/api/src/main/java/org/richfaces/component/events/AjaxSelectedEvent.java
trunk/framework/api/src/main/java/org/richfaces/component/events/NodeExpandedEvent.java
trunk/framework/api/src/main/java/org/richfaces/component/events/NodeExpandedListener.java
trunk/framework/api/src/main/java/org/richfaces/component/events/NodeSelectedEvent.java
trunk/framework/api/src/main/java/org/richfaces/component/events/NodeSelectedListener.java
Modified:
trunk/framework/api/src/main/java/org/ajax4jsf/component/AjaxContainer.java
trunk/framework/api/src/main/java/org/ajax4jsf/context/AjaxContext.java
trunk/framework/api/src/main/java/org/richfaces/event/TreeListenerEventsProducer.java
trunk/framework/impl/src/main/java/org/ajax4jsf/component/AjaxActionComponent.java
trunk/framework/impl/src/main/java/org/ajax4jsf/component/AjaxInputComponent.java
trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxContextImpl.java
trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxListenerHelper.java
trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxRegionBrige.java
trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxViewHandler.java
trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxViewRoot.java
trunk/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxContainerRenderer.java
trunk/ui/core/src/main/java/org/ajax4jsf/ajax/ForceRender.java
trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxForm.java
trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxRegion.java
trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIInclude.java
trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/AjaxCommandRendererBase.java
trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/html/AjaxFormRenderer.java
trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxListenerHandler.java
trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/jsp/AjaxListenerTag.java
trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/jsp/AjaxRegionTag.java
trunk/ui/drag-drop/src/main/java/org/richfaces/component/UIDragSupport.java
trunk/ui/drag-drop/src/main/java/org/richfaces/component/UIDropSupport.java
trunk/ui/menu-components/src/main/java/org/richfaces/component/UIMenuItem.java
trunk/ui/simpleTogglePanel/src/main/java/org/richfaces/component/UISimpleTogglePanel.java
trunk/ui/suggestionbox/src/main/java/org/richfaces/component/AjaxSuggestionEvent.java
trunk/ui/suggestionbox/src/main/java/org/richfaces/component/UISuggestionBox.java
trunk/ui/tabPanel/src/main/java/org/richfaces/component/UITab.java
trunk/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabPanelRendererBase.java
trunk/ui/togglePanel/src/main/java/org/richfaces/component/UIToggleControl.java
trunk/ui/tree/src/main/java/org/richfaces/component/TreeListenersTagHandler.java
trunk/ui/tree/src/main/java/org/richfaces/component/UITree.java
trunk/ui/tree/src/main/java/org/richfaces/component/UITreeNode.java
trunk/ui/tree/src/main/java/org/richfaces/component/events/TreeEvents.java
trunk/ui/tree/src/main/java/org/richfaces/renderkit/NodeRendererBase.java
trunk/ui/tree/src/main/java/org/richfaces/taglib/TreeListenersTagHandler.java
trunk/ui/tree/src/test/java/org/richfaces/component/TreeComponentTest.java
trunk/ui/tree/src/test/java/org/richfaces/component/events/TreeEventsListenersTest.java
trunk/ui/tree/src/test/java/org/richfaces/component/events/TreeEventsTest.java
Log:
packages and classes refactor
Copied: trunk/framework/api/src/main/java/org/ajax4jsf/application/AjaxSingleException.java (from rev 1451, trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxSingleException.java)
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/application/AjaxSingleException.java (rev 0)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/application/AjaxSingleException.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -0,0 +1,31 @@
+/**
+ *
+ */
+package org.ajax4jsf.application;
+
+import javax.faces.component.UIComponent;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class AjaxSingleException extends RuntimeException {
+
+ private UIComponent component;
+
+ /**
+ * @param component
+ */
+ public AjaxSingleException(UIComponent componemt) {
+// super();
+ this.component = componemt;
+ }
+
+ /**
+ * @return the component
+ */
+ public UIComponent getComponent() {
+ return component;
+ }
+
+}
Modified: trunk/framework/api/src/main/java/org/ajax4jsf/component/AjaxContainer.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/component/AjaxContainer.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/component/AjaxContainer.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -25,7 +25,7 @@
import javax.faces.context.FacesContext;
-import org.ajax4jsf.framework.ajax.AjaxSource;
+import org.ajax4jsf.event.AjaxSource;
/**
Modified: trunk/framework/api/src/main/java/org/ajax4jsf/context/AjaxContext.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/context/AjaxContext.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/context/AjaxContext.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -9,7 +9,6 @@
import javax.faces.context.FacesContext;
import javax.faces.el.VariableResolver;
-import org.ajax4jsf.framework.ajax.ViewIdHolder;
public abstract class AjaxContext {
Copied: trunk/framework/api/src/main/java/org/ajax4jsf/context/ViewIdHolder.java (from rev 1451, trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/ViewIdHolder.java)
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/context/ViewIdHolder.java (rev 0)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/context/ViewIdHolder.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -0,0 +1,37 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.context;
+
+/**
+ * Interface to skip navigation cases in ViewHandler and , instead, store new ViewId.
+ * @author shura
+ *
+ */
+public interface ViewIdHolder {
+
+ public boolean skipNavigation(String ViewId);
+
+ public String getViewId();
+
+ public void setViewId(String newViewId);
+
+}
Copied: trunk/framework/api/src/main/java/org/ajax4jsf/event/AjaxActionEvent.java (from rev 1451, trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxActionEvent.java)
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/event/AjaxActionEvent.java (rev 0)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/event/AjaxActionEvent.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -0,0 +1,48 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.event;
+
+import javax.faces.component.UIComponent;
+import javax.faces.event.ActionEvent;
+
+/**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:34 $
+ *
+ */
+public class AjaxActionEvent extends ActionEvent {
+
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -5406101936114574903L;
+
+ /**
+ * @param component
+ */
+ public AjaxActionEvent(UIComponent component) {
+ super(component);
+ // TODO Auto-generated constructor stub
+ }
+
+}
Copied: trunk/framework/api/src/main/java/org/ajax4jsf/event/AjaxEvent.java (from rev 1451, trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxEvent.java)
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/event/AjaxEvent.java (rev 0)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/event/AjaxEvent.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -0,0 +1,69 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.event;
+
+import javax.faces.component.UIComponent;
+import javax.faces.event.FacesEvent;
+import javax.faces.event.FacesListener;
+import javax.faces.event.PhaseId;
+
+/**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:33 $
+ *
+ * Event for send by <code>AjaxContainer</code> in case of Ajax Request.
+ * Used for build set of id's to render at current request, perform special render etc.
+ */
+public class AjaxEvent extends FacesEvent {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -5624716710738446159L;
+
+ /**
+ * @param component
+ */
+ public AjaxEvent(UIComponent component) {
+ super(component);
+ setPhaseId(PhaseId.RENDER_RESPONSE);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see javax.faces.event.FacesEvent#isAppropriateListener(javax.faces.event.FacesListener)
+ */
+ public boolean isAppropriateListener(FacesListener listener) {
+ return (listener instanceof AjaxListener);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see javax.faces.event.FacesEvent#processListener(javax.faces.event.FacesListener)
+ */
+ public void processListener(FacesListener listener) {
+ ((AjaxListener) listener).processAjax(this);
+ }
+
+}
Copied: trunk/framework/api/src/main/java/org/ajax4jsf/event/AjaxListener.java (from rev 1451, trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxListener.java)
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/event/AjaxListener.java (rev 0)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/event/AjaxListener.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -0,0 +1,40 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.event;
+
+import javax.faces.event.FacesListener;
+
+/**
+ * Base interface for all listeners, capable for receive <code>AjaxEvent</code>
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:36 $
+ */
+public interface AjaxListener extends FacesListener {
+
+ public static final Class[] AJAX_LISTENER_ARGS = { AjaxEvent.class };
+
+ /**
+ * @param event - to process
+ */
+ void processAjax(AjaxEvent event);
+
+}
Copied: trunk/framework/api/src/main/java/org/ajax4jsf/event/AjaxRenderEvent.java (from rev 1451, trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxRenderEvent.java)
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/event/AjaxRenderEvent.java (rev 0)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/event/AjaxRenderEvent.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -0,0 +1,65 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.event;
+
+import javax.faces.component.UIComponent;
+import javax.faces.event.FacesEvent;
+import javax.faces.event.FacesListener;
+
+/**
+ * @author asmirnov(a)exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:41 $
+ *
+ */
+public class AjaxRenderEvent extends FacesEvent {
+
+ /**
+ * @param component
+ */
+ public AjaxRenderEvent(UIComponent component) {
+ super(component);
+ }
+
+ public boolean isAppropriateListener(FacesListener listener) {
+ // TODO Auto-generated method stub
+ return listener instanceof AjaxRenderListener;
+ }
+
+ public void processListener(FacesListener listener) {
+ if (listener instanceof AjaxRenderListener) {
+ AjaxRenderListener renderListener = (AjaxRenderListener) listener;
+ renderListener.processAjaxRender(this);
+ }
+
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.event.FacesEvent#getPhaseId()
+ */
+// public PhaseId getPhaseId() {
+// // TODO Auto-generated method stub
+// return PhaseId.INVOKE_APPLICATION;
+// }
+
+
+
+}
Copied: trunk/framework/api/src/main/java/org/ajax4jsf/event/AjaxRenderListener.java (from rev 1451, trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxRenderListener.java)
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/event/AjaxRenderListener.java (rev 0)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/event/AjaxRenderListener.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -0,0 +1,34 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.event;
+
+import javax.faces.event.FacesListener;
+
+/**
+ * @author shura
+ *
+ */
+public interface AjaxRenderListener extends FacesListener {
+
+ public void processAjaxRender(AjaxRenderEvent event);
+
+}
Copied: trunk/framework/api/src/main/java/org/ajax4jsf/event/AjaxSingleEvent.java (from rev 1451, trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxSingleEvent.java)
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/event/AjaxSingleEvent.java (rev 0)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/event/AjaxSingleEvent.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -0,0 +1,40 @@
+/**
+ *
+ */
+package org.ajax4jsf.event;
+
+import javax.faces.component.UIComponent;
+import javax.faces.event.FacesEvent;
+import javax.faces.event.FacesListener;
+import javax.faces.event.PhaseId;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class AjaxSingleEvent extends FacesEvent {
+
+ /**
+ * @param arg0
+ */
+ public AjaxSingleEvent(UIComponent arg0) {
+ super(arg0);
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.event.FacesEvent#isAppropriateListener(javax.faces.event.FacesListener)
+ */
+ public boolean isAppropriateListener(FacesListener arg0) {
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.event.FacesEvent#processListener(javax.faces.event.FacesListener)
+ */
+ public void processListener(FacesListener arg0) {
+ }
+
+ public PhaseId getPhaseId() {
+ return PhaseId.APPLY_REQUEST_VALUES;
+ }
+}
Copied: trunk/framework/api/src/main/java/org/ajax4jsf/event/AjaxSource.java (from rev 1451, trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxSource.java)
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/event/AjaxSource.java (rev 0)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/event/AjaxSource.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -0,0 +1,51 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.event;
+
+/**
+ * Interface for all components capable to process {@link org.ajax4jsf.event.AjaxEvent}'s
+ * @author shura
+ *
+ */
+public interface AjaxSource {
+ /**
+ * same as for ActionSource, but for AjaxListener
+ *
+ * @see javax.faces.component.ActionSource#addActionListener(javax.faces.event.ActionListener)
+ */
+ public void addAjaxListener(AjaxListener listener);
+
+ /**
+ * same as for ActionSource, but for AjaxListener
+ *
+ * @see javax.faces.component.ActionSource#getActionListeners()
+ */
+ public AjaxListener[] getAjaxListeners();
+
+ /**
+ * same as for ActionSource, but for AjaxListener
+ * @see javax.faces.component.ActionSource#removeActionListener(javax.faces.event.ActionListener)
+ */
+ public void removeAjaxListener(AjaxListener listener);
+
+
+}
Deleted: trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxActionEvent.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxActionEvent.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxActionEvent.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -1,48 +0,0 @@
-/**
- * License Agreement.
- *
- * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.ajax4jsf.framework.ajax;
-
-import javax.faces.component.UIComponent;
-import javax.faces.event.ActionEvent;
-
-/**
- * @author shura (latest modification by $Author: alexsmirnov $)
- * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:34 $
- *
- */
-public class AjaxActionEvent extends ActionEvent {
-
-
- /**
- *
- */
- private static final long serialVersionUID = -5406101936114574903L;
-
- /**
- * @param component
- */
- public AjaxActionEvent(UIComponent component) {
- super(component);
- // TODO Auto-generated constructor stub
- }
-
-}
Deleted: trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxEvent.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxEvent.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxEvent.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -1,69 +0,0 @@
-/**
- * License Agreement.
- *
- * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.ajax4jsf.framework.ajax;
-
-import javax.faces.component.UIComponent;
-import javax.faces.event.FacesEvent;
-import javax.faces.event.FacesListener;
-import javax.faces.event.PhaseId;
-
-/**
- * @author shura (latest modification by $Author: alexsmirnov $)
- * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:33 $
- *
- * Event for send by <code>AjaxContainer</code> in case of Ajax Request.
- * Used for build set of id's to render at current request, perform special render etc.
- */
-public class AjaxEvent extends FacesEvent {
-
- /**
- *
- */
- private static final long serialVersionUID = -5624716710738446159L;
-
- /**
- * @param component
- */
- public AjaxEvent(UIComponent component) {
- super(component);
- setPhaseId(PhaseId.RENDER_RESPONSE);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see javax.faces.event.FacesEvent#isAppropriateListener(javax.faces.event.FacesListener)
- */
- public boolean isAppropriateListener(FacesListener listener) {
- return (listener instanceof AjaxListener);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see javax.faces.event.FacesEvent#processListener(javax.faces.event.FacesListener)
- */
- public void processListener(FacesListener listener) {
- ((AjaxListener) listener).processAjax(this);
- }
-
-}
Deleted: trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxListener.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxListener.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxListener.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -1,40 +0,0 @@
-/**
- * License Agreement.
- *
- * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.ajax4jsf.framework.ajax;
-
-import javax.faces.event.FacesListener;
-
-/**
- * Base interface for all listeners, capable for receive <code>AjaxEvent</code>
- * @author shura (latest modification by $Author: alexsmirnov $)
- * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:36 $
- */
-public interface AjaxListener extends FacesListener {
-
- public static final Class[] AJAX_LISTENER_ARGS = { AjaxEvent.class };
-
- /**
- * @param event - to process
- */
- void processAjax(AjaxEvent event);
-
-}
Deleted: trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxRenderEvent.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxRenderEvent.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxRenderEvent.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -1,65 +0,0 @@
-/**
- * License Agreement.
- *
- * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.ajax4jsf.framework.ajax;
-
-import javax.faces.component.UIComponent;
-import javax.faces.event.FacesEvent;
-import javax.faces.event.FacesListener;
-
-/**
- * @author asmirnov(a)exadel.com (latest modification by $Author: alexsmirnov $)
- * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:41 $
- *
- */
-public class AjaxRenderEvent extends FacesEvent {
-
- /**
- * @param component
- */
- public AjaxRenderEvent(UIComponent component) {
- super(component);
- }
-
- public boolean isAppropriateListener(FacesListener listener) {
- // TODO Auto-generated method stub
- return listener instanceof AjaxRenderListener;
- }
-
- public void processListener(FacesListener listener) {
- if (listener instanceof AjaxRenderListener) {
- AjaxRenderListener renderListener = (AjaxRenderListener) listener;
- renderListener.processAjaxRender(this);
- }
-
- }
-
- /* (non-Javadoc)
- * @see javax.faces.event.FacesEvent#getPhaseId()
- */
-// public PhaseId getPhaseId() {
-// // TODO Auto-generated method stub
-// return PhaseId.INVOKE_APPLICATION;
-// }
-
-
-
-}
Deleted: trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxRenderListener.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxRenderListener.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxRenderListener.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -1,34 +0,0 @@
-/**
- * License Agreement.
- *
- * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.ajax4jsf.framework.ajax;
-
-import javax.faces.event.FacesListener;
-
-/**
- * @author shura
- *
- */
-public interface AjaxRenderListener extends FacesListener {
-
- public void processAjaxRender(AjaxRenderEvent event);
-
-}
Deleted: trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxSingleEvent.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxSingleEvent.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxSingleEvent.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -1,40 +0,0 @@
-/**
- *
- */
-package org.ajax4jsf.framework.ajax;
-
-import javax.faces.component.UIComponent;
-import javax.faces.event.FacesEvent;
-import javax.faces.event.FacesListener;
-import javax.faces.event.PhaseId;
-
-/**
- * @author asmirnov
- *
- */
-public class AjaxSingleEvent extends FacesEvent {
-
- /**
- * @param arg0
- */
- public AjaxSingleEvent(UIComponent arg0) {
- super(arg0);
- }
-
- /* (non-Javadoc)
- * @see javax.faces.event.FacesEvent#isAppropriateListener(javax.faces.event.FacesListener)
- */
- public boolean isAppropriateListener(FacesListener arg0) {
- return false;
- }
-
- /* (non-Javadoc)
- * @see javax.faces.event.FacesEvent#processListener(javax.faces.event.FacesListener)
- */
- public void processListener(FacesListener arg0) {
- }
-
- public PhaseId getPhaseId() {
- return PhaseId.APPLY_REQUEST_VALUES;
- }
-}
Deleted: trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxSingleException.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxSingleException.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxSingleException.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -1,31 +0,0 @@
-/**
- *
- */
-package org.ajax4jsf.framework.ajax;
-
-import javax.faces.component.UIComponent;
-
-/**
- * @author asmirnov
- *
- */
-public class AjaxSingleException extends RuntimeException {
-
- private UIComponent component;
-
- /**
- * @param component
- */
- public AjaxSingleException(UIComponent componemt) {
-// super();
- this.component = componemt;
- }
-
- /**
- * @return the component
- */
- public UIComponent getComponent() {
- return component;
- }
-
-}
Deleted: trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxSource.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxSource.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxSource.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -1,51 +0,0 @@
-/**
- * License Agreement.
- *
- * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.ajax4jsf.framework.ajax;
-
-/**
- * Interface for all components capable to process {@link org.ajax4jsf.framework.ajax.AjaxEvent}'s
- * @author shura
- *
- */
-public interface AjaxSource {
- /**
- * same as for ActionSource, but for AjaxListener
- *
- * @see javax.faces.component.ActionSource#addActionListener(javax.faces.event.ActionListener)
- */
- public void addAjaxListener(AjaxListener listener);
-
- /**
- * same as for ActionSource, but for AjaxListener
- *
- * @see javax.faces.component.ActionSource#getActionListeners()
- */
- public AjaxListener[] getAjaxListeners();
-
- /**
- * same as for ActionSource, but for AjaxListener
- * @see javax.faces.component.ActionSource#removeActionListener(javax.faces.event.ActionListener)
- */
- public void removeAjaxListener(AjaxListener listener);
-
-
-}
Deleted: trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/ViewIdHolder.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/ViewIdHolder.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/ViewIdHolder.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -1,37 +0,0 @@
-/**
- * License Agreement.
- *
- * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.ajax4jsf.framework.ajax;
-
-/**
- * Interface to skip navigation cases in ViewHandler and , instead, store new ViewId.
- * @author shura
- *
- */
-public interface ViewIdHolder {
-
- public boolean skipNavigation(String ViewId);
-
- public String getViewId();
-
- public void setViewId(String newViewId);
-
-}
Deleted: trunk/framework/api/src/main/java/org/richfaces/component/events/AjaxSelectedEvent.java
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/component/events/AjaxSelectedEvent.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/framework/api/src/main/java/org/richfaces/component/events/AjaxSelectedEvent.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -1,41 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces 3.0 - 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.component.events;
-
-import javax.faces.component.UIComponent;
-
-/**
- * @author Konstantin Mishin
- *
- */
-public class AjaxSelectedEvent extends NodeSelectedEvent {
-
- /**
- *
- */
- private static final long serialVersionUID = 1156974665865521208L;
-
- public AjaxSelectedEvent(UIComponent component) {
- super(component);
- }
-
-}
Deleted: trunk/framework/api/src/main/java/org/richfaces/component/events/NodeExpandedEvent.java
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/component/events/NodeExpandedEvent.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/framework/api/src/main/java/org/richfaces/component/events/NodeExpandedEvent.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -1,58 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces 3.0 - 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.component.events;
-
-import javax.faces.component.UIComponent;
-import javax.faces.event.FacesEvent;
-import javax.faces.event.FacesListener;
-
-/**
- * @author Nick Belaevski - nbelaevski(a)exadel.com
- * created 27.11.2006
- *
- */
-public class NodeExpandedEvent extends FacesEvent {
-
- public NodeExpandedEvent(UIComponent component) {
- super(component);
- }
-
- /**
- *
- */
- private static final long serialVersionUID = 2620359072575831666L;
-
- /* (non-Javadoc)
- * @see javax.faces.event.FacesEvent#isAppropriateListener(javax.faces.event.FacesListener)
- */
- public boolean isAppropriateListener(FacesListener listener) {
- return listener instanceof NodeExpandedListener;
- }
-
- /* (non-Javadoc)
- * @see javax.faces.event.FacesEvent#processListener(javax.faces.event.FacesListener)
- */
- public void processListener(FacesListener listener) {
- ((NodeExpandedListener) listener).processExpansion(this);
- }
-
-}
Deleted: trunk/framework/api/src/main/java/org/richfaces/component/events/NodeExpandedListener.java
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/component/events/NodeExpandedListener.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/framework/api/src/main/java/org/richfaces/component/events/NodeExpandedListener.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -1,34 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces 3.0 - 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.component.events;
-
-import javax.faces.event.AbortProcessingException;
-import javax.faces.event.FacesListener;
-
-/**
- * @author Nick Belaevski - nbelaevski(a)exadel.com
- * created 27.11.2006
- *
- */
-public interface NodeExpandedListener extends FacesListener {
- public void processExpansion(NodeExpandedEvent nodeExpandedEvent) throws AbortProcessingException;
-}
Deleted: trunk/framework/api/src/main/java/org/richfaces/component/events/NodeSelectedEvent.java
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/component/events/NodeSelectedEvent.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/framework/api/src/main/java/org/richfaces/component/events/NodeSelectedEvent.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -1,60 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces 3.0 - 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.component.events;
-
-import javax.faces.component.UIComponent;
-import javax.faces.event.FacesEvent;
-import javax.faces.event.FacesListener;
-
-/**
- * @author Nick Belaevski - nbelaevski(a)exadel.com
- * created 27.11.2006
- *
- */
-public class NodeSelectedEvent extends FacesEvent {
-
- public NodeSelectedEvent(UIComponent component) {
- super(component);
- }
-
- /**
- *
- */
- private static final long serialVersionUID = -1292268859927735863L;
-
- /* (non-Javadoc)
- * @see javax.faces.event.FacesEvent#isAppropriateListener(javax.faces.event.FacesListener)
- */
-
- public boolean isAppropriateListener(FacesListener listener) {
- return listener instanceof NodeSelectedListener;
- }
-
- /* (non-Javadoc)
- * @see javax.faces.event.FacesEvent#processListener(javax.faces.event.FacesListener)
- */
-
- public void processListener(FacesListener listener) {
- ((NodeSelectedListener) listener).processSelection(this);
- }
-
-}
Deleted: trunk/framework/api/src/main/java/org/richfaces/component/events/NodeSelectedListener.java
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/component/events/NodeSelectedListener.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/framework/api/src/main/java/org/richfaces/component/events/NodeSelectedListener.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -1,34 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces 3.0 - 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.component.events;
-
-import javax.faces.event.AbortProcessingException;
-import javax.faces.event.FacesListener;
-
-/**
- * @author Nick Belaevski - nbelaevski(a)exadel.com
- * created 27.11.2006
- *
- */
-public interface NodeSelectedListener extends FacesListener {
- public void processSelection(NodeSelectedEvent nodeSelectedEvent) throws AbortProcessingException;
-}
Copied: trunk/framework/api/src/main/java/org/richfaces/event/AjaxSelectedEvent.java (from rev 1451, trunk/framework/api/src/main/java/org/richfaces/component/events/AjaxSelectedEvent.java)
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/event/AjaxSelectedEvent.java (rev 0)
+++ trunk/framework/api/src/main/java/org/richfaces/event/AjaxSelectedEvent.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -0,0 +1,41 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - 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;
+
+/**
+ * @author Konstantin Mishin
+ *
+ */
+public class AjaxSelectedEvent extends NodeSelectedEvent {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1156974665865521208L;
+
+ public AjaxSelectedEvent(UIComponent component) {
+ super(component);
+ }
+
+}
Copied: trunk/framework/api/src/main/java/org/richfaces/event/NodeExpandedEvent.java (from rev 1451, trunk/framework/api/src/main/java/org/richfaces/component/events/NodeExpandedEvent.java)
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/event/NodeExpandedEvent.java (rev 0)
+++ trunk/framework/api/src/main/java/org/richfaces/event/NodeExpandedEvent.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -0,0 +1,58 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - 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.FacesEvent;
+import javax.faces.event.FacesListener;
+
+/**
+ * @author Nick Belaevski - nbelaevski(a)exadel.com
+ * created 27.11.2006
+ *
+ */
+public class NodeExpandedEvent extends FacesEvent {
+
+ public NodeExpandedEvent(UIComponent component) {
+ super(component);
+ }
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 2620359072575831666L;
+
+ /* (non-Javadoc)
+ * @see javax.faces.event.FacesEvent#isAppropriateListener(javax.faces.event.FacesListener)
+ */
+ public boolean isAppropriateListener(FacesListener listener) {
+ return listener instanceof NodeExpandedListener;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.event.FacesEvent#processListener(javax.faces.event.FacesListener)
+ */
+ public void processListener(FacesListener listener) {
+ ((NodeExpandedListener) listener).processExpansion(this);
+ }
+
+}
Copied: trunk/framework/api/src/main/java/org/richfaces/event/NodeExpandedListener.java (from rev 1451, trunk/framework/api/src/main/java/org/richfaces/component/events/NodeExpandedListener.java)
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/event/NodeExpandedListener.java (rev 0)
+++ trunk/framework/api/src/main/java/org/richfaces/event/NodeExpandedListener.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -0,0 +1,34 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - 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.AbortProcessingException;
+import javax.faces.event.FacesListener;
+
+/**
+ * @author Nick Belaevski - nbelaevski(a)exadel.com
+ * created 27.11.2006
+ *
+ */
+public interface NodeExpandedListener extends FacesListener {
+ public void processExpansion(NodeExpandedEvent nodeExpandedEvent) throws AbortProcessingException;
+}
Copied: trunk/framework/api/src/main/java/org/richfaces/event/NodeSelectedEvent.java (from rev 1451, trunk/framework/api/src/main/java/org/richfaces/component/events/NodeSelectedEvent.java)
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/event/NodeSelectedEvent.java (rev 0)
+++ trunk/framework/api/src/main/java/org/richfaces/event/NodeSelectedEvent.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -0,0 +1,60 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - 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.FacesEvent;
+import javax.faces.event.FacesListener;
+
+/**
+ * @author Nick Belaevski - nbelaevski(a)exadel.com
+ * created 27.11.2006
+ *
+ */
+public class NodeSelectedEvent extends FacesEvent {
+
+ public NodeSelectedEvent(UIComponent component) {
+ super(component);
+ }
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -1292268859927735863L;
+
+ /* (non-Javadoc)
+ * @see javax.faces.event.FacesEvent#isAppropriateListener(javax.faces.event.FacesListener)
+ */
+
+ public boolean isAppropriateListener(FacesListener listener) {
+ return listener instanceof NodeSelectedListener;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.event.FacesEvent#processListener(javax.faces.event.FacesListener)
+ */
+
+ public void processListener(FacesListener listener) {
+ ((NodeSelectedListener) listener).processSelection(this);
+ }
+
+}
Copied: trunk/framework/api/src/main/java/org/richfaces/event/NodeSelectedListener.java (from rev 1451, trunk/framework/api/src/main/java/org/richfaces/component/events/NodeSelectedListener.java)
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/event/NodeSelectedListener.java (rev 0)
+++ trunk/framework/api/src/main/java/org/richfaces/event/NodeSelectedListener.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -0,0 +1,34 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - 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.AbortProcessingException;
+import javax.faces.event.FacesListener;
+
+/**
+ * @author Nick Belaevski - nbelaevski(a)exadel.com
+ * created 27.11.2006
+ *
+ */
+public interface NodeSelectedListener extends FacesListener {
+ public void processSelection(NodeSelectedEvent nodeSelectedEvent) throws AbortProcessingException;
+}
Modified: trunk/framework/api/src/main/java/org/richfaces/event/TreeListenerEventsProducer.java
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/event/TreeListenerEventsProducer.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/framework/api/src/main/java/org/richfaces/event/TreeListenerEventsProducer.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -23,8 +23,6 @@
import javax.faces.el.MethodBinding;
-import org.richfaces.component.events.NodeExpandedListener;
-import org.richfaces.component.events.NodeSelectedListener;
/**
* @author Nick Belaevski - nbelaevski(a)exadel.com
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/component/AjaxActionComponent.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/component/AjaxActionComponent.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/component/AjaxActionComponent.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -29,12 +29,12 @@
import javax.faces.event.FacesEvent;
import javax.faces.event.PhaseId;
+import org.ajax4jsf.application.AjaxSingleException;
import org.ajax4jsf.context.AjaxContext;
-import org.ajax4jsf.framework.ajax.AjaxEvent;
-import org.ajax4jsf.framework.ajax.AjaxListener;
-import org.ajax4jsf.framework.ajax.AjaxSingleEvent;
-import org.ajax4jsf.framework.ajax.AjaxSingleException;
-import org.ajax4jsf.framework.ajax.AjaxSource;
+import org.ajax4jsf.event.AjaxEvent;
+import org.ajax4jsf.event.AjaxListener;
+import org.ajax4jsf.event.AjaxSingleEvent;
+import org.ajax4jsf.event.AjaxSource;
/**
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/component/AjaxInputComponent.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/component/AjaxInputComponent.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/component/AjaxInputComponent.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -30,7 +30,7 @@
import javax.faces.event.PhaseId;
import org.ajax4jsf.context.AjaxContext;
-import org.ajax4jsf.framework.ajax.AjaxEvent;
+import org.ajax4jsf.event.AjaxEvent;
/**
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxContextImpl.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxContextImpl.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxContextImpl.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -54,6 +54,7 @@
import org.ajax4jsf.component.AjaxContainer;
import org.ajax4jsf.context.AjaxContext;
+import org.ajax4jsf.context.ViewIdHolder;
import org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter;
import org.ajax4jsf.framework.ajax.xmlfilter.FilterServletResponseWrapper;
import org.ajax4jsf.framework.renderer.AjaxContainerRenderer;
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxListenerHelper.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxListenerHelper.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxListenerHelper.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -28,6 +28,9 @@
import javax.faces.context.FacesContext;
import javax.faces.el.ValueBinding;
+import org.ajax4jsf.event.AjaxEvent;
+import org.ajax4jsf.event.AjaxListener;
+
/**
* Helper class to keep reference to listener binded as EL-expression.
* @author shura
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxRegionBrige.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxRegionBrige.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxRegionBrige.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -33,6 +33,9 @@
import org.ajax4jsf.component.AjaxContainerBase;
import org.ajax4jsf.context.AjaxContext;
+import org.ajax4jsf.event.AjaxEvent;
+import org.ajax4jsf.event.AjaxListener;
+import org.ajax4jsf.event.AjaxRenderEvent;
import org.ajax4jsf.framework.util.message.Messages;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxViewHandler.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxViewHandler.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxViewHandler.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -34,6 +34,7 @@
import org.ajax4jsf.application.ViewHandlerWrapper;
import org.ajax4jsf.context.AjaxContext;
+import org.ajax4jsf.context.ViewIdHolder;
import org.ajax4jsf.framework.renderer.AjaxContainerRenderer;
import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
import org.ajax4jsf.framework.renderer.RendererUtils.HTML;
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxViewRoot.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxViewRoot.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxViewRoot.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -32,8 +32,11 @@
import javax.faces.event.FacesEvent;
import javax.faces.event.PhaseId;
+import org.ajax4jsf.application.AjaxSingleException;
import org.ajax4jsf.component.AjaxContainer;
import org.ajax4jsf.context.AjaxContext;
+import org.ajax4jsf.context.ViewIdHolder;
+import org.ajax4jsf.event.AjaxListener;
import org.ajax4jsf.framework.renderer.AjaxContainerRenderer;
import org.ajax4jsf.framework.util.message.Messages;
import org.apache.commons.collections.Buffer;
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxContainerRenderer.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxContainerRenderer.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxContainerRenderer.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -31,7 +31,7 @@
import org.ajax4jsf.component.AjaxContainer;
import org.ajax4jsf.context.AjaxContext;
-import org.ajax4jsf.framework.ajax.AjaxEvent;
+import org.ajax4jsf.event.AjaxEvent;
import org.ajax4jsf.framework.util.message.Messages;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/ajax/ForceRender.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/ajax/ForceRender.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/ajax/ForceRender.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -25,10 +25,10 @@
import javax.faces.context.FacesContext;
import org.ajax4jsf.context.AjaxContext;
-import org.ajax4jsf.framework.ajax.AjaxEvent;
-import org.ajax4jsf.framework.ajax.AjaxListener;
-import org.ajax4jsf.framework.ajax.AjaxRenderEvent;
-import org.ajax4jsf.framework.ajax.AjaxRenderListener;
+import org.ajax4jsf.event.AjaxEvent;
+import org.ajax4jsf.event.AjaxListener;
+import org.ajax4jsf.event.AjaxRenderEvent;
+import org.ajax4jsf.event.AjaxRenderListener;
/**
* @author shura
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxForm.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxForm.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxForm.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -31,9 +31,9 @@
import org.ajax4jsf.component.AjaxComponent;
import org.ajax4jsf.context.AjaxContext;
-import org.ajax4jsf.framework.ajax.AjaxEvent;
-import org.ajax4jsf.framework.ajax.AjaxListener;
-import org.ajax4jsf.framework.ajax.AjaxSource;
+import org.ajax4jsf.event.AjaxEvent;
+import org.ajax4jsf.event.AjaxListener;
+import org.ajax4jsf.event.AjaxSource;
import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxRegion.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxRegion.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxRegion.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -36,8 +36,8 @@
import org.ajax4jsf.component.AjaxContainer;
import org.ajax4jsf.context.AjaxContext;
+import org.ajax4jsf.event.AjaxListener;
import org.ajax4jsf.framework.ajax.AjaxContextImpl;
-import org.ajax4jsf.framework.ajax.AjaxListener;
import org.ajax4jsf.framework.ajax.AjaxRegionBrige;
import org.ajax4jsf.framework.ajax.AjaxViewRoot;
import org.ajax4jsf.framework.ajax.InvokerCallback;
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIInclude.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIInclude.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIInclude.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -35,7 +35,7 @@
import org.ajax4jsf.component.AjaxOutput;
import org.ajax4jsf.context.AjaxContext;
-import org.ajax4jsf.framework.ajax.ViewIdHolder;
+import org.ajax4jsf.context.ViewIdHolder;
/**
* @author shura
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/AjaxCommandRendererBase.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/AjaxCommandRendererBase.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/AjaxCommandRendererBase.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -31,7 +31,7 @@
import javax.faces.event.ActionEvent;
import org.ajax4jsf.context.AjaxContext;
-import org.ajax4jsf.framework.ajax.AjaxEvent;
+import org.ajax4jsf.event.AjaxEvent;
import org.ajax4jsf.framework.renderer.AjaxComponentRendererBase;
import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/html/AjaxFormRenderer.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/html/AjaxFormRenderer.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/html/AjaxFormRenderer.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -36,7 +36,7 @@
import javax.faces.context.ResponseWriter;
import org.ajax4jsf.ajax.UIAjaxForm;
-import org.ajax4jsf.framework.ajax.AjaxEvent;
+import org.ajax4jsf.event.AjaxEvent;
import org.ajax4jsf.framework.renderer.AjaxComponentRendererBase;
import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
import org.ajax4jsf.framework.renderer.RendererUtils.HTML;
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxListenerHandler.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxListenerHandler.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxListenerHandler.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -28,9 +28,9 @@
import javax.faces.FacesException;
import javax.faces.component.UIComponent;
-import org.ajax4jsf.framework.ajax.AjaxListener;
+import org.ajax4jsf.event.AjaxListener;
+import org.ajax4jsf.event.AjaxSource;
import org.ajax4jsf.framework.ajax.AjaxListenerHelper;
-import org.ajax4jsf.framework.ajax.AjaxSource;
import org.ajax4jsf.framework.util.message.Messages;
import com.sun.facelets.FaceletContext;
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/jsp/AjaxListenerTag.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/jsp/AjaxListenerTag.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/jsp/AjaxListenerTag.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -30,9 +30,9 @@
import javax.servlet.jsp.tagext.Tag;
import javax.servlet.jsp.tagext.TagSupport;
-import org.ajax4jsf.framework.ajax.AjaxListener;
+import org.ajax4jsf.event.AjaxListener;
+import org.ajax4jsf.event.AjaxSource;
import org.ajax4jsf.framework.ajax.AjaxListenerHelper;
-import org.ajax4jsf.framework.ajax.AjaxSource;
import org.ajax4jsf.framework.util.message.Messages;
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/jsp/AjaxRegionTag.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/jsp/AjaxRegionTag.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/jsp/AjaxRegionTag.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -26,7 +26,7 @@
import org.ajax4jsf.ajax.UIAjaxRegion;
import org.ajax4jsf.component.AjaxContainer;
-import org.ajax4jsf.framework.ajax.AjaxListener;
+import org.ajax4jsf.event.AjaxListener;
import org.ajax4jsf.framework.taglib.UIComponentTagBase;
import org.ajax4jsf.framework.util.message.Messages;
import org.ajax4jsf.renderkit.html.AjaxRegionRenderer;
Modified: trunk/ui/drag-drop/src/main/java/org/richfaces/component/UIDragSupport.java
===================================================================
--- trunk/ui/drag-drop/src/main/java/org/richfaces/component/UIDragSupport.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/ui/drag-drop/src/main/java/org/richfaces/component/UIDragSupport.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -28,9 +28,9 @@
import javax.faces.event.PhaseId;
import org.ajax4jsf.component.AjaxActionComponent;
+import org.ajax4jsf.event.AjaxEvent;
import org.ajax4jsf.event.DragEvent;
import org.ajax4jsf.event.DragListener;
-import org.ajax4jsf.framework.ajax.AjaxEvent;
/**
* JSF component class
Modified: trunk/ui/drag-drop/src/main/java/org/richfaces/component/UIDropSupport.java
===================================================================
--- trunk/ui/drag-drop/src/main/java/org/richfaces/component/UIDropSupport.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/ui/drag-drop/src/main/java/org/richfaces/component/UIDropSupport.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -28,9 +28,9 @@
import javax.faces.event.PhaseId;
import org.ajax4jsf.component.AjaxActionComponent;
+import org.ajax4jsf.event.AjaxEvent;
import org.ajax4jsf.event.DropEvent;
import org.ajax4jsf.event.DropListener;
-import org.ajax4jsf.framework.ajax.AjaxEvent;
/**
* JSF component class
Modified: trunk/ui/menu-components/src/main/java/org/richfaces/component/UIMenuItem.java
===================================================================
--- trunk/ui/menu-components/src/main/java/org/richfaces/component/UIMenuItem.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/ui/menu-components/src/main/java/org/richfaces/component/UIMenuItem.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -25,7 +25,7 @@
import org.ajax4jsf.component.AjaxActionComponent;
import org.ajax4jsf.component.AjaxComponent;
-import org.ajax4jsf.framework.ajax.AjaxSource;
+import org.ajax4jsf.event.AjaxSource;
/**
Modified: trunk/ui/simpleTogglePanel/src/main/java/org/richfaces/component/UISimpleTogglePanel.java
===================================================================
--- trunk/ui/simpleTogglePanel/src/main/java/org/richfaces/component/UISimpleTogglePanel.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/ui/simpleTogglePanel/src/main/java/org/richfaces/component/UISimpleTogglePanel.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -23,7 +23,7 @@
import org.ajax4jsf.component.AjaxActionComponent;
import org.ajax4jsf.component.AjaxComponent;
-import org.ajax4jsf.framework.ajax.AjaxSource;
+import org.ajax4jsf.event.AjaxSource;
import javax.faces.component.ActionSource;
import javax.faces.el.ValueBinding;
Modified: trunk/ui/suggestionbox/src/main/java/org/richfaces/component/AjaxSuggestionEvent.java
===================================================================
--- trunk/ui/suggestionbox/src/main/java/org/richfaces/component/AjaxSuggestionEvent.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/ui/suggestionbox/src/main/java/org/richfaces/component/AjaxSuggestionEvent.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -21,7 +21,7 @@
package org.richfaces.component;
-import org.ajax4jsf.framework.ajax.AjaxEvent;
+import org.ajax4jsf.event.AjaxEvent;
import javax.faces.component.UIComponent;
Modified: trunk/ui/suggestionbox/src/main/java/org/richfaces/component/UISuggestionBox.java
===================================================================
--- trunk/ui/suggestionbox/src/main/java/org/richfaces/component/UISuggestionBox.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/ui/suggestionbox/src/main/java/org/richfaces/component/UISuggestionBox.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -23,9 +23,9 @@
import org.ajax4jsf.component.AjaxComponent;
import org.ajax4jsf.context.AjaxContext;
-import org.ajax4jsf.framework.ajax.AjaxEvent;
-import org.ajax4jsf.framework.ajax.AjaxListener;
-import org.ajax4jsf.framework.ajax.AjaxSource;
+import org.ajax4jsf.event.AjaxEvent;
+import org.ajax4jsf.event.AjaxListener;
+import org.ajax4jsf.event.AjaxSource;
import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
Modified: trunk/ui/tabPanel/src/main/java/org/richfaces/component/UITab.java
===================================================================
--- trunk/ui/tabPanel/src/main/java/org/richfaces/component/UITab.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/ui/tabPanel/src/main/java/org/richfaces/component/UITab.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -23,7 +23,7 @@
import org.ajax4jsf.component.AjaxActionComponent;
import org.ajax4jsf.component.AjaxComponent;
-import org.ajax4jsf.framework.ajax.AjaxSource;
+import org.ajax4jsf.event.AjaxSource;
import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
import javax.faces.FacesException;
Modified: trunk/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabPanelRendererBase.java
===================================================================
--- trunk/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabPanelRendererBase.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabPanelRendererBase.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -21,7 +21,7 @@
package org.richfaces.renderkit;
-import org.ajax4jsf.framework.ajax.AjaxEvent;
+import org.ajax4jsf.event.AjaxEvent;
import org.ajax4jsf.framework.renderer.ComponentVariables;
import org.ajax4jsf.framework.renderer.ComponentsVariableResolver;
import org.ajax4jsf.framework.renderer.RendererUtils.HTML;
Modified: trunk/ui/togglePanel/src/main/java/org/richfaces/component/UIToggleControl.java
===================================================================
--- trunk/ui/togglePanel/src/main/java/org/richfaces/component/UIToggleControl.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/ui/togglePanel/src/main/java/org/richfaces/component/UIToggleControl.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -33,7 +33,7 @@
import org.ajax4jsf.component.AjaxActionComponent;
import org.ajax4jsf.component.AjaxComponent;
-import org.ajax4jsf.framework.ajax.AjaxSource;
+import org.ajax4jsf.event.AjaxSource;
import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
import org.ajax4jsf.framework.renderer.RendererUtils;
Modified: trunk/ui/tree/src/main/java/org/richfaces/component/TreeListenersTagHandler.java
===================================================================
--- trunk/ui/tree/src/main/java/org/richfaces/component/TreeListenersTagHandler.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/ui/tree/src/main/java/org/richfaces/component/TreeListenersTagHandler.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -24,8 +24,8 @@
import javax.faces.component.UIComponent;
import javax.faces.el.MethodBinding;
-import org.richfaces.component.events.NodeExpandedEvent;
-import org.richfaces.component.events.NodeSelectedEvent;
+import org.richfaces.event.NodeExpandedEvent;
+import org.richfaces.event.NodeSelectedEvent;
import com.sun.facelets.FaceletContext;
import com.sun.facelets.tag.MetaRule;
Modified: trunk/ui/tree/src/main/java/org/richfaces/component/UITree.java
===================================================================
--- trunk/ui/tree/src/main/java/org/richfaces/component/UITree.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/ui/tree/src/main/java/org/richfaces/component/UITree.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -36,21 +36,17 @@
import javax.faces.event.PhaseId;
import org.ajax4jsf.ajax.repeat.UIDataAdaptor;
+import org.ajax4jsf.event.AjaxEvent;
import org.ajax4jsf.event.DragEvent;
import org.ajax4jsf.event.DragListener;
import org.ajax4jsf.event.DropEvent;
import org.ajax4jsf.event.DropListener;
-import org.ajax4jsf.framework.ajax.AjaxEvent;
import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
import org.ajax4jsf.model.DataComponentState;
import org.ajax4jsf.model.DataVisitor;
import org.ajax4jsf.model.ExtendedDataModel;
import org.ajax4jsf.model.Range;
import org.apache.commons.collections.iterators.SingletonIterator;
-import org.richfaces.component.events.NodeExpandedEvent;
-import org.richfaces.component.events.NodeExpandedListener;
-import org.richfaces.component.events.NodeSelectedEvent;
-import org.richfaces.component.events.NodeSelectedListener;
import org.richfaces.component.events.TreeEvents;
import org.richfaces.component.state.TreeState;
import org.richfaces.component.state.events.CollapseAllCommandEvent;
@@ -58,6 +54,10 @@
import org.richfaces.component.state.events.ExpandAllCommandEvent;
import org.richfaces.component.state.events.ExpandNodeCommandEvent;
import org.richfaces.component.state.events.TreeStateCommandEvent;
+import org.richfaces.event.NodeExpandedEvent;
+import org.richfaces.event.NodeExpandedListener;
+import org.richfaces.event.NodeSelectedEvent;
+import org.richfaces.event.NodeSelectedListener;
import org.richfaces.event.TreeListenerEventsProducer;
import org.richfaces.model.AbstractTreeDataModel;
import org.richfaces.model.TreeDataModel;
Modified: trunk/ui/tree/src/main/java/org/richfaces/component/UITreeNode.java
===================================================================
--- trunk/ui/tree/src/main/java/org/richfaces/component/UITreeNode.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/ui/tree/src/main/java/org/richfaces/component/UITreeNode.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -12,15 +12,15 @@
import javax.faces.event.AbortProcessingException;
import javax.faces.event.FacesEvent;
+import org.ajax4jsf.event.AjaxEvent;
import org.ajax4jsf.event.DragEvent;
import org.ajax4jsf.event.DragListener;
import org.ajax4jsf.event.DropEvent;
import org.ajax4jsf.event.DropListener;
-import org.ajax4jsf.framework.ajax.AjaxEvent;
import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
-import org.richfaces.component.events.NodeExpandedListener;
-import org.richfaces.component.events.NodeSelectedListener;
import org.richfaces.component.events.TreeEvents;
+import org.richfaces.event.NodeExpandedListener;
+import org.richfaces.event.NodeSelectedListener;
import org.richfaces.event.TreeListenerEventsProducer;
/**
Modified: trunk/ui/tree/src/main/java/org/richfaces/component/events/TreeEvents.java
===================================================================
--- trunk/ui/tree/src/main/java/org/richfaces/component/events/TreeEvents.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/ui/tree/src/main/java/org/richfaces/component/events/TreeEvents.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -26,9 +26,12 @@
import javax.faces.event.AbortProcessingException;
import javax.faces.event.FacesEvent;
+import org.ajax4jsf.event.AjaxEvent;
import org.ajax4jsf.event.DragEvent;
import org.ajax4jsf.event.DropEvent;
-import org.ajax4jsf.framework.ajax.AjaxEvent;
+import org.richfaces.event.AjaxSelectedEvent;
+import org.richfaces.event.NodeExpandedEvent;
+import org.richfaces.event.NodeSelectedEvent;
import org.richfaces.event.TreeListenerEventsProducer;
/**
Modified: trunk/ui/tree/src/main/java/org/richfaces/renderkit/NodeRendererBase.java
===================================================================
--- trunk/ui/tree/src/main/java/org/richfaces/renderkit/NodeRendererBase.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/ui/tree/src/main/java/org/richfaces/renderkit/NodeRendererBase.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -21,13 +21,13 @@
import org.richfaces.component.Dropzone;
import org.richfaces.component.UITree;
import org.richfaces.component.UITreeNode;
-import org.richfaces.component.events.AjaxSelectedEvent;
-import org.richfaces.component.events.NodeExpandedEvent;
-import org.richfaces.component.events.NodeSelectedEvent;
import org.richfaces.component.state.TreeState;
import org.richfaces.component.state.events.CollapseNodeCommandEvent;
import org.richfaces.component.state.events.ExpandNodeCommandEvent;
import org.richfaces.component.util.ViewUtil;
+import org.richfaces.event.AjaxSelectedEvent;
+import org.richfaces.event.NodeExpandedEvent;
+import org.richfaces.event.NodeSelectedEvent;
import org.richfaces.model.TreeRowKey;
/**
Modified: trunk/ui/tree/src/main/java/org/richfaces/taglib/TreeListenersTagHandler.java
===================================================================
--- trunk/ui/tree/src/main/java/org/richfaces/taglib/TreeListenersTagHandler.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/ui/tree/src/main/java/org/richfaces/taglib/TreeListenersTagHandler.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -24,8 +24,8 @@
import javax.faces.component.UIComponent;
import javax.faces.el.MethodBinding;
-import org.richfaces.component.events.NodeExpandedEvent;
-import org.richfaces.component.events.NodeSelectedEvent;
+import org.richfaces.event.NodeExpandedEvent;
+import org.richfaces.event.NodeSelectedEvent;
import com.sun.facelets.FaceletContext;
import com.sun.facelets.tag.MetaRule;
Modified: trunk/ui/tree/src/test/java/org/richfaces/component/TreeComponentTest.java
===================================================================
--- trunk/ui/tree/src/test/java/org/richfaces/component/TreeComponentTest.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/ui/tree/src/test/java/org/richfaces/component/TreeComponentTest.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -48,12 +48,12 @@
import org.ajax4jsf.framework.util.image.ImageInfo;
import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
import org.apache.commons.lang.StringUtils;
-import org.richfaces.component.events.NodeExpandedEvent;
-import org.richfaces.component.events.NodeExpandedListener;
-import org.richfaces.component.events.NodeSelectedEvent;
-import org.richfaces.component.events.NodeSelectedListener;
import org.richfaces.component.state.events.ExpandAllCommandEvent;
import org.richfaces.component.xml.XmlTreeDataBuilder;
+import org.richfaces.event.NodeExpandedEvent;
+import org.richfaces.event.NodeExpandedListener;
+import org.richfaces.event.NodeSelectedEvent;
+import org.richfaces.event.NodeSelectedListener;
import org.xml.sax.InputSource;
import com.gargoylesoftware.htmlunit.Page;
@@ -330,7 +330,7 @@
/**
- * Test method for {@link org.richfaces.component.UITreeNode#addChangeExpandListener(org.richfaces.component.events.NodeExpandedListener)}.
+ * Test method for {@link org.richfaces.component.UITreeNode#addChangeExpandListener(org.richfaces.event.NodeExpandedListener)}.
*/
public final void testAddChangeExpandListener() {
NodeExpandedListener listener = new NodeExpandedListener() {
@@ -360,7 +360,7 @@
}
/**
- * Test method for {@link org.richfaces.component.UITreeNode#addNodeSelectListener(org.richfaces.component.events.NodeSelectedListener)}.
+ * Test method for {@link org.richfaces.component.UITreeNode#addNodeSelectListener(org.richfaces.event.NodeSelectedListener)}.
*/
public final void testAddNodeSelectListener() {
NodeSelectedListener listener = new NodeSelectedListener() {
Modified: trunk/ui/tree/src/test/java/org/richfaces/component/events/TreeEventsListenersTest.java
===================================================================
--- trunk/ui/tree/src/test/java/org/richfaces/component/events/TreeEventsListenersTest.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/ui/tree/src/test/java/org/richfaces/component/events/TreeEventsListenersTest.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -26,6 +26,11 @@
import javax.faces.event.FacesEvent;
import javax.faces.event.FacesListener;
+import org.richfaces.event.NodeExpandedEvent;
+import org.richfaces.event.NodeExpandedListener;
+import org.richfaces.event.NodeSelectedEvent;
+import org.richfaces.event.NodeSelectedListener;
+
import junit.framework.TestCase;
/**
Modified: trunk/ui/tree/src/test/java/org/richfaces/component/events/TreeEventsTest.java
===================================================================
--- trunk/ui/tree/src/test/java/org/richfaces/component/events/TreeEventsTest.java 2007-07-03 21:59:20 UTC (rev 1453)
+++ trunk/ui/tree/src/test/java/org/richfaces/component/events/TreeEventsTest.java 2007-07-03 22:03:50 UTC (rev 1454)
@@ -34,6 +34,9 @@
import org.apache.commons.collections.Buffer;
import org.richfaces.component.UITree;
import org.richfaces.component.UITreeNode;
+import org.richfaces.event.AjaxSelectedEvent;
+import org.richfaces.event.NodeExpandedEvent;
+import org.richfaces.event.NodeSelectedEvent;
/**
* @author Nick - mailto:nbelaevski@exadel.com
17 years, 4 months
JBoss Rich Faces SVN: r1453 - in trunk/framework: api/src/main/java/org/ajax4jsf/application and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2007-07-03 17:59:20 -0400 (Tue, 03 Jul 2007)
New Revision: 1453
Added:
trunk/framework/api/src/main/java/org/ajax4jsf/application/
trunk/framework/api/src/main/java/org/ajax4jsf/application/ViewHandlerWrapper.java
Removed:
trunk/framework/api/src/main/java/org/ajax4jsf/framework/ViewHandlerWrapper.java
Modified:
trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxViewHandler.java
Log:
packages and classes refactor
Copied: trunk/framework/api/src/main/java/org/ajax4jsf/application/ViewHandlerWrapper.java (from rev 1451, trunk/framework/api/src/main/java/org/ajax4jsf/framework/ViewHandlerWrapper.java)
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/application/ViewHandlerWrapper.java (rev 0)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/application/ViewHandlerWrapper.java 2007-07-03 21:59:20 UTC (rev 1453)
@@ -0,0 +1,172 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.application;
+
+import java.io.IOException;
+import java.lang.reflect.Constructor;
+import java.util.Locale;
+
+import javax.faces.FacesException;
+import javax.faces.application.ViewHandler;
+import javax.faces.component.UIViewRoot;
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.framework.util.message.Messages;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * Base wrapper for {@link javax.faces.application.ViewHandler} . By default, delegate all
+ * method calls to wrapped handler.
+ * @author asmirnov(a)exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:12 $
+ *
+ */
+public class ViewHandlerWrapper extends ViewHandler {
+ private static final String HANDLERS = "org.ajax4jsf.VIEW_HANDLERS";
+
+ private static final Log _log = LogFactory.getLog(ViewHandlerWrapper.class);
+
+ /**
+ * Wrapped ViewHandler
+ */
+ protected ViewHandler _handler;
+
+ private boolean _initialized = false;
+
+ /**
+ * @param handler - to wrap.
+ */
+ public ViewHandlerWrapper(ViewHandler handler) {
+ _handler = handler;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.application.ViewHandler#calculateLocale(javax.faces.context.FacesContext)
+ */
+ public Locale calculateLocale(FacesContext context) {
+ fillChain(context);
+ return _handler.calculateLocale(context);
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.application.ViewHandler#calculateRenderKitId(javax.faces.context.FacesContext)
+ */
+ public String calculateRenderKitId(FacesContext context) {
+ fillChain(context);
+ return _handler.calculateRenderKitId(context);
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.application.ViewHandler#createView(javax.faces.context.FacesContext, java.lang.String)
+ */
+ public UIViewRoot createView(FacesContext context, String viewId) {
+ fillChain(context);
+ return _handler.createView(context, viewId);
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.application.ViewHandler#getActionURL(javax.faces.context.FacesContext, java.lang.String)
+ */
+ public String getActionURL(FacesContext context, String url) {
+ fillChain(context);
+ return _handler.getActionURL(context, url);
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.application.ViewHandler#getResourceURL(javax.faces.context.FacesContext, java.lang.String)
+ */
+ public String getResourceURL(FacesContext context, String url) {
+ fillChain(context);
+ return _handler.getResourceURL(context, url);
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.application.ViewHandler#renderView(javax.faces.context.FacesContext, javax.faces.component.UIViewRoot)
+ */
+ public void renderView(FacesContext context, UIViewRoot root) throws IOException, FacesException {
+ fillChain(context);
+ _handler.renderView(context, root);
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.application.ViewHandler#restoreView(javax.faces.context.FacesContext, java.lang.String)
+ */
+ public UIViewRoot restoreView(FacesContext context, String viewId) {
+ fillChain(context);
+ return _handler.restoreView(context, viewId);
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.application.ViewHandler#writeState(javax.faces.context.FacesContext)
+ */
+ public void writeState(FacesContext context) throws IOException {
+ fillChain(context);
+ _handler.writeState(context);
+ }
+
+ /**
+ * @return Returns the handler.
+ */
+ protected ViewHandler getHandler() {
+ return _handler;
+ }
+
+ /**
+ * Fill view-handlers chain for alternate handlers.
+ * @param context
+ */
+ synchronized protected void fillChain( FacesContext context){
+ if(!_initialized){
+ _initialized = true;
+ String handlers = context.getExternalContext().getInitParameter(HANDLERS);
+ if(null != handlers){
+ ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
+ String[] classes = handlers.split(",");
+ for (int i = 0; i < classes.length; i++) {
+ String handlerClass = classes[i];
+ if (_log.isDebugEnabled()) {
+ _log.debug(Messages.getMessage(Messages.CREATE_ALTERNATE_HANDLER, handlerClass));
+ }
+ try {
+ Class clazz = classLoader.loadClass(handlerClass);
+ try {
+ Constructor constructor = clazz
+ .getConstructor(new Class[] { ViewHandler.class });
+ _handler = (ViewHandler) constructor
+ .newInstance(new Object[] { _handler });
+ } catch (NoSuchMethodException e) {
+ // No constructor with parent class - create simple instance
+ if (_log.isWarnEnabled()) {
+ _log.warn(Messages.getMessage(Messages.ALTERNATE_HANDLER_CONSTRUCTOR_WARNING));
+ }
+ _handler = (ViewHandler) clazz.newInstance();
+ }
+ } catch (Exception e) {
+ _log.error(Messages.getMessage(Messages.VIEW_HANDLER_INSTANTIATION_ERROR), e);
+ }
+ }
+ }
+ }
+ }
+
+}
Deleted: trunk/framework/api/src/main/java/org/ajax4jsf/framework/ViewHandlerWrapper.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/framework/ViewHandlerWrapper.java 2007-07-03 21:49:58 UTC (rev 1452)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/framework/ViewHandlerWrapper.java 2007-07-03 21:59:20 UTC (rev 1453)
@@ -1,172 +0,0 @@
-/**
- * License Agreement.
- *
- * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.ajax4jsf.framework;
-
-import java.io.IOException;
-import java.lang.reflect.Constructor;
-import java.util.Locale;
-
-import javax.faces.FacesException;
-import javax.faces.application.ViewHandler;
-import javax.faces.component.UIViewRoot;
-import javax.faces.context.FacesContext;
-
-import org.ajax4jsf.framework.util.message.Messages;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-/**
- * Base wrapper for {@link javax.faces.application.ViewHandler} . By default, delegate all
- * method calls to wrapped handler.
- * @author asmirnov(a)exadel.com (latest modification by $Author: alexsmirnov $)
- * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:12 $
- *
- */
-public class ViewHandlerWrapper extends ViewHandler {
- private static final String HANDLERS = "org.ajax4jsf.VIEW_HANDLERS";
-
- private static final Log _log = LogFactory.getLog(ViewHandlerWrapper.class);
-
- /**
- * Wrapped ViewHandler
- */
- protected ViewHandler _handler;
-
- private boolean _initialized = false;
-
- /**
- * @param handler - to wrap.
- */
- public ViewHandlerWrapper(ViewHandler handler) {
- _handler = handler;
- }
-
- /* (non-Javadoc)
- * @see javax.faces.application.ViewHandler#calculateLocale(javax.faces.context.FacesContext)
- */
- public Locale calculateLocale(FacesContext context) {
- fillChain(context);
- return _handler.calculateLocale(context);
- }
-
- /* (non-Javadoc)
- * @see javax.faces.application.ViewHandler#calculateRenderKitId(javax.faces.context.FacesContext)
- */
- public String calculateRenderKitId(FacesContext context) {
- fillChain(context);
- return _handler.calculateRenderKitId(context);
- }
-
- /* (non-Javadoc)
- * @see javax.faces.application.ViewHandler#createView(javax.faces.context.FacesContext, java.lang.String)
- */
- public UIViewRoot createView(FacesContext context, String viewId) {
- fillChain(context);
- return _handler.createView(context, viewId);
- }
-
- /* (non-Javadoc)
- * @see javax.faces.application.ViewHandler#getActionURL(javax.faces.context.FacesContext, java.lang.String)
- */
- public String getActionURL(FacesContext context, String url) {
- fillChain(context);
- return _handler.getActionURL(context, url);
- }
-
- /* (non-Javadoc)
- * @see javax.faces.application.ViewHandler#getResourceURL(javax.faces.context.FacesContext, java.lang.String)
- */
- public String getResourceURL(FacesContext context, String url) {
- fillChain(context);
- return _handler.getResourceURL(context, url);
- }
-
- /* (non-Javadoc)
- * @see javax.faces.application.ViewHandler#renderView(javax.faces.context.FacesContext, javax.faces.component.UIViewRoot)
- */
- public void renderView(FacesContext context, UIViewRoot root) throws IOException, FacesException {
- fillChain(context);
- _handler.renderView(context, root);
- }
-
- /* (non-Javadoc)
- * @see javax.faces.application.ViewHandler#restoreView(javax.faces.context.FacesContext, java.lang.String)
- */
- public UIViewRoot restoreView(FacesContext context, String viewId) {
- fillChain(context);
- return _handler.restoreView(context, viewId);
- }
-
- /* (non-Javadoc)
- * @see javax.faces.application.ViewHandler#writeState(javax.faces.context.FacesContext)
- */
- public void writeState(FacesContext context) throws IOException {
- fillChain(context);
- _handler.writeState(context);
- }
-
- /**
- * @return Returns the handler.
- */
- protected ViewHandler getHandler() {
- return _handler;
- }
-
- /**
- * Fill view-handlers chain for alternate handlers.
- * @param context
- */
- synchronized protected void fillChain( FacesContext context){
- if(!_initialized){
- _initialized = true;
- String handlers = context.getExternalContext().getInitParameter(HANDLERS);
- if(null != handlers){
- ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
- String[] classes = handlers.split(",");
- for (int i = 0; i < classes.length; i++) {
- String handlerClass = classes[i];
- if (_log.isDebugEnabled()) {
- _log.debug(Messages.getMessage(Messages.CREATE_ALTERNATE_HANDLER, handlerClass));
- }
- try {
- Class clazz = classLoader.loadClass(handlerClass);
- try {
- Constructor constructor = clazz
- .getConstructor(new Class[] { ViewHandler.class });
- _handler = (ViewHandler) constructor
- .newInstance(new Object[] { _handler });
- } catch (NoSuchMethodException e) {
- // No constructor with parent class - create simple instance
- if (_log.isWarnEnabled()) {
- _log.warn(Messages.getMessage(Messages.ALTERNATE_HANDLER_CONSTRUCTOR_WARNING));
- }
- _handler = (ViewHandler) clazz.newInstance();
- }
- } catch (Exception e) {
- _log.error(Messages.getMessage(Messages.VIEW_HANDLER_INSTANTIATION_ERROR), e);
- }
- }
- }
- }
- }
-
-}
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxViewHandler.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxViewHandler.java 2007-07-03 21:49:58 UTC (rev 1452)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxViewHandler.java 2007-07-03 21:59:20 UTC (rev 1453)
@@ -32,8 +32,8 @@
import javax.faces.context.ResponseWriter;
import javax.servlet.http.HttpServletResponse;
+import org.ajax4jsf.application.ViewHandlerWrapper;
import org.ajax4jsf.context.AjaxContext;
-import org.ajax4jsf.framework.ViewHandlerWrapper;
import org.ajax4jsf.framework.renderer.AjaxContainerRenderer;
import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
import org.ajax4jsf.framework.renderer.RendererUtils.HTML;
17 years, 4 months
JBoss Rich Faces SVN: r1451 - in trunk: framework/api/src/main/java/org/ajax4jsf/ajax and 25 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2007-07-03 17:46:38 -0400 (Tue, 03 Jul 2007)
New Revision: 1451
Added:
trunk/framework/api/src/main/java/org/ajax4jsf/event/
trunk/framework/api/src/main/java/org/ajax4jsf/event/DragEvent.java
trunk/framework/api/src/main/java/org/ajax4jsf/event/DragListener.java
trunk/framework/api/src/main/java/org/ajax4jsf/event/DropEvent.java
trunk/framework/api/src/main/java/org/ajax4jsf/event/DropListener.java
trunk/framework/api/src/main/java/org/ajax4jsf/event/DropListenerBinding.java
trunk/framework/api/src/main/java/org/ajax4jsf/event/DropSource.java
trunk/framework/api/src/main/java/org/ajax4jsf/event/PushEventListener.java
trunk/framework/api/src/main/java/org/richfaces/component/Draggable.java
trunk/framework/api/src/main/java/org/richfaces/component/Dropzone.java
trunk/framework/api/src/main/java/org/richfaces/event/TreeListenerEventsProducer.java
trunk/framework/api/src/main/java/org/richfaces/model/
trunk/framework/api/src/main/java/org/richfaces/model/AbstractTreeDataModel.java
trunk/framework/api/src/main/java/org/richfaces/model/CalendarDataModel.java
trunk/framework/api/src/main/java/org/richfaces/model/CalendarDataModelItem.java
trunk/framework/api/src/main/java/org/richfaces/model/LastElementAware.java
trunk/framework/api/src/main/java/org/richfaces/model/ListRowKey.java
trunk/framework/api/src/main/java/org/richfaces/model/TreeDataModel.java
trunk/framework/api/src/main/java/org/richfaces/model/TreeNode.java
trunk/framework/api/src/main/java/org/richfaces/model/TreeNodeImpl.java
trunk/framework/api/src/main/java/org/richfaces/model/TreeRange.java
trunk/framework/api/src/main/java/org/richfaces/model/TreeRowKey.java
Removed:
trunk/framework/api/src/main/java/org/ajax4jsf/ajax/PushEventListener.java
trunk/framework/api/src/main/java/org/ajax4jsf/dnd/Draggable.java
trunk/framework/api/src/main/java/org/ajax4jsf/dnd/Dropzone.java
trunk/framework/api/src/main/java/org/ajax4jsf/dnd/event/DragEvent.java
trunk/framework/api/src/main/java/org/ajax4jsf/dnd/event/DragListener.java
trunk/framework/api/src/main/java/org/ajax4jsf/dnd/event/DropEvent.java
trunk/framework/api/src/main/java/org/ajax4jsf/dnd/event/DropListener.java
trunk/framework/api/src/main/java/org/ajax4jsf/dnd/event/DropListenerBinding.java
trunk/framework/api/src/main/java/org/ajax4jsf/dnd/event/DropSource.java
trunk/framework/api/src/main/java/org/richfaces/component/AbstractTreeDataModel.java
trunk/framework/api/src/main/java/org/richfaces/component/CalendarDataModel.java
trunk/framework/api/src/main/java/org/richfaces/component/CalendarDataModelItem.java
trunk/framework/api/src/main/java/org/richfaces/component/LastElementAware.java
trunk/framework/api/src/main/java/org/richfaces/component/ListRowKey.java
trunk/framework/api/src/main/java/org/richfaces/component/TreeDataModel.java
trunk/framework/api/src/main/java/org/richfaces/component/TreeListenerEventsProducer.java
trunk/framework/api/src/main/java/org/richfaces/component/TreeNode.java
trunk/framework/api/src/main/java/org/richfaces/component/TreeNodeImpl.java
trunk/framework/api/src/main/java/org/richfaces/component/TreeRowKey.java
trunk/framework/api/src/main/java/org/richfaces/component/state/TreeRange.java
Modified:
trunk/framework/impl/src/main/java/org/ajax4jsf/ajax/PushEventsCounter.java
trunk/framework/impl/src/main/java/org/ajax4jsf/dnd/taglib/DropSourceMetaRule.java
trunk/ui/dataTable/src/main/java/org/richfaces/component/UIDataTable.java
trunk/ui/drag-drop/src/main/config/component/dragSupport.xml
trunk/ui/drag-drop/src/main/config/component/dropSupport.xml
trunk/ui/drag-drop/src/main/java/org/richfaces/component/UIDragSupport.java
trunk/ui/drag-drop/src/main/java/org/richfaces/component/UIDropSupport.java
trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/DnDEventsExchangeMailer.java
trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/DnDParametersEncoder.java
trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/DnDValidator.java
trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/DraggableRendererContributor.java
trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/DropzoneRendererContributor.java
trunk/ui/drag-drop/src/main/java/org/richfaces/taglib/DragSupportHandler.java
trunk/ui/drag-drop/src/main/java/org/richfaces/taglib/DropListenerTag.java
trunk/ui/drag-drop/src/main/java/org/richfaces/taglib/DropSupportHandler.java
trunk/ui/tree/src/main/java/org/richfaces/component/CacheableTreeDataModel.java
trunk/ui/tree/src/main/java/org/richfaces/component/CacheableTreeRequestDataModel.java
trunk/ui/tree/src/main/java/org/richfaces/component/UITree.java
trunk/ui/tree/src/main/java/org/richfaces/component/UITreeNode.java
trunk/ui/tree/src/main/java/org/richfaces/component/events/TreeEvents.java
trunk/ui/tree/src/main/java/org/richfaces/component/state/TreeState.java
trunk/ui/tree/src/main/java/org/richfaces/component/state/events/CollapseNodeCommandEvent.java
trunk/ui/tree/src/main/java/org/richfaces/component/state/events/ExpandNodeCommandEvent.java
trunk/ui/tree/src/main/java/org/richfaces/component/state/events/TreeStateCommandNodeEvent.java
trunk/ui/tree/src/main/java/org/richfaces/component/state/events/TreeStateCommandsListener.java
trunk/ui/tree/src/main/java/org/richfaces/component/xml/XmlTreeDataBuilder.java
trunk/ui/tree/src/main/java/org/richfaces/renderkit/NodeRendererBase.java
trunk/ui/tree/src/main/java/org/richfaces/renderkit/TreeDataModelEventNavigator.java
trunk/ui/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java
trunk/ui/tree/src/test/java/org/richfaces/component/ListRowKeyTest.java
trunk/ui/tree/src/test/java/org/richfaces/component/TreeComponentTest.java
trunk/ui/tree/src/test/java/org/richfaces/component/TreeModelTest.java
trunk/ui/tree/src/test/java/org/richfaces/component/TreeNodeTest.java
trunk/ui/tree/src/test/java/org/richfaces/component/events/TreeEventsTest.java
trunk/ui/tree/src/test/java/org/richfaces/component/state/events/CollapseNodeCommandEventTest.java
trunk/ui/tree/src/test/java/org/richfaces/component/state/events/ExpandNodeCommandEventTest.java
trunk/ui/tree/src/test/java/org/richfaces/component/state/events/MockTreeStateCommandsListener.java
trunk/ui/tree/src/test/java/org/richfaces/component/xml/TreeDataBuilderTest.java
Log:
packages and classes refactor
Deleted: trunk/framework/api/src/main/java/org/ajax4jsf/ajax/PushEventListener.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/ajax/PushEventListener.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/ajax/PushEventListener.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -1,10 +0,0 @@
-package org.ajax4jsf.ajax;
-
-import java.util.EventListener;
-import java.util.EventObject;
-
-public interface PushEventListener extends EventListener {
-
- public void onEvent(EventObject event);
-
-}
Deleted: trunk/framework/api/src/main/java/org/ajax4jsf/dnd/Draggable.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/dnd/Draggable.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/dnd/Draggable.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -1,108 +0,0 @@
-/**
- * License Agreement.
- *
- * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.ajax4jsf.dnd;
-
-import javax.faces.el.MethodBinding;
-
-import org.ajax4jsf.dnd.event.DragListener;
-
-
-/**
- * Interface for all draggable components. Describe bean properties, implemented by component.
- * @author shura
- *
- */
-public interface Draggable {
-
- /**
- * Getter for value parameter, used as key for draggable component.
- * @return
- */
- public Object getDragValue();
-
- public void setDragValue(Object value);
-
- /**
- * Getter for id of component ( instance of {@link UIDragIndicator} ) used for create drag cursor.
- * @return
- */
- public String getDragIndicator();
-
- /**
- * @param dragIndicator - id of cursor component
- */
- public void setDragIndicator(String dragIndicator);
-
-
- /**
- * Getter for type of this draggable ( file, mail etc ).
- * @return
- */
- public String getDragType();
-
- /**
- * @param dragType
- */
- public void setDragType(String dragType);
-
- /**
- * Getter for JavaScript event handler, called before start drag operation.
- * If this handler return false, drag operation is cancelled.
- * @return javaScript code of event handler.
- */
- public String getOndragstart();
-
- /**
- * @param dragType
- */
- public void setOndragstart(String ondrag);
-
- /**
- *
- * @return
- */
- public String getOndragend();
- public void setOndragend(String ondrag);
-
-
- /**
- * Append drag listener to component listeners collection
- * @param listener
- */
- public void addDragListener(DragListener listener);
-
- /**
- * Get array of all Drop Listeners
- * @return
- */
- public DragListener[] getDragListeners();
-
- /**
- * Remove drop listener from component listeners array.
- * @param listener
- */
- public void removeDragListener(DragListener listener);
-
- public void setDragListener(MethodBinding binding);
- public MethodBinding getDragListener();
-
-}
Deleted: trunk/framework/api/src/main/java/org/ajax4jsf/dnd/Dropzone.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/dnd/Dropzone.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/dnd/Dropzone.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -1,101 +0,0 @@
-/**
- * License Agreement.
- *
- * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.ajax4jsf.dnd;
-
-import org.ajax4jsf.dnd.event.DropSource;
-
-/**
- * Base interface for all components, accesible as drop zone.
- * @author shura
- *
- */
-public interface Dropzone extends DropSource {
-
- /**
- * Getter for dropType's , accepted by this zone.
- * @return
- */
- public Object getAcceptedTypes();
-
- public void setAcceptedTypes(Object types);
-
- /**
- * Getter for mapping between drop types and indicator states.
- * @return
- */
- public Object getTypeMapping();
-
- public void setTypeMapping(Object types);
- /**
- * Getter for JavaScript event handler, called then drag curcor enter in component area.
- * If this handler return false, or "declined", drop operation on this component not allowed.
- * If handler return true or "allowed" , or any other supported indicator states, drop operation
- * is allowed and corresponding indicator state will be displayed.
- * @return javaScript code of event handler.
- */
- public String getOndragenter();
-
- /**
- * @param dragType
- */
- public void setOndragenter(String ondrag);
-
- /**
- * Getter for JavaScript event handler, called before drag cursor leave component area.
- * @return javaScript code of event handler.
- */
- public String getOndragexit();
-
- /**
- * @param dragType
- */
- public void setOndragexit(String ondrag);
-
- public Object getDropValue();
-
- public void setDropValue(Object o);
-
- /**
- * Javascript code called before drop event.
- * @parameter
- * @return the acceptClass
- */
- public abstract String getOndrop();
-
- /**
- * @param newOndrop the value to set
- */
- public abstract void setOndrop(String newOndrop);
-
- /**
- * Javascript handler for event fired on drop even the drop for given type is not available
- * @parameter
- * @return the acceptClass
- */
- public abstract String getOndropend();
-
- /**
- * @param newname the value to set
- */
- public abstract void setOndropend(String ondropend);
-
-}
Deleted: trunk/framework/api/src/main/java/org/ajax4jsf/dnd/event/DragEvent.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/dnd/event/DragEvent.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/dnd/event/DragEvent.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -1,103 +0,0 @@
-/**
- * License Agreement.
- *
- * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.ajax4jsf.dnd.event;
-
-import javax.faces.component.UIComponent;
-import javax.faces.event.FacesEvent;
-import javax.faces.event.FacesListener;
-
-import org.ajax4jsf.dnd.Draggable;
-import org.ajax4jsf.dnd.Dropzone;
-
-/**
- * @author Nick Belaevski - nbelaevski(a)exadel.com
- * created 27.12.2006
- *
- */
-public class DragEvent extends FacesEvent {
-
- private Dropzone dropTarget;
- private Object acceptedTypes;
- private Object dropValue;
- /**
- *
- */
- private static final long serialVersionUID = 6179268394391836905L;
-
- public DragEvent(UIComponent uiComponent) {
- super(uiComponent);
- }
-
- /* (non-Javadoc)
- * @see javax.faces.event.FacesEvent#isAppropriateListener(javax.faces.event.FacesListener)
- */
- public boolean isAppropriateListener(FacesListener faceslistener) {
- return faceslistener instanceof DragListener;
- }
-
- /* (non-Javadoc)
- * @see javax.faces.event.FacesEvent#processListener(javax.faces.event.FacesListener)
- */
- public void processListener(FacesListener faceslistener) {
- ((DragListener) faceslistener).processDrag(this);
- }
-
- public Object getDragValue() {
- return ((Draggable) this.getSource()).getDragValue();
- }
-
- public Dropzone getDropTarget() {
- return dropTarget;
- }
-
- /**
- * @see java.util.EventObject#toString()
- */
-/* public String toString() {
- return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).
- append("component", getComponent()).append("source", getSource()).append("phaseId", getPhaseId()).
- append("dragValue", getDragValue()).
- append("dropTarget", getDropTarget()).
- append("dropValue", getDropValue()).
- toString();
- }
-*/
- public void setDropTarget(Dropzone dropTarget) {
- this.dropTarget = dropTarget;
- }
-
- public Object getAcceptedTypes() {
- return acceptedTypes;
- }
-
- public void setAcceptedTypes(Object acceptedTypes) {
- this.acceptedTypes = acceptedTypes;
- }
-
- public Object getDropValue() {
- return dropValue;
- }
-
- public void setDropValue(Object dropValue) {
- this.dropValue = dropValue;
- }
-}
Deleted: trunk/framework/api/src/main/java/org/ajax4jsf/dnd/event/DragListener.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/dnd/event/DragListener.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/dnd/event/DragListener.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -1,34 +0,0 @@
-/**
- * License Agreement.
- *
- * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.ajax4jsf.dnd.event;
-
-import javax.faces.event.FacesListener;
-
-/**
- * @author Nick Belaevski - nbelaevski(a)exadel.com
- * created 27.12.2006
- *
- */
-public interface DragListener extends FacesListener {
- public void processDrag(DragEvent event);
-
-}
Deleted: trunk/framework/api/src/main/java/org/ajax4jsf/dnd/event/DropEvent.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/dnd/event/DropEvent.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/dnd/event/DropEvent.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -1,113 +0,0 @@
-/**
- * License Agreement.
- *
- * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.ajax4jsf.dnd.event;
-
-import javax.faces.component.UIComponent;
-import javax.faces.event.FacesEvent;
-import javax.faces.event.FacesListener;
-
-import org.ajax4jsf.dnd.Draggable;
-import org.ajax4jsf.dnd.Dropzone;
-
-/**
- * @author shura
- *
- */
-public class DropEvent extends FacesEvent {
-
- /**
- *
- */
- private static final long serialVersionUID = 1660545054556302746L;
-
- private Draggable draggableSource;
- private String dragType;
- private Object dragValue;
-
- public DropEvent(UIComponent component) {
- super(component);
- }
-
- /* (non-Javadoc)
- * @see javax.faces.event.FacesEvent#isAppropriateListener(javax.faces.event.FacesListener)
- */
- public boolean isAppropriateListener(FacesListener listener) {
-
- return listener instanceof DropListener;
- }
-
- /* (non-Javadoc)
- * @see javax.faces.event.FacesEvent#processListener(javax.faces.event.FacesListener)
- */
- public void processListener(FacesListener listener) {
- if (listener instanceof DropListener) {
- DropListener dropListener = (DropListener) listener;
- dropListener.processDrop(this);
- }
-
- }
-
- /**
- * @return the dropValue
- */
- public Object getDropValue() {
- return ((Dropzone) this.getSource()).getDropValue();
- }
-
- public Draggable getDraggableSource() {
- return draggableSource;
- }
-
- /**
- * @see java.util.EventObject#toString()
- */
-/* public String toString() {
- return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).
- append("component", getComponent()).
- append("source", getSource()).
- append("phaseId", getPhaseId()).
- append("dropValue", getDropValue()).
- append("draggableSource", getDraggableSource()).
- append("dragValue", getDragValue()).
- toString();
- }
-*/
- public void setDraggableSource(Draggable draggableSource) {
- this.draggableSource = draggableSource;
- }
-
- public String getDragType() {
- return dragType;
- }
-
- public void setDragType(String dragType) {
- this.dragType = dragType;
- }
-
- public Object getDragValue() {
- return dragValue;
- }
-
- public void setDragValue(Object dragValue) {
- this.dragValue = dragValue;
- }
-}
Deleted: trunk/framework/api/src/main/java/org/ajax4jsf/dnd/event/DropListener.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/dnd/event/DropListener.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/dnd/event/DropListener.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -1,39 +0,0 @@
-/**
- * License Agreement.
- *
- * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.ajax4jsf.dnd.event;
-
-import javax.faces.event.FacesListener;
-
-/**
- * Listener for process Drop events
- * @author shura
- *
- */
-public interface DropListener extends FacesListener {
-
- /**
- * Process event on Drop for this component.
- * @param event
- */
- public void processDrop(DropEvent event);
-
-}
Deleted: trunk/framework/api/src/main/java/org/ajax4jsf/dnd/event/DropListenerBinding.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/dnd/event/DropListenerBinding.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/dnd/event/DropListenerBinding.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -1,104 +0,0 @@
-/**
- * License Agreement.
- *
- * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.ajax4jsf.dnd.event;
-
-import javax.faces.component.StateHolder;
-import javax.faces.component.UIComponentBase;
-import javax.faces.context.FacesContext;
-import javax.faces.el.ValueBinding;
-
-/**
- * Wrapper for bind DrolListener to EL expression.
- * @author shura
- *
- */
-public class DropListenerBinding implements DropListener, StateHolder {
-
- private ValueBinding _binding;
-
- private String _dragType;
-
- private ValueBinding _dragTypeBinding;
-
- private boolean _transient = false;
-
- public DropListenerBinding() {
- }
-
- /**
- * @param binding
- */
- public DropListenerBinding(ValueBinding binding) {
- super();
- _binding = binding;
- }
-
- private DropListener getHandler(FacesContext context) {
- return (DropListener) _binding.getValue(context);
- }
-
- public void processDrop(DropEvent event) {
- DropListener handler = getHandler(FacesContext.getCurrentInstance());
- handler.processDrop(event);
- }
-
- public boolean isTransient() {
- // TODO Auto-generated method stub
- return _transient;
- }
-
- public void restoreState(FacesContext context, Object state) {
- _binding = (ValueBinding) UIComponentBase.restoreAttachedState(context, state);
-
- }
-
- public Object saveState(FacesContext context) {
- return UIComponentBase.saveAttachedState(context, _binding);
- }
-
- public void setTransient(boolean newTransientValue) {
- _transient = newTransientValue;
-
- }
-
- /**
- * @return the dragType
- */
- public String getDragType() {
- return _dragType;
- }
-
- /**
- * @param dragType the dragType to set
- */
- public void setDragType(String dragType) {
- _dragType = dragType;
- }
-
- /**
- * @param dragTypeBinding the dragTypeBinding to set
- */
- public void setDragTypeBinding(ValueBinding dragTypeBinding) {
- _dragTypeBinding = dragTypeBinding;
- }
-
-}
Deleted: trunk/framework/api/src/main/java/org/ajax4jsf/dnd/event/DropSource.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/dnd/event/DropSource.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/dnd/event/DropSource.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -1,54 +0,0 @@
-/**
- * License Agreement.
- *
- * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.ajax4jsf.dnd.event;
-
-import javax.faces.el.MethodBinding;
-
-/**
- * Interface for component applicable to process drag/drop events.
- * @author shura
- *
- */
-public interface DropSource {
-
- /**
- * Append drop listener to component listeners collection
- * @param listener
- */
- public void addDropListener(DropListener listener);
-
- /**
- * Get array of all Drop Listeners
- * @return
- */
- public DropListener[] getDropListeners();
-
- /**
- * Remove drop listener from component listeners array.
- * @param listener
- */
- public void removeDropListener(DropListener listener);
-
- public void setDropListener(MethodBinding binding);
- public MethodBinding getDropListener();
-
-}
Copied: trunk/framework/api/src/main/java/org/ajax4jsf/event/DragEvent.java (from rev 1448, trunk/framework/api/src/main/java/org/ajax4jsf/dnd/event/DragEvent.java)
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/event/DragEvent.java (rev 0)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/event/DragEvent.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -0,0 +1,103 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.event;
+
+import javax.faces.component.UIComponent;
+import javax.faces.event.FacesEvent;
+import javax.faces.event.FacesListener;
+
+import org.richfaces.component.Draggable;
+import org.richfaces.component.Dropzone;
+
+/**
+ * @author Nick Belaevski - nbelaevski(a)exadel.com
+ * created 27.12.2006
+ *
+ */
+public class DragEvent extends FacesEvent {
+
+ private Dropzone dropTarget;
+ private Object acceptedTypes;
+ private Object dropValue;
+ /**
+ *
+ */
+ private static final long serialVersionUID = 6179268394391836905L;
+
+ public DragEvent(UIComponent uiComponent) {
+ super(uiComponent);
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.event.FacesEvent#isAppropriateListener(javax.faces.event.FacesListener)
+ */
+ public boolean isAppropriateListener(FacesListener faceslistener) {
+ return faceslistener instanceof DragListener;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.event.FacesEvent#processListener(javax.faces.event.FacesListener)
+ */
+ public void processListener(FacesListener faceslistener) {
+ ((DragListener) faceslistener).processDrag(this);
+ }
+
+ public Object getDragValue() {
+ return ((Draggable) this.getSource()).getDragValue();
+ }
+
+ public Dropzone getDropTarget() {
+ return dropTarget;
+ }
+
+ /**
+ * @see java.util.EventObject#toString()
+ */
+/* public String toString() {
+ return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).
+ append("component", getComponent()).append("source", getSource()).append("phaseId", getPhaseId()).
+ append("dragValue", getDragValue()).
+ append("dropTarget", getDropTarget()).
+ append("dropValue", getDropValue()).
+ toString();
+ }
+*/
+ public void setDropTarget(Dropzone dropTarget) {
+ this.dropTarget = dropTarget;
+ }
+
+ public Object getAcceptedTypes() {
+ return acceptedTypes;
+ }
+
+ public void setAcceptedTypes(Object acceptedTypes) {
+ this.acceptedTypes = acceptedTypes;
+ }
+
+ public Object getDropValue() {
+ return dropValue;
+ }
+
+ public void setDropValue(Object dropValue) {
+ this.dropValue = dropValue;
+ }
+}
Copied: trunk/framework/api/src/main/java/org/ajax4jsf/event/DragListener.java (from rev 1448, trunk/framework/api/src/main/java/org/ajax4jsf/dnd/event/DragListener.java)
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/event/DragListener.java (rev 0)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/event/DragListener.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -0,0 +1,34 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.event;
+
+import javax.faces.event.FacesListener;
+
+/**
+ * @author Nick Belaevski - nbelaevski(a)exadel.com
+ * created 27.12.2006
+ *
+ */
+public interface DragListener extends FacesListener {
+ public void processDrag(DragEvent event);
+
+}
Copied: trunk/framework/api/src/main/java/org/ajax4jsf/event/DropEvent.java (from rev 1448, trunk/framework/api/src/main/java/org/ajax4jsf/dnd/event/DropEvent.java)
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/event/DropEvent.java (rev 0)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/event/DropEvent.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -0,0 +1,113 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.event;
+
+import javax.faces.component.UIComponent;
+import javax.faces.event.FacesEvent;
+import javax.faces.event.FacesListener;
+
+import org.richfaces.component.Draggable;
+import org.richfaces.component.Dropzone;
+
+/**
+ * @author shura
+ *
+ */
+public class DropEvent extends FacesEvent {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1660545054556302746L;
+
+ private Draggable draggableSource;
+ private String dragType;
+ private Object dragValue;
+
+ public DropEvent(UIComponent component) {
+ super(component);
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.event.FacesEvent#isAppropriateListener(javax.faces.event.FacesListener)
+ */
+ public boolean isAppropriateListener(FacesListener listener) {
+
+ return listener instanceof DropListener;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.event.FacesEvent#processListener(javax.faces.event.FacesListener)
+ */
+ public void processListener(FacesListener listener) {
+ if (listener instanceof DropListener) {
+ DropListener dropListener = (DropListener) listener;
+ dropListener.processDrop(this);
+ }
+
+ }
+
+ /**
+ * @return the dropValue
+ */
+ public Object getDropValue() {
+ return ((Dropzone) this.getSource()).getDropValue();
+ }
+
+ public Draggable getDraggableSource() {
+ return draggableSource;
+ }
+
+ /**
+ * @see java.util.EventObject#toString()
+ */
+/* public String toString() {
+ return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).
+ append("component", getComponent()).
+ append("source", getSource()).
+ append("phaseId", getPhaseId()).
+ append("dropValue", getDropValue()).
+ append("draggableSource", getDraggableSource()).
+ append("dragValue", getDragValue()).
+ toString();
+ }
+*/
+ public void setDraggableSource(Draggable draggableSource) {
+ this.draggableSource = draggableSource;
+ }
+
+ public String getDragType() {
+ return dragType;
+ }
+
+ public void setDragType(String dragType) {
+ this.dragType = dragType;
+ }
+
+ public Object getDragValue() {
+ return dragValue;
+ }
+
+ public void setDragValue(Object dragValue) {
+ this.dragValue = dragValue;
+ }
+}
Copied: trunk/framework/api/src/main/java/org/ajax4jsf/event/DropListener.java (from rev 1448, trunk/framework/api/src/main/java/org/ajax4jsf/dnd/event/DropListener.java)
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/event/DropListener.java (rev 0)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/event/DropListener.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -0,0 +1,39 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.event;
+
+import javax.faces.event.FacesListener;
+
+/**
+ * Listener for process Drop events
+ * @author shura
+ *
+ */
+public interface DropListener extends FacesListener {
+
+ /**
+ * Process event on Drop for this component.
+ * @param event
+ */
+ public void processDrop(DropEvent event);
+
+}
Copied: trunk/framework/api/src/main/java/org/ajax4jsf/event/DropListenerBinding.java (from rev 1448, trunk/framework/api/src/main/java/org/ajax4jsf/dnd/event/DropListenerBinding.java)
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/event/DropListenerBinding.java (rev 0)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/event/DropListenerBinding.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -0,0 +1,104 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.event;
+
+import javax.faces.component.StateHolder;
+import javax.faces.component.UIComponentBase;
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+
+/**
+ * Wrapper for bind DrolListener to EL expression.
+ * @author shura
+ *
+ */
+public class DropListenerBinding implements DropListener, StateHolder {
+
+ private ValueBinding _binding;
+
+ private String _dragType;
+
+ private ValueBinding _dragTypeBinding;
+
+ private boolean _transient = false;
+
+ public DropListenerBinding() {
+ }
+
+ /**
+ * @param binding
+ */
+ public DropListenerBinding(ValueBinding binding) {
+ super();
+ _binding = binding;
+ }
+
+ private DropListener getHandler(FacesContext context) {
+ return (DropListener) _binding.getValue(context);
+ }
+
+ public void processDrop(DropEvent event) {
+ DropListener handler = getHandler(FacesContext.getCurrentInstance());
+ handler.processDrop(event);
+ }
+
+ public boolean isTransient() {
+ // TODO Auto-generated method stub
+ return _transient;
+ }
+
+ public void restoreState(FacesContext context, Object state) {
+ _binding = (ValueBinding) UIComponentBase.restoreAttachedState(context, state);
+
+ }
+
+ public Object saveState(FacesContext context) {
+ return UIComponentBase.saveAttachedState(context, _binding);
+ }
+
+ public void setTransient(boolean newTransientValue) {
+ _transient = newTransientValue;
+
+ }
+
+ /**
+ * @return the dragType
+ */
+ public String getDragType() {
+ return _dragType;
+ }
+
+ /**
+ * @param dragType the dragType to set
+ */
+ public void setDragType(String dragType) {
+ _dragType = dragType;
+ }
+
+ /**
+ * @param dragTypeBinding the dragTypeBinding to set
+ */
+ public void setDragTypeBinding(ValueBinding dragTypeBinding) {
+ _dragTypeBinding = dragTypeBinding;
+ }
+
+}
Copied: trunk/framework/api/src/main/java/org/ajax4jsf/event/DropSource.java (from rev 1448, trunk/framework/api/src/main/java/org/ajax4jsf/dnd/event/DropSource.java)
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/event/DropSource.java (rev 0)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/event/DropSource.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -0,0 +1,54 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.event;
+
+import javax.faces.el.MethodBinding;
+
+/**
+ * Interface for component applicable to process drag/drop events.
+ * @author shura
+ *
+ */
+public interface DropSource {
+
+ /**
+ * Append drop listener to component listeners collection
+ * @param listener
+ */
+ public void addDropListener(DropListener listener);
+
+ /**
+ * Get array of all Drop Listeners
+ * @return
+ */
+ public DropListener[] getDropListeners();
+
+ /**
+ * Remove drop listener from component listeners array.
+ * @param listener
+ */
+ public void removeDropListener(DropListener listener);
+
+ public void setDropListener(MethodBinding binding);
+ public MethodBinding getDropListener();
+
+}
Copied: trunk/framework/api/src/main/java/org/ajax4jsf/event/PushEventListener.java (from rev 1448, trunk/framework/api/src/main/java/org/ajax4jsf/ajax/PushEventListener.java)
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/event/PushEventListener.java (rev 0)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/event/PushEventListener.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -0,0 +1,10 @@
+package org.ajax4jsf.event;
+
+import java.util.EventListener;
+import java.util.EventObject;
+
+public interface PushEventListener extends EventListener {
+
+ public void onEvent(EventObject event);
+
+}
Deleted: trunk/framework/api/src/main/java/org/richfaces/component/AbstractTreeDataModel.java
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/component/AbstractTreeDataModel.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/framework/api/src/main/java/org/richfaces/component/AbstractTreeDataModel.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -1,138 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces 3.0 - 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.component;
-
-import java.io.IOException;
-
-import javax.faces.component.NamingContainer;
-import javax.faces.context.FacesContext;
-
-import org.ajax4jsf.model.DataVisitor;
-import org.ajax4jsf.model.ExtendedDataModel;
-import org.ajax4jsf.model.Range;
-import org.richfaces.component.state.TreeRange;
-
-/**
- * @author Nick Belaevski - nbelaevski(a)exadel.com created 07.12.2006
- * Base class for all tree data models
- */
-public abstract class AbstractTreeDataModel extends ExtendedDataModel {
- public final static char SEPARATOR = NamingContainer.SEPARATOR_CHAR;
-
- private TreeNode wrappedData;
-
- public final int getRowCount() {
- return -1;
- }
-
- public final int getRowIndex() {
- return -1;
- }
-
- public final void setRowIndex(int rowIndex) {
- if(rowIndex!=-1) {
- throw new IllegalArgumentException("In AbstractTreeDataModel rowIndex must be -1.");
- }
- }
-
- public final Object getWrappedData() {
- return wrappedData;
- }
-
- public final void setWrappedData(Object data) {
- wrappedData = (TreeNode) data;
- }
-
- public final void walk(FacesContext context, DataVisitor dataVisitor,
- Range range, Object argument) throws IOException {
- walk(context, dataVisitor, range, null, argument, false);
- }
-
- /**
- * walk sub-model having row key argument as its root
- * @param context faces context
- * @param dataVisitor {@link org.ajax4jsf.ajax.repeat.UIDataAdaptor.ComponentVisitor}
- * @param range {@link TreeRange} to constraint the walk
- * @param rowKey row key to treat as root of sub-model
- * @param argument implementation specific argument
- * @param last boolean flag indicating whether we started our walk from last element
- * @throws IOException
- *
- * @see {@link ExtendedDataModel#walk(FacesContext, DataVisitor, Range, Object)}
- */
- public abstract void walk(FacesContext context, DataVisitor dataVisitor,
- Range range, Object rowKey, Object argument, boolean last) throws IOException;
-
- /**
- * returns whether this node is leaf
- * @return
- */
- public abstract boolean isLeaf();
-
- /**
- * Walk backing sub-model having row key argument as its root. If there is no backing model
- * configured, calling this method is equivalent to calling {@link #walk(FacesContext, DataVisitor, Range, Object, Object, boolean)}
- * @param facesContext faces context
- * @param visitor {@link org.ajax4jsf.ajax.repeat.UIDataAdaptor.ComponentVisitor} instance
- * @param range {@link Range} to constraint the walk
- * @param key row key to treat as root of sub-model
- * @param argument implementation-specific argument
- * @throws IOException
- *
- * @see {@link #walk(FacesContext, DataVisitor, Range, TreeRowKey, Object, boolean)}
- */
- public abstract void walkModel(FacesContext facesContext, DataVisitor visitor, Range range, Object key, Object argument, boolean last) throws IOException;
-
- /**
- * Processes concrete tree node. Knows about {@link LastElementAware} interface and handles it
- * properly. Checks if argument is instance of {@link SubTreeChildrenAppender} and if it is so
- * does appending current element
- * @param context
- * @param dataVisitor
- * @param argument
- * @param treeRowKey
- * @param last
- * @throws IOException
- */
- protected void processElement(FacesContext context, DataVisitor dataVisitor, Object argument, TreeRowKey treeRowKey, boolean last) throws IOException {
-// if (argument instanceof SubTreeChildrenAppender) {
-// setRowKey(treeRowKey);
-//
-// if (isRowAvailable()) {
-// ((SubTreeChildrenAppender) argument).addChild(treeRowKey, getRowData(), last, isLeaf(), getTreeNodeType());
-// }
-// }
-
- if (last && dataVisitor instanceof LastElementAware) {
- try {
- ((LastElementAware) dataVisitor).setLastElement();
- dataVisitor.process(context, treeRowKey, argument);
- } finally {
- ((LastElementAware) dataVisitor).resetLastElement();
- }
- } else {
- dataVisitor.process(context, treeRowKey, argument);
- }
- }
-
- public abstract TreeNode getTreeNode();
-}
Deleted: trunk/framework/api/src/main/java/org/richfaces/component/CalendarDataModel.java
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/component/CalendarDataModel.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/framework/api/src/main/java/org/richfaces/component/CalendarDataModel.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -1,44 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces 3.0 - 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.component;
-
-import java.util.Date;
-/**
- * @author Alexej Kushunin
- * created 19.06.2007
- *
- */
-public interface CalendarDataModel {
-
- /**
- * @return array of CalendarDataModelItems for selected dates.
- * This method will be called every time when components will need next block of CalendarDataItems.
- * That may happens when calendar rendered, or when user navigate to next(previous) month or in any other case when calendar renders.
- * This method will be called in Ajax mode when Calendar renders new page.
- * */
- public CalendarDataModelItem[] getData(Date[] dateArray);
-
- /**
- * @return tool tip when it's used in "single" mode
- * This method used when tool tips are displayed in "single" mode
- * */
- public Object getToolTip(Date date);
-}
Deleted: trunk/framework/api/src/main/java/org/richfaces/component/CalendarDataModelItem.java
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/component/CalendarDataModelItem.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/framework/api/src/main/java/org/richfaces/component/CalendarDataModelItem.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -1,65 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces 3.0 - 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.component;
-
-import java.util.Date;
-
-
-/**
- * @author Alexej Kushunin
- * created 19.06.2007
- *
- */
-
-public interface CalendarDataModelItem {
-
- /**
- * @return date that this item for, default implementation return Date
- * */
- public Date getDate();
-
- /**
- *@return true if date is �selectable� on calendar, default implementation return true
- **/
- public boolean isEnabled();
-
- /**
- * @return String that will be appended to style class for that date span.
- * For example it may be �relevant holyday� � that mean class will be like �rich-cal-day relevant holyday�.
- * Default implementation return empty string.
- * */
- public String getStyleClass();
-
- /**
- * @return any additional payload that must be JSON-serialazable object.
- * May be used in custom date representation on calendar (inside custom facet).*/
- public Object getData();
-
- /**
- * @return true if given date has an associated with it tooltip data.
- * Default implementation return false.*/
- public boolean hasToolTip();
-
- /**
- *@return tool tip data that will be used in �batch� tooltip loading mode.
- **/
- public Object getToolTip();
-}
Copied: trunk/framework/api/src/main/java/org/richfaces/component/Draggable.java (from rev 1448, trunk/framework/api/src/main/java/org/ajax4jsf/dnd/Draggable.java)
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/component/Draggable.java (rev 0)
+++ trunk/framework/api/src/main/java/org/richfaces/component/Draggable.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -0,0 +1,108 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.component;
+
+import javax.faces.el.MethodBinding;
+
+import org.ajax4jsf.event.DragListener;
+
+
+/**
+ * Interface for all draggable components. Describe bean properties, implemented by component.
+ * @author shura
+ *
+ */
+public interface Draggable {
+
+ /**
+ * Getter for value parameter, used as key for draggable component.
+ * @return
+ */
+ public Object getDragValue();
+
+ public void setDragValue(Object value);
+
+ /**
+ * Getter for id of component ( instance of {@link UIDragIndicator} ) used for create drag cursor.
+ * @return
+ */
+ public String getDragIndicator();
+
+ /**
+ * @param dragIndicator - id of cursor component
+ */
+ public void setDragIndicator(String dragIndicator);
+
+
+ /**
+ * Getter for type of this draggable ( file, mail etc ).
+ * @return
+ */
+ public String getDragType();
+
+ /**
+ * @param dragType
+ */
+ public void setDragType(String dragType);
+
+ /**
+ * Getter for JavaScript event handler, called before start drag operation.
+ * If this handler return false, drag operation is cancelled.
+ * @return javaScript code of event handler.
+ */
+ public String getOndragstart();
+
+ /**
+ * @param dragType
+ */
+ public void setOndragstart(String ondrag);
+
+ /**
+ *
+ * @return
+ */
+ public String getOndragend();
+ public void setOndragend(String ondrag);
+
+
+ /**
+ * Append drag listener to component listeners collection
+ * @param listener
+ */
+ public void addDragListener(DragListener listener);
+
+ /**
+ * Get array of all Drop Listeners
+ * @return
+ */
+ public DragListener[] getDragListeners();
+
+ /**
+ * Remove drop listener from component listeners array.
+ * @param listener
+ */
+ public void removeDragListener(DragListener listener);
+
+ public void setDragListener(MethodBinding binding);
+ public MethodBinding getDragListener();
+
+}
Copied: trunk/framework/api/src/main/java/org/richfaces/component/Dropzone.java (from rev 1448, trunk/framework/api/src/main/java/org/ajax4jsf/dnd/Dropzone.java)
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/component/Dropzone.java (rev 0)
+++ trunk/framework/api/src/main/java/org/richfaces/component/Dropzone.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -0,0 +1,101 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.component;
+
+import org.ajax4jsf.event.DropSource;
+
+/**
+ * Base interface for all components, accesible as drop zone.
+ * @author shura
+ *
+ */
+public interface Dropzone extends DropSource {
+
+ /**
+ * Getter for dropType's , accepted by this zone.
+ * @return
+ */
+ public Object getAcceptedTypes();
+
+ public void setAcceptedTypes(Object types);
+
+ /**
+ * Getter for mapping between drop types and indicator states.
+ * @return
+ */
+ public Object getTypeMapping();
+
+ public void setTypeMapping(Object types);
+ /**
+ * Getter for JavaScript event handler, called then drag curcor enter in component area.
+ * If this handler return false, or "declined", drop operation on this component not allowed.
+ * If handler return true or "allowed" , or any other supported indicator states, drop operation
+ * is allowed and corresponding indicator state will be displayed.
+ * @return javaScript code of event handler.
+ */
+ public String getOndragenter();
+
+ /**
+ * @param dragType
+ */
+ public void setOndragenter(String ondrag);
+
+ /**
+ * Getter for JavaScript event handler, called before drag cursor leave component area.
+ * @return javaScript code of event handler.
+ */
+ public String getOndragexit();
+
+ /**
+ * @param dragType
+ */
+ public void setOndragexit(String ondrag);
+
+ public Object getDropValue();
+
+ public void setDropValue(Object o);
+
+ /**
+ * Javascript code called before drop event.
+ * @parameter
+ * @return the acceptClass
+ */
+ public abstract String getOndrop();
+
+ /**
+ * @param newOndrop the value to set
+ */
+ public abstract void setOndrop(String newOndrop);
+
+ /**
+ * Javascript handler for event fired on drop even the drop for given type is not available
+ * @parameter
+ * @return the acceptClass
+ */
+ public abstract String getOndropend();
+
+ /**
+ * @param newname the value to set
+ */
+ public abstract void setOndropend(String ondropend);
+
+}
Deleted: trunk/framework/api/src/main/java/org/richfaces/component/LastElementAware.java
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/component/LastElementAware.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/framework/api/src/main/java/org/richfaces/component/LastElementAware.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -1,43 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces 3.0 - 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.component;
-
-/**
- * @author Konstantin Mishin
- *
- * {@link org.ajax4jsf.ajax.repeat.UIDataAdaptor.ComponentVisitor} instances can implement this interface in order to
- * be notified of last element occurence at the current tree level. {@link #setLastElement()}
- * method is invoked before visiting last element and {@link #resetLastElement()} is called after
- * visiting last element.
- */
-public interface LastElementAware {
-
- /**
- * The method is invoked to notify that last element occured
- */
- public void setLastElement();
- /**
- * The method is invoked to notify that we're done with last element
- */
- public void resetLastElement();
-
-}
Deleted: trunk/framework/api/src/main/java/org/richfaces/component/ListRowKey.java
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/component/ListRowKey.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/framework/api/src/main/java/org/richfaces/component/ListRowKey.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -1,236 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces 3.0 - 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.component;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * @author Nick Belaevski - nbelaevski(a)exadel.com
- * created 17.11.2006
- * Default {@link TreeRowKey} implementation based on {@link ArrayList}
- */
-public class ListRowKey extends TreeRowKey {
-
- private ArrayList path;
-
- /**
- *
- */
- private static final long serialVersionUID = 7718335783201397177L;
-
- public String toString() {
- return getPath();
- }
-
- /**
- * Default constructor
- */
- public ListRowKey() {
- super();
- this.path = new ArrayList();
- }
-
- /**
- * Copy constructor
- * @param parentRowKey row key to clone
- */
- protected ListRowKey(ListRowKey parentRowKey) {
- super();
- this.path = (ArrayList) parentRowKey.path.clone();
- }
-
- /**
- * Appending constructor
- * @param parentRowKey base row key
- * @param pathElement path segment to append to base row key
- */
- public ListRowKey(ListRowKey parentRowKey, Object pathElement) {
- this(parentRowKey);
- this.path.add(pathElement);
- }
-
- private static ArrayList parsePath(String path) {
- ArrayList result = new ArrayList();
-
- String trimmedPath = path.trim();
-
- StringBuffer sb = new StringBuffer();
- boolean escapedState = false;
- int pathLength = trimmedPath.length();
-
- //unescape
- for (int i = 0; i < pathLength; i++) {
- char c = trimmedPath.charAt(i);
-
- if (SEPARATOR_ESCAPE_CHAR == c) {
- if (escapedState) {
- sb.append(c);
- }
- escapedState = !escapedState;
- } else {
- if (c == AbstractTreeDataModel.SEPARATOR) {
- if (escapedState) {
- sb.append(c);
- } else {
- result.add(sb.toString());
- sb = new StringBuffer();
- }
- } else {
- sb.append(c);
- }
-
- escapedState = false;
- }
- }
-
- if (sb.length() != 0) {
- result.add(sb.toString());
- }
-
- return result;
- }
-
- /**
- * List constructor
- * @param list List of strings to create corresponding row key from
- */
- public ListRowKey(List list) {
- super();
-
- this.path = new ArrayList(list);
- }
-
- /**
- * Path object constructor
- * @param path first path segment
- */
- public ListRowKey(Object path) {
- super();
- this.path = new ArrayList(1);
- this.path.add(path);
- }
-
- /**
- * Path string constructor
- * @param path path string to create corresponding row key from
- */
- public ListRowKey(String path) {
- super();
- this.path = parsePath(path);
- }
-
- public int depth() {
- return path.size();
- }
-
- public Iterator iterator() {
- return path.iterator();
- }
-
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((path == null) ? 0 : path.hashCode());
- return result;
- }
-
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (getClass() != obj.getClass())
- return false;
- final ListRowKey other = (ListRowKey) obj;
- if (path == null) {
- if (other.path != null)
- return false;
- } else if (!path.equals(other.path))
- return false;
- return true;
- }
-
- public Iterator getSubPathIterator(int fromIndex) {
- return path.listIterator(fromIndex);
- }
-
- public boolean isSubKey(TreeRowKey rowKey) {
- if (rowKey instanceof ListRowKey) {
- ListRowKey listRowKey = (ListRowKey) rowKey;
-
- int commonLength = getCommonPathLength(listRowKey);
- if (commonLength != 0) {
- return commonLength == depth();
- } else {
- return rowKey.depth() == 0;
- }
- } else {
- return super.isSubKey(rowKey);
- }
- }
-
- public String getPath() {
- StringBuffer result = new StringBuffer();
- Iterator iterator = path.iterator();
- boolean hasNext = iterator.hasNext();
-
- while (hasNext) {
- String pathSegment = iterator.next().toString();
-
- StringBuffer escapedSubPath = new StringBuffer();
- for (int i = 0; i < pathSegment.length(); i++) {
- char ch = pathSegment.charAt(i);
-
- //escape
- if (AbstractTreeDataModel.SEPARATOR == ch || ListRowKey.SEPARATOR_ESCAPE_CHAR == ch) {
- escapedSubPath.append(ListRowKey.SEPARATOR_ESCAPE_CHAR);
- }
-
- escapedSubPath.append(ch);
- }
-
- result.append(escapedSubPath.toString());
-
- hasNext = iterator.hasNext();
-
- if (hasNext) {
- result.append(AbstractTreeDataModel.SEPARATOR);
- }
- }
-
- return result.toString();
- }
-
- public int getCommonPathLength(TreeRowKey otherRowKey) {
- if (otherRowKey == null)
- return 0;
- Iterator iterator = this.iterator();
- Iterator otherIterator = otherRowKey.iterator();
- int length = 0;
- while (iterator.hasNext() && otherIterator.hasNext()
- && iterator.next().equals(otherIterator.next()))
- length++;
- return length;
- }
-}
Deleted: trunk/framework/api/src/main/java/org/richfaces/component/TreeDataModel.java
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/component/TreeDataModel.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/framework/api/src/main/java/org/richfaces/component/TreeDataModel.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -1,223 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces 3.0 - 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.component;
-
-import java.io.IOException;
-import java.util.Iterator;
-import java.util.Map;
-
-import javax.faces.context.FacesContext;
-
-import org.ajax4jsf.model.DataVisitor;
-import org.ajax4jsf.model.Range;
-import org.richfaces.component.state.TreeRange;
-
-/**
- * @author Nick Belaevski - nbelaevski(a)exadel.com created 16.11.2006
- *
- */
-public class TreeDataModel extends AbstractTreeDataModel {
- private TreeRowKey currentRowKey;
-
- private TreeRowKey oldRowKey;
-
- private TreeNode rowTreeData;
-
- public Object getRowKey() {
- return this.currentRowKey;
- }
-
- public void setRowKey(Object rowKey) {
- if (rowKey != null) {
- ListRowKey newRowKey = (ListRowKey) rowKey;
- this.currentRowKey = newRowKey;
- } else {
- this.currentRowKey = null;
- this.oldRowKey = null;
- this.rowTreeData = null;
- }
- }
-
-
- public void walk(FacesContext context, DataVisitor dataVisitor,
- Range range, Object rowKey, Object argument, boolean last) throws IOException {
-
- ListRowKey listRowKey = (ListRowKey) rowKey;
-
- TreeNode node = locateTreeNode(listRowKey);
-
- if (node != null) {
- TreeRange treeRange = (TreeRange) range;
-
- if (treeRange == null || treeRange.processNode(listRowKey)) {
-
- if (node.getParent() != null) {
- processElement(context, dataVisitor, argument, listRowKey, last);
- }
-
- if (treeRange == null || treeRange.processChildren(listRowKey)) {
- if (!node.isLeaf()) {
- Iterator children = node.getChildren();
-
- Map.Entry childEntry = children.hasNext() ? (Map.Entry) children.next() : null;
- TreeNode childNode;
- Object identifier;
-
- if (childEntry != null) {
- childNode = (TreeNode) childEntry.getValue();
- identifier = childEntry.getKey();
- } else {
- childNode = null;
- identifier = null;
- }
-
- do {
- Map.Entry nextChildEntry = children.hasNext() ? (Map.Entry) children.next() : null;
- TreeNode nextChildNode;
- Object nextIdentifier;
-
- if (nextChildEntry != null) {
- nextChildNode = (TreeNode) nextChildEntry.getValue();
- nextIdentifier = nextChildEntry.getKey();
- } else {
- nextChildNode = null;
- nextIdentifier = null;
- }
-
- if (childNode != null) {
-
- boolean isLast = nextChildNode == null;
-
- ListRowKey newRowKey;
- if (rowKey != null) {
- newRowKey = new ListRowKey(listRowKey, identifier);
- } else {
- newRowKey = new ListRowKey(identifier);
- }
-
- this.walk(context, dataVisitor, range, newRowKey, argument, isLast);
- }
-
- identifier = nextIdentifier;
- childNode = nextChildNode;
- } while (childNode != null);
- }
- }
- }
- }
- }
-
- protected TreeNode locateTreeNode(TreeRowKey rowKey) {
- return locateTreeNode(rowKey, false);
- }
-
- protected TreeNode locateTreeNode(TreeRowKey rowKey, boolean allowCreate) {
- boolean useCached = (rowTreeData != null && rowKey != null && rowKey.equals(this.oldRowKey));
- if (!useCached) {
- TreeNode rootNode = (TreeNode) getWrappedData();
-
- if (rootNode != null) {
- if (rowKey != null) {
- int commonPathLength = rowKey.getCommonPathLength(oldRowKey);
- if (oldRowKey == null) {
- rowTreeData = rootNode;
- } else {
- int rootOpsCount = rowKey.depth();
- int currentUpOpsCount = oldRowKey.depth() - commonPathLength;
- int currentOpsCount = currentUpOpsCount + rootOpsCount - commonPathLength;
-
- if (rootOpsCount > currentOpsCount) {
- for (int i = 0; i < oldRowKey.depth()
- - commonPathLength; i++) {
-
- rowTreeData = rowTreeData.getParent();
- }
- } else {
- commonPathLength = 0;
- rowTreeData = rootNode;
- oldRowKey = null;
- }
- }
- oldRowKey = rowKey;
- Iterator iterator = rowKey.getSubPathIterator(commonPathLength);
- while (iterator.hasNext()) {
- Object pathSegment = iterator.next();
- TreeNode childRowTreeData = rowTreeData.getChild(pathSegment);
-
- if (childRowTreeData == null) {
- if (!allowCreate) {
- return null;
- } else {
- childRowTreeData = new TreeNodeImpl();
- rowTreeData.addChild(pathSegment, childRowTreeData);
- }
- }
-
- rowTreeData = childRowTreeData;
- }
- } else {
- return rootNode;
- }
- } else {
- return null;
- }
- }
- return rowTreeData;
- }
-
- public boolean isRowAvailable() {
- TreeNode data = locateTreeNode(this.currentRowKey);
-
- if (data != null) {
- return true;
- }
-
- return false;
- }
-
- public Object getRowData() {
- TreeNode treeNode = locateTreeNode(this.currentRowKey);
- if (treeNode != null) {
- return treeNode.getData();
- }
-
- return null;
- }
-
- public boolean isLeaf() {
- TreeNode treeNode = locateTreeNode(this.currentRowKey);
- if (treeNode != null) {
- return treeNode.isLeaf();
- }
-
- throw new IllegalStateException(
- "No tree element available or row key not set!");
- }
-
- public void walkModel(FacesContext context, DataVisitor visitor, Range range, Object key, Object argument, boolean last) throws IOException {
- walk(context, visitor, range, key, argument, last);
- }
-
- public TreeNode getTreeNode() {
- return locateTreeNode(this.currentRowKey);
- }
-}
Deleted: trunk/framework/api/src/main/java/org/richfaces/component/TreeListenerEventsProducer.java
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/component/TreeListenerEventsProducer.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/framework/api/src/main/java/org/richfaces/component/TreeListenerEventsProducer.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -1,53 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces 3.0 - 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.component;
-
-import javax.faces.el.MethodBinding;
-
-import org.richfaces.component.events.NodeExpandedListener;
-import org.richfaces.component.events.NodeSelectedListener;
-
-/**
- * @author Nick Belaevski - nbelaevski(a)exadel.com
- * created 29.11.2006
- *
- * Base tree events interface
- */
-public interface TreeListenerEventsProducer {
- public abstract void setChangeExpandListener(MethodBinding binding);
- public abstract MethodBinding getChangeExpandListener();
-
- public abstract void setNodeSelectListener(MethodBinding binding);
- public abstract MethodBinding getNodeSelectListener();
-
- public abstract void setDropListener(MethodBinding binding);
- public abstract MethodBinding getDropListener();
-
- public abstract void setDragListener(MethodBinding binding);
- public abstract MethodBinding getDragListener();
-
- public void addNodeSelectListener(NodeSelectedListener listener);
- public void addChangeExpandListener(NodeExpandedListener listener);
-
- //TODO - rename this
- public boolean hasAjaxSubmitSelection();
-}
Deleted: trunk/framework/api/src/main/java/org/richfaces/component/TreeNode.java
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/component/TreeNode.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/framework/api/src/main/java/org/richfaces/component/TreeNode.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -1,89 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces 3.0 - 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.component;
-
-import java.io.Serializable;
-import java.util.Iterator;
-import java.util.Map;
-
-
-/**
- * @author Nick Belaevski - nbelaevski(a)exadel.com
- * created 16.11.2006
- * Interface representing tree ADT nodes
- */
-public interface TreeNode extends Serializable{
-
- /**
- * getter for node attached data
- * @return node attached data
- */
- public Object getData();
- /**
- * setter for node attached data
- * @param data data to set as attached node data
- */
- public void setData(Object data);
-
- /**
- * Returns whether this node is leaf
- * @return <code>true</code> if this node is leaf else returns <code>false</code>
- */
- public boolean isLeaf();
-
- /**
- * getter for children
- * @return {@link Iterator} of {@link Map.Entry} instances containing {@link TreeNode} as values
- * and their identifiers as keys
- */
- public Iterator getChildren();
- /**
- * find child by id
- * @param id identifier of the child to find
- * @return designated {@link TreeNode} instance or <code>null</code>
- */
- public TreeNode getChild(Object id);
-
- /**
- * adds child to children collection
- * @param identifier child identifier
- * @param child child
- */
- public void addChild(Object identifier, TreeNode child);
-
- /**
- * removes child from children collection by child id
- * @param id id of the child to remove
- */
- public void removeChild(Object id);
-
- /**
- * getter for parent {@link TreeNode}
- * @return parent {@link TreeNode} instance or <code>null</code> if this node is root
- */
- public TreeNode getParent();
- /**
- * setter for parent {@link TreeNode}
- * @param parent {@link TreeNode} to set as parent
- */
- public void setParent(TreeNode parent);
-}
Deleted: trunk/framework/api/src/main/java/org/richfaces/component/TreeNodeImpl.java
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/component/TreeNodeImpl.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/framework/api/src/main/java/org/richfaces/component/TreeNodeImpl.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -1,82 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces 3.0 - 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.component;
-
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-/**
- * @author Nick Belaevski - nbelaevski(a)exadel.com
- * created 16.11.2006
- * Default {@link TreeNode} implementation based on {@link LinkedHashMap} to preserve
- * elements ordering
- */
-public class TreeNodeImpl implements TreeNode {
-
- private static final long serialVersionUID = -5498990493803705085L;
- private Object data;
- private TreeNode parent;
-
- private Map childrenMap = new LinkedHashMap();
-
- public Object getData() {
- return data;
- }
-
- public TreeNode getChild(Object identifier) {
- return (TreeNode) childrenMap.get(identifier);
- }
-
- public void addChild(Object identifier, TreeNode child) {
- child.setParent(this);
- childrenMap.put(identifier, child);
- }
-
- public void removeChild(Object identifier) {
- TreeNode treeNode = (TreeNode) childrenMap.remove(identifier);
- if (treeNode != null) {
- treeNode.setParent(null);
- }
- }
-
- public void setData(Object data) {
- this.data = data;
- }
-
- public TreeNode getParent() {
- return parent;
- }
-
- public void setParent(TreeNode parent) {
- this.parent = parent;
- }
-
- public Iterator getChildren() {
- return childrenMap.entrySet().iterator();
- }
-
- public boolean isLeaf() {
- return childrenMap.isEmpty();
- }
-
-}
Deleted: trunk/framework/api/src/main/java/org/richfaces/component/TreeRowKey.java
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/component/TreeRowKey.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/framework/api/src/main/java/org/richfaces/component/TreeRowKey.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -1,85 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces 3.0 - 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.component;
-
-import java.io.Serializable;
-import java.util.Iterator;
-
-/**
- * @author Nick Belaevski - nbelaevski(a)exadel.com
- * created 06.12.2006
- * Base abstract clas for all tree row keys
- */
-public abstract class TreeRowKey implements Serializable {
-
- public static final char SEPARATOR_ESCAPE_CHAR = '_';
-
- /**
- * getter for key depth
- * @return key depth
- */
- public abstract int depth();
-
- /**
- * getter for subpath iterator
- * @param fromIndex
- * @return subpath segments iterator
- */
- public abstract Iterator getSubPathIterator(int fromIndex);
-
- /**
- * getter for path string representation
- * @return path string
- */
- public abstract String getPath();
-
- public String toString() {
- return getPath();
- }
-
- /**
- * tests if specified rowKey is sub-key of this row key
- * @param rowKey
- * @return
- */
- public boolean isSubKey(TreeRowKey rowKey) {
- if (rowKey == null) {
- return false;
- }
-
- return (rowKey.getPath() + AbstractTreeDataModel.SEPARATOR).startsWith(getPath());
- }
-
- /**
- * getter for path iterator
- * @return path segments iterator
- */
- public abstract Iterator iterator();
-
- /**
- * returns this row key and otherRowKey argument row key common path segments count
- * @param otherRowKey {@link TreeRowKey} to count common path segments for
- * @return common path segmments count
- */
- public abstract int getCommonPathLength(TreeRowKey otherRowKey);
-
-}
Deleted: trunk/framework/api/src/main/java/org/richfaces/component/state/TreeRange.java
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/component/state/TreeRange.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/framework/api/src/main/java/org/richfaces/component/state/TreeRange.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -1,35 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces 3.0 - 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.component.state;
-
-import org.ajax4jsf.model.Range;
-import org.richfaces.component.TreeRowKey;
-
-/**
- * @author Nick Belaevski - nbelaevski(a)exadel.com
- * created 23.11.2006
- *
- */
-public interface TreeRange extends Range {
- public boolean processNode(TreeRowKey rowKey);
- public boolean processChildren(TreeRowKey rowKey);
-}
Copied: trunk/framework/api/src/main/java/org/richfaces/event/TreeListenerEventsProducer.java (from rev 1448, trunk/framework/api/src/main/java/org/richfaces/component/TreeListenerEventsProducer.java)
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/event/TreeListenerEventsProducer.java (rev 0)
+++ trunk/framework/api/src/main/java/org/richfaces/event/TreeListenerEventsProducer.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -0,0 +1,53 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - 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.el.MethodBinding;
+
+import org.richfaces.component.events.NodeExpandedListener;
+import org.richfaces.component.events.NodeSelectedListener;
+
+/**
+ * @author Nick Belaevski - nbelaevski(a)exadel.com
+ * created 29.11.2006
+ *
+ * Base tree events interface
+ */
+public interface TreeListenerEventsProducer {
+ public abstract void setChangeExpandListener(MethodBinding binding);
+ public abstract MethodBinding getChangeExpandListener();
+
+ public abstract void setNodeSelectListener(MethodBinding binding);
+ public abstract MethodBinding getNodeSelectListener();
+
+ public abstract void setDropListener(MethodBinding binding);
+ public abstract MethodBinding getDropListener();
+
+ public abstract void setDragListener(MethodBinding binding);
+ public abstract MethodBinding getDragListener();
+
+ public void addNodeSelectListener(NodeSelectedListener listener);
+ public void addChangeExpandListener(NodeExpandedListener listener);
+
+ //TODO - rename this
+ public boolean hasAjaxSubmitSelection();
+}
Copied: trunk/framework/api/src/main/java/org/richfaces/model/AbstractTreeDataModel.java (from rev 1450, trunk/framework/api/src/main/java/org/richfaces/component/AbstractTreeDataModel.java)
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/model/AbstractTreeDataModel.java (rev 0)
+++ trunk/framework/api/src/main/java/org/richfaces/model/AbstractTreeDataModel.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -0,0 +1,137 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - 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.model;
+
+import java.io.IOException;
+
+import javax.faces.component.NamingContainer;
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.model.DataVisitor;
+import org.ajax4jsf.model.ExtendedDataModel;
+import org.ajax4jsf.model.Range;
+
+/**
+ * @author Nick Belaevski - nbelaevski(a)exadel.com created 07.12.2006
+ * Base class for all tree data models
+ */
+public abstract class AbstractTreeDataModel extends ExtendedDataModel {
+ public final static char SEPARATOR = NamingContainer.SEPARATOR_CHAR;
+
+ private TreeNode wrappedData;
+
+ public final int getRowCount() {
+ return -1;
+ }
+
+ public final int getRowIndex() {
+ return -1;
+ }
+
+ public final void setRowIndex(int rowIndex) {
+ if(rowIndex!=-1) {
+ throw new IllegalArgumentException("In AbstractTreeDataModel rowIndex must be -1.");
+ }
+ }
+
+ public final Object getWrappedData() {
+ return wrappedData;
+ }
+
+ public final void setWrappedData(Object data) {
+ wrappedData = (TreeNode) data;
+ }
+
+ public final void walk(FacesContext context, DataVisitor dataVisitor,
+ Range range, Object argument) throws IOException {
+ walk(context, dataVisitor, range, null, argument, false);
+ }
+
+ /**
+ * walk sub-model having row key argument as its root
+ * @param context faces context
+ * @param dataVisitor {@link org.ajax4jsf.ajax.repeat.UIDataAdaptor.ComponentVisitor}
+ * @param range {@link TreeRange} to constraint the walk
+ * @param rowKey row key to treat as root of sub-model
+ * @param argument implementation specific argument
+ * @param last boolean flag indicating whether we started our walk from last element
+ * @throws IOException
+ *
+ * @see {@link ExtendedDataModel#walk(FacesContext, DataVisitor, Range, Object)}
+ */
+ public abstract void walk(FacesContext context, DataVisitor dataVisitor,
+ Range range, Object rowKey, Object argument, boolean last) throws IOException;
+
+ /**
+ * returns whether this node is leaf
+ * @return
+ */
+ public abstract boolean isLeaf();
+
+ /**
+ * Walk backing sub-model having row key argument as its root. If there is no backing model
+ * configured, calling this method is equivalent to calling {@link #walk(FacesContext, DataVisitor, Range, Object, Object, boolean)}
+ * @param facesContext faces context
+ * @param visitor {@link org.ajax4jsf.ajax.repeat.UIDataAdaptor.ComponentVisitor} instance
+ * @param range {@link Range} to constraint the walk
+ * @param key row key to treat as root of sub-model
+ * @param argument implementation-specific argument
+ * @throws IOException
+ *
+ * @see {@link #walk(FacesContext, DataVisitor, Range, TreeRowKey, Object, boolean)}
+ */
+ public abstract void walkModel(FacesContext facesContext, DataVisitor visitor, Range range, Object key, Object argument, boolean last) throws IOException;
+
+ /**
+ * Processes concrete tree node. Knows about {@link LastElementAware} interface and handles it
+ * properly. Checks if argument is instance of {@link SubTreeChildrenAppender} and if it is so
+ * does appending current element
+ * @param context
+ * @param dataVisitor
+ * @param argument
+ * @param treeRowKey
+ * @param last
+ * @throws IOException
+ */
+ protected void processElement(FacesContext context, DataVisitor dataVisitor, Object argument, TreeRowKey treeRowKey, boolean last) throws IOException {
+// if (argument instanceof SubTreeChildrenAppender) {
+// setRowKey(treeRowKey);
+//
+// if (isRowAvailable()) {
+// ((SubTreeChildrenAppender) argument).addChild(treeRowKey, getRowData(), last, isLeaf(), getTreeNodeType());
+// }
+// }
+
+ if (last && dataVisitor instanceof LastElementAware) {
+ try {
+ ((LastElementAware) dataVisitor).setLastElement();
+ dataVisitor.process(context, treeRowKey, argument);
+ } finally {
+ ((LastElementAware) dataVisitor).resetLastElement();
+ }
+ } else {
+ dataVisitor.process(context, treeRowKey, argument);
+ }
+ }
+
+ public abstract TreeNode getTreeNode();
+}
Copied: trunk/framework/api/src/main/java/org/richfaces/model/CalendarDataModel.java (from rev 1448, trunk/framework/api/src/main/java/org/richfaces/component/CalendarDataModel.java)
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/model/CalendarDataModel.java (rev 0)
+++ trunk/framework/api/src/main/java/org/richfaces/model/CalendarDataModel.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -0,0 +1,44 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - 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.model;
+
+import java.util.Date;
+/**
+ * @author Alexej Kushunin
+ * created 19.06.2007
+ *
+ */
+public interface CalendarDataModel {
+
+ /**
+ * @return array of CalendarDataModelItems for selected dates.
+ * This method will be called every time when components will need next block of CalendarDataItems.
+ * That may happens when calendar rendered, or when user navigate to next(previous) month or in any other case when calendar renders.
+ * This method will be called in Ajax mode when Calendar renders new page.
+ * */
+ public CalendarDataModelItem[] getData(Date[] dateArray);
+
+ /**
+ * @return tool tip when it's used in "single" mode
+ * This method used when tool tips are displayed in "single" mode
+ * */
+ public Object getToolTip(Date date);
+}
Copied: trunk/framework/api/src/main/java/org/richfaces/model/CalendarDataModelItem.java (from rev 1448, trunk/framework/api/src/main/java/org/richfaces/component/CalendarDataModelItem.java)
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/model/CalendarDataModelItem.java (rev 0)
+++ trunk/framework/api/src/main/java/org/richfaces/model/CalendarDataModelItem.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -0,0 +1,65 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - 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.model;
+
+import java.util.Date;
+
+
+/**
+ * @author Alexej Kushunin
+ * created 19.06.2007
+ *
+ */
+
+public interface CalendarDataModelItem {
+
+ /**
+ * @return date that this item for, default implementation return Date
+ * */
+ public Date getDate();
+
+ /**
+ *@return true if date is �selectable� on calendar, default implementation return true
+ **/
+ public boolean isEnabled();
+
+ /**
+ * @return String that will be appended to style class for that date span.
+ * For example it may be �relevant holyday� � that mean class will be like �rich-cal-day relevant holyday�.
+ * Default implementation return empty string.
+ * */
+ public String getStyleClass();
+
+ /**
+ * @return any additional payload that must be JSON-serialazable object.
+ * May be used in custom date representation on calendar (inside custom facet).*/
+ public Object getData();
+
+ /**
+ * @return true if given date has an associated with it tooltip data.
+ * Default implementation return false.*/
+ public boolean hasToolTip();
+
+ /**
+ *@return tool tip data that will be used in �batch� tooltip loading mode.
+ **/
+ public Object getToolTip();
+}
Copied: trunk/framework/api/src/main/java/org/richfaces/model/LastElementAware.java (from rev 1448, trunk/framework/api/src/main/java/org/richfaces/component/LastElementAware.java)
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/model/LastElementAware.java (rev 0)
+++ trunk/framework/api/src/main/java/org/richfaces/model/LastElementAware.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -0,0 +1,43 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - 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.model;
+
+/**
+ * @author Konstantin Mishin
+ *
+ * {@link org.ajax4jsf.ajax.repeat.UIDataAdaptor.ComponentVisitor} instances can implement this interface in order to
+ * be notified of last element occurence at the current tree level. {@link #setLastElement()}
+ * method is invoked before visiting last element and {@link #resetLastElement()} is called after
+ * visiting last element.
+ */
+public interface LastElementAware {
+
+ /**
+ * The method is invoked to notify that last element occured
+ */
+ public void setLastElement();
+ /**
+ * The method is invoked to notify that we're done with last element
+ */
+ public void resetLastElement();
+
+}
Copied: trunk/framework/api/src/main/java/org/richfaces/model/ListRowKey.java (from rev 1448, trunk/framework/api/src/main/java/org/richfaces/component/ListRowKey.java)
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/model/ListRowKey.java (rev 0)
+++ trunk/framework/api/src/main/java/org/richfaces/model/ListRowKey.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -0,0 +1,236 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - 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.model;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * @author Nick Belaevski - nbelaevski(a)exadel.com
+ * created 17.11.2006
+ * Default {@link TreeRowKey} implementation based on {@link ArrayList}
+ */
+public class ListRowKey extends TreeRowKey {
+
+ private ArrayList path;
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 7718335783201397177L;
+
+ public String toString() {
+ return getPath();
+ }
+
+ /**
+ * Default constructor
+ */
+ public ListRowKey() {
+ super();
+ this.path = new ArrayList();
+ }
+
+ /**
+ * Copy constructor
+ * @param parentRowKey row key to clone
+ */
+ protected ListRowKey(ListRowKey parentRowKey) {
+ super();
+ this.path = (ArrayList) parentRowKey.path.clone();
+ }
+
+ /**
+ * Appending constructor
+ * @param parentRowKey base row key
+ * @param pathElement path segment to append to base row key
+ */
+ public ListRowKey(ListRowKey parentRowKey, Object pathElement) {
+ this(parentRowKey);
+ this.path.add(pathElement);
+ }
+
+ private static ArrayList parsePath(String path) {
+ ArrayList result = new ArrayList();
+
+ String trimmedPath = path.trim();
+
+ StringBuffer sb = new StringBuffer();
+ boolean escapedState = false;
+ int pathLength = trimmedPath.length();
+
+ //unescape
+ for (int i = 0; i < pathLength; i++) {
+ char c = trimmedPath.charAt(i);
+
+ if (SEPARATOR_ESCAPE_CHAR == c) {
+ if (escapedState) {
+ sb.append(c);
+ }
+ escapedState = !escapedState;
+ } else {
+ if (c == AbstractTreeDataModel.SEPARATOR) {
+ if (escapedState) {
+ sb.append(c);
+ } else {
+ result.add(sb.toString());
+ sb = new StringBuffer();
+ }
+ } else {
+ sb.append(c);
+ }
+
+ escapedState = false;
+ }
+ }
+
+ if (sb.length() != 0) {
+ result.add(sb.toString());
+ }
+
+ return result;
+ }
+
+ /**
+ * List constructor
+ * @param list List of strings to create corresponding row key from
+ */
+ public ListRowKey(List list) {
+ super();
+
+ this.path = new ArrayList(list);
+ }
+
+ /**
+ * Path object constructor
+ * @param path first path segment
+ */
+ public ListRowKey(Object path) {
+ super();
+ this.path = new ArrayList(1);
+ this.path.add(path);
+ }
+
+ /**
+ * Path string constructor
+ * @param path path string to create corresponding row key from
+ */
+ public ListRowKey(String path) {
+ super();
+ this.path = parsePath(path);
+ }
+
+ public int depth() {
+ return path.size();
+ }
+
+ public Iterator iterator() {
+ return path.iterator();
+ }
+
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((path == null) ? 0 : path.hashCode());
+ return result;
+ }
+
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ final ListRowKey other = (ListRowKey) obj;
+ if (path == null) {
+ if (other.path != null)
+ return false;
+ } else if (!path.equals(other.path))
+ return false;
+ return true;
+ }
+
+ public Iterator getSubPathIterator(int fromIndex) {
+ return path.listIterator(fromIndex);
+ }
+
+ public boolean isSubKey(TreeRowKey rowKey) {
+ if (rowKey instanceof ListRowKey) {
+ ListRowKey listRowKey = (ListRowKey) rowKey;
+
+ int commonLength = getCommonPathLength(listRowKey);
+ if (commonLength != 0) {
+ return commonLength == depth();
+ } else {
+ return rowKey.depth() == 0;
+ }
+ } else {
+ return super.isSubKey(rowKey);
+ }
+ }
+
+ public String getPath() {
+ StringBuffer result = new StringBuffer();
+ Iterator iterator = path.iterator();
+ boolean hasNext = iterator.hasNext();
+
+ while (hasNext) {
+ String pathSegment = iterator.next().toString();
+
+ StringBuffer escapedSubPath = new StringBuffer();
+ for (int i = 0; i < pathSegment.length(); i++) {
+ char ch = pathSegment.charAt(i);
+
+ //escape
+ if (AbstractTreeDataModel.SEPARATOR == ch || ListRowKey.SEPARATOR_ESCAPE_CHAR == ch) {
+ escapedSubPath.append(ListRowKey.SEPARATOR_ESCAPE_CHAR);
+ }
+
+ escapedSubPath.append(ch);
+ }
+
+ result.append(escapedSubPath.toString());
+
+ hasNext = iterator.hasNext();
+
+ if (hasNext) {
+ result.append(AbstractTreeDataModel.SEPARATOR);
+ }
+ }
+
+ return result.toString();
+ }
+
+ public int getCommonPathLength(TreeRowKey otherRowKey) {
+ if (otherRowKey == null)
+ return 0;
+ Iterator iterator = this.iterator();
+ Iterator otherIterator = otherRowKey.iterator();
+ int length = 0;
+ while (iterator.hasNext() && otherIterator.hasNext()
+ && iterator.next().equals(otherIterator.next()))
+ length++;
+ return length;
+ }
+}
Copied: trunk/framework/api/src/main/java/org/richfaces/model/TreeDataModel.java (from rev 1450, trunk/framework/api/src/main/java/org/richfaces/component/TreeDataModel.java)
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/model/TreeDataModel.java (rev 0)
+++ trunk/framework/api/src/main/java/org/richfaces/model/TreeDataModel.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -0,0 +1,222 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - 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.model;
+
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.Map;
+
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.model.DataVisitor;
+import org.ajax4jsf.model.Range;
+
+/**
+ * @author Nick Belaevski - nbelaevski(a)exadel.com created 16.11.2006
+ *
+ */
+public class TreeDataModel extends AbstractTreeDataModel {
+ private TreeRowKey currentRowKey;
+
+ private TreeRowKey oldRowKey;
+
+ private TreeNode rowTreeData;
+
+ public Object getRowKey() {
+ return this.currentRowKey;
+ }
+
+ public void setRowKey(Object rowKey) {
+ if (rowKey != null) {
+ ListRowKey newRowKey = (ListRowKey) rowKey;
+ this.currentRowKey = newRowKey;
+ } else {
+ this.currentRowKey = null;
+ this.oldRowKey = null;
+ this.rowTreeData = null;
+ }
+ }
+
+
+ public void walk(FacesContext context, DataVisitor dataVisitor,
+ Range range, Object rowKey, Object argument, boolean last) throws IOException {
+
+ ListRowKey listRowKey = (ListRowKey) rowKey;
+
+ TreeNode node = locateTreeNode(listRowKey);
+
+ if (node != null) {
+ TreeRange treeRange = (TreeRange) range;
+
+ if (treeRange == null || treeRange.processNode(listRowKey)) {
+
+ if (node.getParent() != null) {
+ processElement(context, dataVisitor, argument, listRowKey, last);
+ }
+
+ if (treeRange == null || treeRange.processChildren(listRowKey)) {
+ if (!node.isLeaf()) {
+ Iterator children = node.getChildren();
+
+ Map.Entry childEntry = children.hasNext() ? (Map.Entry) children.next() : null;
+ TreeNode childNode;
+ Object identifier;
+
+ if (childEntry != null) {
+ childNode = (TreeNode) childEntry.getValue();
+ identifier = childEntry.getKey();
+ } else {
+ childNode = null;
+ identifier = null;
+ }
+
+ do {
+ Map.Entry nextChildEntry = children.hasNext() ? (Map.Entry) children.next() : null;
+ TreeNode nextChildNode;
+ Object nextIdentifier;
+
+ if (nextChildEntry != null) {
+ nextChildNode = (TreeNode) nextChildEntry.getValue();
+ nextIdentifier = nextChildEntry.getKey();
+ } else {
+ nextChildNode = null;
+ nextIdentifier = null;
+ }
+
+ if (childNode != null) {
+
+ boolean isLast = nextChildNode == null;
+
+ ListRowKey newRowKey;
+ if (rowKey != null) {
+ newRowKey = new ListRowKey(listRowKey, identifier);
+ } else {
+ newRowKey = new ListRowKey(identifier);
+ }
+
+ this.walk(context, dataVisitor, range, newRowKey, argument, isLast);
+ }
+
+ identifier = nextIdentifier;
+ childNode = nextChildNode;
+ } while (childNode != null);
+ }
+ }
+ }
+ }
+ }
+
+ protected TreeNode locateTreeNode(TreeRowKey rowKey) {
+ return locateTreeNode(rowKey, false);
+ }
+
+ protected TreeNode locateTreeNode(TreeRowKey rowKey, boolean allowCreate) {
+ boolean useCached = (rowTreeData != null && rowKey != null && rowKey.equals(this.oldRowKey));
+ if (!useCached) {
+ TreeNode rootNode = (TreeNode) getWrappedData();
+
+ if (rootNode != null) {
+ if (rowKey != null) {
+ int commonPathLength = rowKey.getCommonPathLength(oldRowKey);
+ if (oldRowKey == null) {
+ rowTreeData = rootNode;
+ } else {
+ int rootOpsCount = rowKey.depth();
+ int currentUpOpsCount = oldRowKey.depth() - commonPathLength;
+ int currentOpsCount = currentUpOpsCount + rootOpsCount - commonPathLength;
+
+ if (rootOpsCount > currentOpsCount) {
+ for (int i = 0; i < oldRowKey.depth()
+ - commonPathLength; i++) {
+
+ rowTreeData = rowTreeData.getParent();
+ }
+ } else {
+ commonPathLength = 0;
+ rowTreeData = rootNode;
+ oldRowKey = null;
+ }
+ }
+ oldRowKey = rowKey;
+ Iterator iterator = rowKey.getSubPathIterator(commonPathLength);
+ while (iterator.hasNext()) {
+ Object pathSegment = iterator.next();
+ TreeNode childRowTreeData = rowTreeData.getChild(pathSegment);
+
+ if (childRowTreeData == null) {
+ if (!allowCreate) {
+ return null;
+ } else {
+ childRowTreeData = new TreeNodeImpl();
+ rowTreeData.addChild(pathSegment, childRowTreeData);
+ }
+ }
+
+ rowTreeData = childRowTreeData;
+ }
+ } else {
+ return rootNode;
+ }
+ } else {
+ return null;
+ }
+ }
+ return rowTreeData;
+ }
+
+ public boolean isRowAvailable() {
+ TreeNode data = locateTreeNode(this.currentRowKey);
+
+ if (data != null) {
+ return true;
+ }
+
+ return false;
+ }
+
+ public Object getRowData() {
+ TreeNode treeNode = locateTreeNode(this.currentRowKey);
+ if (treeNode != null) {
+ return treeNode.getData();
+ }
+
+ return null;
+ }
+
+ public boolean isLeaf() {
+ TreeNode treeNode = locateTreeNode(this.currentRowKey);
+ if (treeNode != null) {
+ return treeNode.isLeaf();
+ }
+
+ throw new IllegalStateException(
+ "No tree element available or row key not set!");
+ }
+
+ public void walkModel(FacesContext context, DataVisitor visitor, Range range, Object key, Object argument, boolean last) throws IOException {
+ walk(context, visitor, range, key, argument, last);
+ }
+
+ public TreeNode getTreeNode() {
+ return locateTreeNode(this.currentRowKey);
+ }
+}
Copied: trunk/framework/api/src/main/java/org/richfaces/model/TreeNode.java (from rev 1448, trunk/framework/api/src/main/java/org/richfaces/component/TreeNode.java)
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/model/TreeNode.java (rev 0)
+++ trunk/framework/api/src/main/java/org/richfaces/model/TreeNode.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -0,0 +1,89 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - 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.model;
+
+import java.io.Serializable;
+import java.util.Iterator;
+import java.util.Map;
+
+
+/**
+ * @author Nick Belaevski - nbelaevski(a)exadel.com
+ * created 16.11.2006
+ * Interface representing tree ADT nodes
+ */
+public interface TreeNode extends Serializable{
+
+ /**
+ * getter for node attached data
+ * @return node attached data
+ */
+ public Object getData();
+ /**
+ * setter for node attached data
+ * @param data data to set as attached node data
+ */
+ public void setData(Object data);
+
+ /**
+ * Returns whether this node is leaf
+ * @return <code>true</code> if this node is leaf else returns <code>false</code>
+ */
+ public boolean isLeaf();
+
+ /**
+ * getter for children
+ * @return {@link Iterator} of {@link Map.Entry} instances containing {@link TreeNode} as values
+ * and their identifiers as keys
+ */
+ public Iterator getChildren();
+ /**
+ * find child by id
+ * @param id identifier of the child to find
+ * @return designated {@link TreeNode} instance or <code>null</code>
+ */
+ public TreeNode getChild(Object id);
+
+ /**
+ * adds child to children collection
+ * @param identifier child identifier
+ * @param child child
+ */
+ public void addChild(Object identifier, TreeNode child);
+
+ /**
+ * removes child from children collection by child id
+ * @param id id of the child to remove
+ */
+ public void removeChild(Object id);
+
+ /**
+ * getter for parent {@link TreeNode}
+ * @return parent {@link TreeNode} instance or <code>null</code> if this node is root
+ */
+ public TreeNode getParent();
+ /**
+ * setter for parent {@link TreeNode}
+ * @param parent {@link TreeNode} to set as parent
+ */
+ public void setParent(TreeNode parent);
+}
Copied: trunk/framework/api/src/main/java/org/richfaces/model/TreeNodeImpl.java (from rev 1448, trunk/framework/api/src/main/java/org/richfaces/component/TreeNodeImpl.java)
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/model/TreeNodeImpl.java (rev 0)
+++ trunk/framework/api/src/main/java/org/richfaces/model/TreeNodeImpl.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -0,0 +1,82 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - 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.model;
+
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+/**
+ * @author Nick Belaevski - nbelaevski(a)exadel.com
+ * created 16.11.2006
+ * Default {@link TreeNode} implementation based on {@link LinkedHashMap} to preserve
+ * elements ordering
+ */
+public class TreeNodeImpl implements TreeNode {
+
+ private static final long serialVersionUID = -5498990493803705085L;
+ private Object data;
+ private TreeNode parent;
+
+ private Map childrenMap = new LinkedHashMap();
+
+ public Object getData() {
+ return data;
+ }
+
+ public TreeNode getChild(Object identifier) {
+ return (TreeNode) childrenMap.get(identifier);
+ }
+
+ public void addChild(Object identifier, TreeNode child) {
+ child.setParent(this);
+ childrenMap.put(identifier, child);
+ }
+
+ public void removeChild(Object identifier) {
+ TreeNode treeNode = (TreeNode) childrenMap.remove(identifier);
+ if (treeNode != null) {
+ treeNode.setParent(null);
+ }
+ }
+
+ public void setData(Object data) {
+ this.data = data;
+ }
+
+ public TreeNode getParent() {
+ return parent;
+ }
+
+ public void setParent(TreeNode parent) {
+ this.parent = parent;
+ }
+
+ public Iterator getChildren() {
+ return childrenMap.entrySet().iterator();
+ }
+
+ public boolean isLeaf() {
+ return childrenMap.isEmpty();
+ }
+
+}
Copied: trunk/framework/api/src/main/java/org/richfaces/model/TreeRange.java (from rev 1450, trunk/framework/api/src/main/java/org/richfaces/component/state/TreeRange.java)
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/model/TreeRange.java (rev 0)
+++ trunk/framework/api/src/main/java/org/richfaces/model/TreeRange.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -0,0 +1,34 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - 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.model;
+
+import org.ajax4jsf.model.Range;
+
+/**
+ * @author Nick Belaevski - nbelaevski(a)exadel.com
+ * created 23.11.2006
+ *
+ */
+public interface TreeRange extends Range {
+ public boolean processNode(TreeRowKey rowKey);
+ public boolean processChildren(TreeRowKey rowKey);
+}
Copied: trunk/framework/api/src/main/java/org/richfaces/model/TreeRowKey.java (from rev 1448, trunk/framework/api/src/main/java/org/richfaces/component/TreeRowKey.java)
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/model/TreeRowKey.java (rev 0)
+++ trunk/framework/api/src/main/java/org/richfaces/model/TreeRowKey.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -0,0 +1,85 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - 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.model;
+
+import java.io.Serializable;
+import java.util.Iterator;
+
+/**
+ * @author Nick Belaevski - nbelaevski(a)exadel.com
+ * created 06.12.2006
+ * Base abstract clas for all tree row keys
+ */
+public abstract class TreeRowKey implements Serializable {
+
+ public static final char SEPARATOR_ESCAPE_CHAR = '_';
+
+ /**
+ * getter for key depth
+ * @return key depth
+ */
+ public abstract int depth();
+
+ /**
+ * getter for subpath iterator
+ * @param fromIndex
+ * @return subpath segments iterator
+ */
+ public abstract Iterator getSubPathIterator(int fromIndex);
+
+ /**
+ * getter for path string representation
+ * @return path string
+ */
+ public abstract String getPath();
+
+ public String toString() {
+ return getPath();
+ }
+
+ /**
+ * tests if specified rowKey is sub-key of this row key
+ * @param rowKey
+ * @return
+ */
+ public boolean isSubKey(TreeRowKey rowKey) {
+ if (rowKey == null) {
+ return false;
+ }
+
+ return (rowKey.getPath() + AbstractTreeDataModel.SEPARATOR).startsWith(getPath());
+ }
+
+ /**
+ * getter for path iterator
+ * @return path segments iterator
+ */
+ public abstract Iterator iterator();
+
+ /**
+ * returns this row key and otherRowKey argument row key common path segments count
+ * @param otherRowKey {@link TreeRowKey} to count common path segments for
+ * @return common path segmments count
+ */
+ public abstract int getCommonPathLength(TreeRowKey otherRowKey);
+
+}
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/ajax/PushEventsCounter.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/ajax/PushEventsCounter.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/ajax/PushEventsCounter.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -3,6 +3,8 @@
import java.io.Serializable;
import java.util.EventObject;
+import org.ajax4jsf.event.PushEventListener;
+
public class PushEventsCounter implements PushEventListener,Serializable {
/**
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/dnd/taglib/DropSourceMetaRule.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/dnd/taglib/DropSourceMetaRule.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/dnd/taglib/DropSourceMetaRule.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -33,8 +33,9 @@
import javax.faces.el.MethodBinding;
-import org.ajax4jsf.dnd.event.DropEvent;
-import org.ajax4jsf.dnd.event.DropSource;
+import org.ajax4jsf.event.DropEvent;
+import org.ajax4jsf.event.DropSource;
+
import com.sun.facelets.FaceletContext;
import com.sun.facelets.tag.MetaRule;
import com.sun.facelets.tag.Metadata;
Modified: trunk/ui/dataTable/src/main/java/org/richfaces/component/UIDataTable.java
===================================================================
--- trunk/ui/dataTable/src/main/java/org/richfaces/component/UIDataTable.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/ui/dataTable/src/main/java/org/richfaces/component/UIDataTable.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -28,7 +28,6 @@
import org.ajax4jsf.ajax.repeat.UIRepeat;
import org.ajax4jsf.component.AjaxSupport;
-import org.ajax4jsf.dnd.Dropzone;
import org.apache.commons.collections.Predicate;
import org.apache.commons.collections.iterators.FilterIterator;
import org.apache.commons.collections.iterators.IteratorChain;
Modified: trunk/ui/drag-drop/src/main/config/component/dragSupport.xml
===================================================================
--- trunk/ui/drag-drop/src/main/config/component/dragSupport.xml 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/ui/drag-drop/src/main/config/component/dragSupport.xml 2007-07-03 21:46:38 UTC (rev 1451)
@@ -46,7 +46,7 @@
<description>
MethodBinding representing an action listener method that will be notified after drag operation
</description>
- <methodargs>org.ajax4jsf.dnd.event.DragEvent.class</methodargs>
+ <methodargs>org.ajax4jsf.event.DragEvent.class</methodargs>
</property>
<property>
<name>disableDefault</name>
@@ -69,13 +69,13 @@
<listener>
<name>dragListener</name>
<listenerclass>
- org.ajax4jsf.dnd.event.DragListener
+ org.ajax4jsf.event.DragListener
</listenerclass>
<componentclass>
- org.ajax4jsf.dnd.Draggable
+ org.richfaces.component.Draggable
</componentclass>
<eventclass>
- org.ajax4jsf.dnd.event.DragEvent
+ org.ajax4jsf.event.DragEvent
</eventclass>
<taghandler generate="true">
<classname>
Modified: trunk/ui/drag-drop/src/main/config/component/dropSupport.xml
===================================================================
--- trunk/ui/drag-drop/src/main/config/component/dropSupport.xml 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/ui/drag-drop/src/main/config/component/dropSupport.xml 2007-07-03 21:46:38 UTC (rev 1451)
@@ -39,7 +39,7 @@
MethodBinding representing an action listener method that will be notified after drop operation.
]]>
</description>
- <methodargs>org.ajax4jsf.dnd.event.DropEvent.class</methodargs>
+ <methodargs>org.ajax4jsf.event.DropEvent.class</methodargs>
</property>
<property>
<name>disableDefault</name>
@@ -68,13 +68,13 @@
<listener>
<name>dropListener</name>
<listenerclass>
- org.ajax4jsf.dnd.event.DropListener
+ org.ajax4jsf.event.DropListener
</listenerclass>
<componentclass>
- org.ajax4jsf.dnd.event.DropSource
+ org.ajax4jsf.event.DropSource
</componentclass>
<eventclass>
- org.ajax4jsf.dnd.event.DropEvent
+ org.ajax4jsf.event.DropEvent
</eventclass>
<methodname>addDropListener</methodname>
<taghandler generate="true">
Modified: trunk/ui/drag-drop/src/main/java/org/richfaces/component/UIDragSupport.java
===================================================================
--- trunk/ui/drag-drop/src/main/java/org/richfaces/component/UIDragSupport.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/ui/drag-drop/src/main/java/org/richfaces/component/UIDragSupport.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -28,9 +28,8 @@
import javax.faces.event.PhaseId;
import org.ajax4jsf.component.AjaxActionComponent;
-import org.ajax4jsf.dnd.Draggable;
-import org.ajax4jsf.dnd.event.DragEvent;
-import org.ajax4jsf.dnd.event.DragListener;
+import org.ajax4jsf.event.DragEvent;
+import org.ajax4jsf.event.DragListener;
import org.ajax4jsf.framework.ajax.AjaxEvent;
/**
Modified: trunk/ui/drag-drop/src/main/java/org/richfaces/component/UIDropSupport.java
===================================================================
--- trunk/ui/drag-drop/src/main/java/org/richfaces/component/UIDropSupport.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/ui/drag-drop/src/main/java/org/richfaces/component/UIDropSupport.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -28,9 +28,8 @@
import javax.faces.event.PhaseId;
import org.ajax4jsf.component.AjaxActionComponent;
-import org.ajax4jsf.dnd.Dropzone;
-import org.ajax4jsf.dnd.event.DropEvent;
-import org.ajax4jsf.dnd.event.DropListener;
+import org.ajax4jsf.event.DropEvent;
+import org.ajax4jsf.event.DropListener;
import org.ajax4jsf.framework.ajax.AjaxEvent;
/**
Modified: trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/DnDEventsExchangeMailer.java
===================================================================
--- trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/DnDEventsExchangeMailer.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/DnDEventsExchangeMailer.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -30,9 +30,9 @@
import javax.faces.context.FacesContext;
import javax.faces.event.FacesEvent;
-import org.ajax4jsf.dnd.Draggable;
-import org.ajax4jsf.dnd.Dropzone;
import org.apache.commons.collections.MultiHashMap;
+import org.richfaces.component.Draggable;
+import org.richfaces.component.Dropzone;
/**
* @author Nick Belaevski - nbelaevski(a)exadel.com
Modified: trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/DnDParametersEncoder.java
===================================================================
--- trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/DnDParametersEncoder.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/DnDParametersEncoder.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -35,8 +35,8 @@
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
-import org.ajax4jsf.dnd.Draggable;
-import org.ajax4jsf.dnd.Dropzone;
+import org.richfaces.component.Draggable;
+import org.richfaces.component.Dropzone;
import org.richfaces.component.UIDndParam;
import org.richfaces.component.nsutils.NSUtils;
import org.richfaces.component.util.MessageUtil;
Modified: trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/DnDValidator.java
===================================================================
--- trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/DnDValidator.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/DnDValidator.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -28,9 +28,9 @@
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
-import org.ajax4jsf.dnd.Draggable;
-import org.ajax4jsf.dnd.Dropzone;
import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
+import org.richfaces.component.Draggable;
+import org.richfaces.component.Dropzone;
import org.richfaces.component.util.MessageUtil;
/**
Modified: trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/DraggableRendererContributor.java
===================================================================
--- trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/DraggableRendererContributor.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/DraggableRendererContributor.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -30,11 +30,11 @@
import javax.faces.event.FacesEvent;
import org.ajax4jsf.dnd.DnDScript;
-import org.ajax4jsf.dnd.Draggable;
-import org.ajax4jsf.dnd.Dropzone;
-import org.ajax4jsf.dnd.event.DragEvent;
+import org.ajax4jsf.event.DragEvent;
import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
import org.ajax4jsf.framework.resource.PrototypeScript;
+import org.richfaces.component.Draggable;
+import org.richfaces.component.Dropzone;
import org.richfaces.renderkit.DnDEventsExchangeMailer.EventCallback;
/**
Modified: trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/DropzoneRendererContributor.java
===================================================================
--- trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/DropzoneRendererContributor.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/DropzoneRendererContributor.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -29,15 +29,15 @@
import javax.faces.event.FacesEvent;
import org.ajax4jsf.dnd.DnDScript;
-import org.ajax4jsf.dnd.Draggable;
-import org.ajax4jsf.dnd.Dropzone;
-import org.ajax4jsf.dnd.event.DropEvent;
+import org.ajax4jsf.event.DropEvent;
import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
import org.ajax4jsf.framework.resource.PrototypeScript;
import org.ajax4jsf.framework.util.javascript.JSFunction;
import org.ajax4jsf.framework.util.javascript.JSFunctionDefinition;
import org.ajax4jsf.framework.util.javascript.JSReference;
import org.ajax4jsf.framework.util.javascript.ScriptUtils;
+import org.richfaces.component.Draggable;
+import org.richfaces.component.Dropzone;
import org.richfaces.json.JSONCollection;
import org.richfaces.json.JSONException;
import org.richfaces.json.JSONMap;
Modified: trunk/ui/drag-drop/src/main/java/org/richfaces/taglib/DragSupportHandler.java
===================================================================
--- trunk/ui/drag-drop/src/main/java/org/richfaces/taglib/DragSupportHandler.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/ui/drag-drop/src/main/java/org/richfaces/taglib/DragSupportHandler.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -82,7 +82,7 @@
static class dragListenerMapper extends Metadata {
- private static final Class[] SIGNATURE = new Class[] { org.ajax4jsf.dnd.event.DragEvent.class };
+ private static final Class[] SIGNATURE = new Class[] { org.ajax4jsf.event.DragEvent.class };
private final TagAttribute _action;
Modified: trunk/ui/drag-drop/src/main/java/org/richfaces/taglib/DropListenerTag.java
===================================================================
--- trunk/ui/drag-drop/src/main/java/org/richfaces/taglib/DropListenerTag.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/ui/drag-drop/src/main/java/org/richfaces/taglib/DropListenerTag.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -30,9 +30,9 @@
import javax.servlet.jsp.tagext.Tag;
import javax.servlet.jsp.tagext.TagSupport;
-import org.ajax4jsf.dnd.event.DropListener;
-import org.ajax4jsf.dnd.event.DropListenerBinding;
-import org.ajax4jsf.dnd.event.DropSource;
+import org.ajax4jsf.event.DropListener;
+import org.ajax4jsf.event.DropListenerBinding;
+import org.ajax4jsf.event.DropSource;
/**
Modified: trunk/ui/drag-drop/src/main/java/org/richfaces/taglib/DropSupportHandler.java
===================================================================
--- trunk/ui/drag-drop/src/main/java/org/richfaces/taglib/DropSupportHandler.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/ui/drag-drop/src/main/java/org/richfaces/taglib/DropSupportHandler.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -81,7 +81,7 @@
static class dropListenerMapper extends Metadata {
- private static final Class[] SIGNATURE = new Class[] { org.ajax4jsf.dnd.event.DropEvent.class };
+ private static final Class[] SIGNATURE = new Class[] { org.ajax4jsf.event.DropEvent.class };
private final TagAttribute _action;
Modified: trunk/ui/tree/src/main/java/org/richfaces/component/CacheableTreeDataModel.java
===================================================================
--- trunk/ui/tree/src/main/java/org/richfaces/component/CacheableTreeDataModel.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/ui/tree/src/main/java/org/richfaces/component/CacheableTreeDataModel.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -27,6 +27,11 @@
import org.ajax4jsf.model.DataVisitor;
import org.ajax4jsf.model.Range;
+import org.richfaces.model.LastElementAware;
+import org.richfaces.model.TreeDataModel;
+import org.richfaces.model.TreeNode;
+import org.richfaces.model.TreeNodeImpl;
+import org.richfaces.model.TreeRowKey;
/**
* @author Nick - mailto:nbelaevski@exadel.com created 08.01.2007
Modified: trunk/ui/tree/src/main/java/org/richfaces/component/CacheableTreeRequestDataModel.java
===================================================================
--- trunk/ui/tree/src/main/java/org/richfaces/component/CacheableTreeRequestDataModel.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/ui/tree/src/main/java/org/richfaces/component/CacheableTreeRequestDataModel.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -21,7 +21,9 @@
package org.richfaces.component;
+import org.richfaces.model.TreeDataModel;
+
/**
* @author Nick Belaevski - nbelaevski(a)exadel.com
* created 06.04.2007
Modified: trunk/ui/tree/src/main/java/org/richfaces/component/UITree.java
===================================================================
--- trunk/ui/tree/src/main/java/org/richfaces/component/UITree.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/ui/tree/src/main/java/org/richfaces/component/UITree.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -36,12 +36,10 @@
import javax.faces.event.PhaseId;
import org.ajax4jsf.ajax.repeat.UIDataAdaptor;
-import org.ajax4jsf.dnd.Draggable;
-import org.ajax4jsf.dnd.Dropzone;
-import org.ajax4jsf.dnd.event.DragEvent;
-import org.ajax4jsf.dnd.event.DragListener;
-import org.ajax4jsf.dnd.event.DropEvent;
-import org.ajax4jsf.dnd.event.DropListener;
+import org.ajax4jsf.event.DragEvent;
+import org.ajax4jsf.event.DragListener;
+import org.ajax4jsf.event.DropEvent;
+import org.ajax4jsf.event.DropListener;
import org.ajax4jsf.framework.ajax.AjaxEvent;
import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
import org.ajax4jsf.model.DataComponentState;
@@ -54,13 +52,18 @@
import org.richfaces.component.events.NodeSelectedEvent;
import org.richfaces.component.events.NodeSelectedListener;
import org.richfaces.component.events.TreeEvents;
-import org.richfaces.component.state.TreeRange;
import org.richfaces.component.state.TreeState;
import org.richfaces.component.state.events.CollapseAllCommandEvent;
import org.richfaces.component.state.events.CollapseNodeCommandEvent;
import org.richfaces.component.state.events.ExpandAllCommandEvent;
import org.richfaces.component.state.events.ExpandNodeCommandEvent;
import org.richfaces.component.state.events.TreeStateCommandEvent;
+import org.richfaces.event.TreeListenerEventsProducer;
+import org.richfaces.model.AbstractTreeDataModel;
+import org.richfaces.model.TreeDataModel;
+import org.richfaces.model.TreeNode;
+import org.richfaces.model.TreeRange;
+import org.richfaces.model.TreeRowKey;
/**
* @author igels Component class providing tree ADT behaviuor
Modified: trunk/ui/tree/src/main/java/org/richfaces/component/UITreeNode.java
===================================================================
--- trunk/ui/tree/src/main/java/org/richfaces/component/UITreeNode.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/ui/tree/src/main/java/org/richfaces/component/UITreeNode.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -12,17 +12,16 @@
import javax.faces.event.AbortProcessingException;
import javax.faces.event.FacesEvent;
-import org.ajax4jsf.dnd.Draggable;
-import org.ajax4jsf.dnd.Dropzone;
-import org.ajax4jsf.dnd.event.DragEvent;
-import org.ajax4jsf.dnd.event.DragListener;
-import org.ajax4jsf.dnd.event.DropEvent;
-import org.ajax4jsf.dnd.event.DropListener;
+import org.ajax4jsf.event.DragEvent;
+import org.ajax4jsf.event.DragListener;
+import org.ajax4jsf.event.DropEvent;
+import org.ajax4jsf.event.DropListener;
import org.ajax4jsf.framework.ajax.AjaxEvent;
import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
import org.richfaces.component.events.NodeExpandedListener;
import org.richfaces.component.events.NodeSelectedListener;
import org.richfaces.component.events.TreeEvents;
+import org.richfaces.event.TreeListenerEventsProducer;
/**
* @author Nick Belaevski - nbelaevski(a)exadel.com created 22.11.2006 Component
Modified: trunk/ui/tree/src/main/java/org/richfaces/component/events/TreeEvents.java
===================================================================
--- trunk/ui/tree/src/main/java/org/richfaces/component/events/TreeEvents.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/ui/tree/src/main/java/org/richfaces/component/events/TreeEvents.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -26,10 +26,10 @@
import javax.faces.event.AbortProcessingException;
import javax.faces.event.FacesEvent;
-import org.ajax4jsf.dnd.event.DragEvent;
-import org.ajax4jsf.dnd.event.DropEvent;
+import org.ajax4jsf.event.DragEvent;
+import org.ajax4jsf.event.DropEvent;
import org.ajax4jsf.framework.ajax.AjaxEvent;
-import org.richfaces.component.TreeListenerEventsProducer;
+import org.richfaces.event.TreeListenerEventsProducer;
/**
* @author Nick Belaevski - nbelaevski(a)exadel.com created 29.11.2006
Modified: trunk/ui/tree/src/main/java/org/richfaces/component/state/TreeState.java
===================================================================
--- trunk/ui/tree/src/main/java/org/richfaces/component/state/TreeState.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/ui/tree/src/main/java/org/richfaces/component/state/TreeState.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -32,9 +32,10 @@
import org.ajax4jsf.model.DataComponentState;
import org.ajax4jsf.model.DataVisitor;
import org.ajax4jsf.model.Range;
-import org.richfaces.component.TreeRowKey;
import org.richfaces.component.UITree;
import org.richfaces.component.state.events.TreeStateCommandsListener;
+import org.richfaces.model.TreeRange;
+import org.richfaces.model.TreeRowKey;
/**
* @author Nick Belaevski - nbelaevski(a)exadel.com created 23.11.2006
Modified: trunk/ui/tree/src/main/java/org/richfaces/component/state/events/CollapseNodeCommandEvent.java
===================================================================
--- trunk/ui/tree/src/main/java/org/richfaces/component/state/events/CollapseNodeCommandEvent.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/ui/tree/src/main/java/org/richfaces/component/state/events/CollapseNodeCommandEvent.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -25,8 +25,8 @@
import javax.faces.component.UIComponent;
-import org.richfaces.component.TreeRowKey;
import org.richfaces.component.UITree;
+import org.richfaces.model.TreeRowKey;
/**
* @author Nick - mailto:nbelaevski@exadel.com
Modified: trunk/ui/tree/src/main/java/org/richfaces/component/state/events/ExpandNodeCommandEvent.java
===================================================================
--- trunk/ui/tree/src/main/java/org/richfaces/component/state/events/ExpandNodeCommandEvent.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/ui/tree/src/main/java/org/richfaces/component/state/events/ExpandNodeCommandEvent.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -25,8 +25,8 @@
import javax.faces.component.UIComponent;
-import org.richfaces.component.TreeRowKey;
import org.richfaces.component.UITree;
+import org.richfaces.model.TreeRowKey;
/**
* @author Nick - mailto:nbelaevski@exadel.com
Modified: trunk/ui/tree/src/main/java/org/richfaces/component/state/events/TreeStateCommandNodeEvent.java
===================================================================
--- trunk/ui/tree/src/main/java/org/richfaces/component/state/events/TreeStateCommandNodeEvent.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/ui/tree/src/main/java/org/richfaces/component/state/events/TreeStateCommandNodeEvent.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -23,7 +23,7 @@
import javax.faces.component.UIComponent;
-import org.richfaces.component.TreeRowKey;
+import org.richfaces.model.TreeRowKey;
/**
* @author Nick - mailto:nbelaevski@exadel.com
Modified: trunk/ui/tree/src/main/java/org/richfaces/component/state/events/TreeStateCommandsListener.java
===================================================================
--- trunk/ui/tree/src/main/java/org/richfaces/component/state/events/TreeStateCommandsListener.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/ui/tree/src/main/java/org/richfaces/component/state/events/TreeStateCommandsListener.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -25,8 +25,8 @@
import javax.faces.event.FacesListener;
-import org.richfaces.component.TreeRowKey;
import org.richfaces.component.UITree;
+import org.richfaces.model.TreeRowKey;
/**
* @author Nick - mailto:nbelaevski@exadel.com
Modified: trunk/ui/tree/src/main/java/org/richfaces/component/xml/XmlTreeDataBuilder.java
===================================================================
--- trunk/ui/tree/src/main/java/org/richfaces/component/xml/XmlTreeDataBuilder.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/ui/tree/src/main/java/org/richfaces/component/xml/XmlTreeDataBuilder.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -29,8 +29,8 @@
import org.apache.commons.digester.Digester;
import org.apache.commons.digester.RulesBase;
-import org.richfaces.component.TreeNode;
-import org.richfaces.component.TreeNodeImpl;
+import org.richfaces.model.TreeNode;
+import org.richfaces.model.TreeNodeImpl;
import org.xml.sax.Attributes;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
Modified: trunk/ui/tree/src/main/java/org/richfaces/renderkit/NodeRendererBase.java
===================================================================
--- trunk/ui/tree/src/main/java/org/richfaces/renderkit/NodeRendererBase.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/ui/tree/src/main/java/org/richfaces/renderkit/NodeRendererBase.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -12,14 +12,13 @@
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
-import org.ajax4jsf.dnd.Draggable;
-import org.ajax4jsf.dnd.Dropzone;
import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
import org.ajax4jsf.framework.renderer.ComponentVariables;
import org.ajax4jsf.framework.renderer.ComponentsVariableResolver;
import org.ajax4jsf.framework.util.javascript.JSFunction;
import org.ajax4jsf.framework.util.javascript.ScriptUtils;
-import org.richfaces.component.TreeRowKey;
+import org.richfaces.component.Draggable;
+import org.richfaces.component.Dropzone;
import org.richfaces.component.UITree;
import org.richfaces.component.UITreeNode;
import org.richfaces.component.events.AjaxSelectedEvent;
@@ -29,6 +28,7 @@
import org.richfaces.component.state.events.CollapseNodeCommandEvent;
import org.richfaces.component.state.events.ExpandNodeCommandEvent;
import org.richfaces.component.util.ViewUtil;
+import org.richfaces.model.TreeRowKey;
/**
* @author Nick - mailto:nbelaevski@exadel.com created 23.11.2006
Modified: trunk/ui/tree/src/main/java/org/richfaces/renderkit/TreeDataModelEventNavigator.java
===================================================================
--- trunk/ui/tree/src/main/java/org/richfaces/renderkit/TreeDataModelEventNavigator.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/ui/tree/src/main/java/org/richfaces/renderkit/TreeDataModelEventNavigator.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -25,9 +25,9 @@
import javax.faces.context.FacesContext;
-import org.richfaces.component.LastElementAware;
-import org.richfaces.component.TreeRowKey;
import org.richfaces.component.UITree;
+import org.richfaces.model.LastElementAware;
+import org.richfaces.model.TreeRowKey;
Modified: trunk/ui/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java
===================================================================
--- trunk/ui/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/ui/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -43,14 +43,14 @@
import org.ajax4jsf.framework.util.javascript.JSReference;
import org.ajax4jsf.framework.util.javascript.ScriptUtils;
import org.ajax4jsf.model.DataVisitor;
-import org.richfaces.component.LastElementAware;
-import org.richfaces.component.TreeRowKey;
import org.richfaces.component.UITree;
import org.richfaces.component.UITreeNode;
import org.richfaces.component.nsutils.NSUtils;
-import org.richfaces.component.state.TreeRange;
import org.richfaces.component.state.TreeState;
import org.richfaces.component.state.TreeStateAdvisor;
+import org.richfaces.model.LastElementAware;
+import org.richfaces.model.TreeRange;
+import org.richfaces.model.TreeRowKey;
public abstract class TreeRendererBase extends CompositeRenderer {
Modified: trunk/ui/tree/src/test/java/org/richfaces/component/ListRowKeyTest.java
===================================================================
--- trunk/ui/tree/src/test/java/org/richfaces/component/ListRowKeyTest.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/ui/tree/src/test/java/org/richfaces/component/ListRowKeyTest.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -30,6 +30,8 @@
import junit.framework.TestCase;
import org.apache.commons.collections.iterators.ArrayIterator;
+import org.richfaces.model.ListRowKey;
+import org.richfaces.model.TreeRowKey;
/**
* @author Nick Belaevski - nbelaevski(a)exadel.com
Modified: trunk/ui/tree/src/test/java/org/richfaces/component/TreeComponentTest.java
===================================================================
--- trunk/ui/tree/src/test/java/org/richfaces/component/TreeComponentTest.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/ui/tree/src/test/java/org/richfaces/component/TreeComponentTest.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -38,10 +38,10 @@
import javax.faces.event.PhaseId;
import javax.servlet.http.HttpServletResponse;
-import org.ajax4jsf.dnd.event.DragEvent;
-import org.ajax4jsf.dnd.event.DragListener;
-import org.ajax4jsf.dnd.event.DropEvent;
-import org.ajax4jsf.dnd.event.DropListener;
+import org.ajax4jsf.event.DragEvent;
+import org.ajax4jsf.event.DragListener;
+import org.ajax4jsf.event.DropEvent;
+import org.ajax4jsf.event.DropListener;
import org.ajax4jsf.framework.resource.InternetResource;
import org.ajax4jsf.framework.resource.InternetResourceBuilder;
import org.ajax4jsf.framework.resource.ResourceBuilderImpl;
@@ -410,7 +410,7 @@
}
/**
- * Test method for {@link org.richfaces.component.UITreeNode#addDropListener(org.ajax4jsf.dnd.event.DropListener)}.
+ * Test method for {@link org.richfaces.component.UITreeNode#addDropListener(org.ajax4jsf.event.DropListener)}.
*/
public final void testAddDropListener() {
DropListener listener = new DropListener() {
@@ -439,7 +439,7 @@
}
/**
- * Test method for {@link org.richfaces.component.UITreeNode#addDragListener(org.ajax4jsf.dnd.event.DragListener)}.
+ * Test method for {@link org.richfaces.component.UITreeNode#addDragListener(org.ajax4jsf.event.DragListener)}.
*/
public final void testAddDragListener() {
DragListener listener = new DragListener() {
Modified: trunk/ui/tree/src/test/java/org/richfaces/component/TreeModelTest.java
===================================================================
--- trunk/ui/tree/src/test/java/org/richfaces/component/TreeModelTest.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/ui/tree/src/test/java/org/richfaces/component/TreeModelTest.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -34,6 +34,11 @@
import org.ajax4jsf.model.DataVisitor;
import org.richfaces.component.xml.XmlNodeData;
import org.richfaces.component.xml.XmlTreeDataBuilder;
+import org.richfaces.model.AbstractTreeDataModel;
+import org.richfaces.model.LastElementAware;
+import org.richfaces.model.ListRowKey;
+import org.richfaces.model.TreeDataModel;
+import org.richfaces.model.TreeNode;
import org.xml.sax.InputSource;
/**
Modified: trunk/ui/tree/src/test/java/org/richfaces/component/TreeNodeTest.java
===================================================================
--- trunk/ui/tree/src/test/java/org/richfaces/component/TreeNodeTest.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/ui/tree/src/test/java/org/richfaces/component/TreeNodeTest.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -23,6 +23,9 @@
import java.util.Iterator;
+import org.richfaces.model.TreeNode;
+import org.richfaces.model.TreeNodeImpl;
+
import junit.framework.TestCase;
/**
Modified: trunk/ui/tree/src/test/java/org/richfaces/component/events/TreeEventsTest.java
===================================================================
--- trunk/ui/tree/src/test/java/org/richfaces/component/events/TreeEventsTest.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/ui/tree/src/test/java/org/richfaces/component/events/TreeEventsTest.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -26,8 +26,8 @@
import javax.faces.event.FacesEvent;
import javax.faces.event.FacesListener;
-import org.ajax4jsf.dnd.event.DragEvent;
-import org.ajax4jsf.dnd.event.DropEvent;
+import org.ajax4jsf.event.DragEvent;
+import org.ajax4jsf.event.DropEvent;
import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
import org.ajax4jsf.tests.MockMethodBinding;
import org.ajax4jsf.tests.MockViewRoot;
Modified: trunk/ui/tree/src/test/java/org/richfaces/component/state/events/CollapseNodeCommandEventTest.java
===================================================================
--- trunk/ui/tree/src/test/java/org/richfaces/component/state/events/CollapseNodeCommandEventTest.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/ui/tree/src/test/java/org/richfaces/component/state/events/CollapseNodeCommandEventTest.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -28,9 +28,9 @@
import javax.faces.event.FacesListener;
import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
-import org.richfaces.component.ListRowKey;
-import org.richfaces.component.TreeRowKey;
import org.richfaces.component.UITree;
+import org.richfaces.model.ListRowKey;
+import org.richfaces.model.TreeRowKey;
import junit.framework.TestCase;
Modified: trunk/ui/tree/src/test/java/org/richfaces/component/state/events/ExpandNodeCommandEventTest.java
===================================================================
--- trunk/ui/tree/src/test/java/org/richfaces/component/state/events/ExpandNodeCommandEventTest.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/ui/tree/src/test/java/org/richfaces/component/state/events/ExpandNodeCommandEventTest.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -28,9 +28,9 @@
import javax.faces.event.FacesListener;
import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
-import org.richfaces.component.ListRowKey;
-import org.richfaces.component.TreeRowKey;
import org.richfaces.component.UITree;
+import org.richfaces.model.ListRowKey;
+import org.richfaces.model.TreeRowKey;
import junit.framework.TestCase;
Modified: trunk/ui/tree/src/test/java/org/richfaces/component/state/events/MockTreeStateCommandsListener.java
===================================================================
--- trunk/ui/tree/src/test/java/org/richfaces/component/state/events/MockTreeStateCommandsListener.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/ui/tree/src/test/java/org/richfaces/component/state/events/MockTreeStateCommandsListener.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -23,8 +23,8 @@
import java.io.IOException;
-import org.richfaces.component.TreeRowKey;
import org.richfaces.component.UITree;
+import org.richfaces.model.TreeRowKey;
/**
* @author Nick Belaevski - nbelaevski(a)exadel.com
Modified: trunk/ui/tree/src/test/java/org/richfaces/component/xml/TreeDataBuilderTest.java
===================================================================
--- trunk/ui/tree/src/test/java/org/richfaces/component/xml/TreeDataBuilderTest.java 2007-07-03 20:13:44 UTC (rev 1450)
+++ trunk/ui/tree/src/test/java/org/richfaces/component/xml/TreeDataBuilderTest.java 2007-07-03 21:46:38 UTC (rev 1451)
@@ -26,7 +26,7 @@
import junit.framework.TestCase;
-import org.richfaces.component.TreeNode;
+import org.richfaces.model.TreeNode;
import org.xml.sax.InputSource;
/**
17 years, 4 months
JBoss Rich Faces SVN: r1450 - in trunk: framework/api/src/main/java/org/ajax4jsf/ajax/repeat and 26 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2007-07-03 16:13:44 -0400 (Tue, 03 Jul 2007)
New Revision: 1450
Added:
trunk/framework/api/src/main/java/org/ajax4jsf/component/
trunk/framework/api/src/main/java/org/ajax4jsf/component/AjaxChildrenEncoder.java
trunk/framework/api/src/main/java/org/ajax4jsf/component/AjaxComponent.java
trunk/framework/api/src/main/java/org/ajax4jsf/component/AjaxContainer.java
trunk/framework/api/src/main/java/org/ajax4jsf/component/AjaxContainerBase.java
trunk/framework/api/src/main/java/org/ajax4jsf/component/AjaxDataEncoder.java
trunk/framework/api/src/main/java/org/ajax4jsf/component/AjaxOutput.java
trunk/framework/api/src/main/java/org/ajax4jsf/component/AjaxSupport.java
trunk/framework/api/src/main/java/org/ajax4jsf/model/
trunk/framework/api/src/main/java/org/ajax4jsf/model/DataComponentState.java
trunk/framework/api/src/main/java/org/ajax4jsf/model/DataVisitor.java
trunk/framework/api/src/main/java/org/ajax4jsf/model/ExtendedDataModel.java
trunk/framework/api/src/main/java/org/ajax4jsf/model/Range.java
trunk/framework/api/src/main/java/org/ajax4jsf/model/RepeatState.java
trunk/framework/api/src/main/java/org/ajax4jsf/model/SequenceDataModel.java
trunk/framework/api/src/main/java/org/ajax4jsf/model/SequenceRange.java
trunk/framework/api/src/main/java/org/ajax4jsf/model/SerializableDataModel.java
Removed:
trunk/framework/api/src/main/java/org/ajax4jsf/ajax/repeat/AjaxDataEncoder.java
trunk/framework/api/src/main/java/org/ajax4jsf/ajax/repeat/DataComponentState.java
trunk/framework/api/src/main/java/org/ajax4jsf/ajax/repeat/DataVisitor.java
trunk/framework/api/src/main/java/org/ajax4jsf/ajax/repeat/ExtendedDataModel.java
trunk/framework/api/src/main/java/org/ajax4jsf/ajax/repeat/Range.java
trunk/framework/api/src/main/java/org/ajax4jsf/ajax/repeat/RepeatState.java
trunk/framework/api/src/main/java/org/ajax4jsf/ajax/repeat/SequenceDataModel.java
trunk/framework/api/src/main/java/org/ajax4jsf/ajax/repeat/SequenceRange.java
trunk/framework/api/src/main/java/org/ajax4jsf/ajax/repeat/SerializableDataModel.java
trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxChildrenEncoder.java
trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxComponent.java
trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxContainer.java
trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxContainerBase.java
trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxOutput.java
trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxSupport.java
Modified:
trunk/framework/api/src/main/java/org/richfaces/component/AbstractTreeDataModel.java
trunk/framework/api/src/main/java/org/richfaces/component/TreeDataModel.java
trunk/framework/api/src/main/java/org/richfaces/component/state/TreeRange.java
trunk/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/UIDataAdaptor.java
trunk/framework/impl/src/main/java/org/ajax4jsf/component/AjaxActionComponent.java
trunk/framework/impl/src/main/java/org/ajax4jsf/component/AjaxInputComponent.java
trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxContextImpl.java
trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxRegionBrige.java
trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxViewRoot.java
trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/EventValueBinding.java
trunk/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxChildrenRenderer.java
trunk/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxContainerRenderer.java
trunk/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxRendererUtils.java
trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxForm.java
trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxOutputPanel.java
trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxRegion.java
trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxStatus.java
trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxSupport.java
trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIInclude.java
trunk/ui/core/src/main/java/org/ajax4jsf/ajax/repeat/UIRepeat.java
trunk/ui/core/src/main/java/org/ajax4jsf/ajax/repeat/UISelector.java
trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/html/AjaxPageRenderer.java
trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/html/RepeatRenderer.java
trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxReRendrRule.java
trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/jsp/AjaxRegionTag.java
trunk/ui/dataTable/src/main/java/org/richfaces/component/UIDataTable.java
trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractRowsRenderer.java
trunk/ui/dataTable/src/test/java/org/richfaces/component/DataTableComponentTest.java
trunk/ui/menu-components/src/main/java/org/richfaces/component/UIMenuItem.java
trunk/ui/simpleTogglePanel/src/main/java/org/richfaces/component/UISimpleTogglePanel.java
trunk/ui/suggestionbox/src/main/java/org/richfaces/component/UISuggestionBox.java
trunk/ui/tabPanel/src/main/java/org/richfaces/component/UITab.java
trunk/ui/togglePanel/src/main/java/org/richfaces/component/UIToggleControl.java
trunk/ui/tree/src/main/java/org/richfaces/component/CacheableTreeDataModel.java
trunk/ui/tree/src/main/java/org/richfaces/component/UITree.java
trunk/ui/tree/src/main/java/org/richfaces/component/state/TreeState.java
trunk/ui/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java
trunk/ui/tree/src/test/java/org/richfaces/component/TreeModelTest.java
Log:
packages and classes refactor
Deleted: trunk/framework/api/src/main/java/org/ajax4jsf/ajax/repeat/AjaxDataEncoder.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/ajax/repeat/AjaxDataEncoder.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/ajax/repeat/AjaxDataEncoder.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -1,43 +0,0 @@
-/**
- * License Agreement.
- *
- * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.ajax4jsf.ajax.repeat;
-
-import java.util.Set;
-
-import org.ajax4jsf.framework.ajax.AjaxChildrenEncoder;
-
-/**
- * Interface for iterable component, allowed for render given set of rows in ajax response.
- * @author shura
- *
- */
-public interface AjaxDataEncoder extends AjaxChildrenEncoder {
-
- /**
- * @return Set for values of {@link ExtendedDataModel} keys, encoded in ajax response by this component.
- */
- public Set getAjaxKeys();
-
- public void setAjaxKeys(Set ajaxKeys);
-
-
-}
Deleted: trunk/framework/api/src/main/java/org/ajax4jsf/ajax/repeat/DataComponentState.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/ajax/repeat/DataComponentState.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/ajax/repeat/DataComponentState.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -1,42 +0,0 @@
-/**
- * License Agreement.
- *
- * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.ajax4jsf.ajax.repeat;
-
-import javax.faces.component.StateHolder;
-
-/**
- * Interface for classes keeped current iterable component state, as :
- * active data objects range
- * sorting order
- * tree nodes expanded state
- *
- * @author shura
- *
- */
-public interface DataComponentState {
-
- /**
- * Build used data objects range for iteration.
- * @return
- */
- public abstract Range getRange();
-}
Deleted: trunk/framework/api/src/main/java/org/ajax4jsf/ajax/repeat/DataVisitor.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/ajax/repeat/DataVisitor.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/ajax/repeat/DataVisitor.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -1,45 +0,0 @@
-/**
- * License Agreement.
- *
- * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.ajax4jsf.ajax.repeat;
-
-import java.io.IOException;
-
-import javax.faces.context.FacesContext;
-
-/**
- * Interface for classes, able to receive visitor processing calls from ExtendedDataModel
- * @author shura
- *
- */
-public interface DataVisitor {
-
- /**
- * This method called back ( as visitor ) from {@link ExtendedDataModel#walk(FacesContext, DataVisitor, Range)} for
- * each row.
- * @param context current JSF context.
- * @param rowKey current row key of DataModel
- * @param argument Implementation-specific argument
- * @throws IOException
- */
- public void process(FacesContext context,Object rowKey, Object argument) throws IOException;
-
-}
Deleted: trunk/framework/api/src/main/java/org/ajax4jsf/ajax/repeat/ExtendedDataModel.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/ajax/repeat/ExtendedDataModel.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/ajax/repeat/ExtendedDataModel.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -1,83 +0,0 @@
-/**
- * License Agreement.
- *
- * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.ajax4jsf.ajax.repeat;
-
-import java.io.IOException;
-import java.io.Serializable;
-
-import javax.faces.context.FacesContext;
-import javax.faces.model.DataModel;
-
-/**
- * Extesion for {@link DataModel} , for support complex data structure, like tree, spreadsheet etc
- * in iterable components.
- * @author shura
- *
- */
-public abstract class ExtendedDataModel extends DataModel {
-
- /**
- * <p>Instead of simple <code>int</code> for current state selection, this model can use any object for
- * select current data. Implementation depend on model, with any restrictions :</p>
- * <ol>
- * <li> key must be {@link Serializable}.</li>
- * <li>{@link Object#toString()} method must return representation compatible with {@link javax.faces.component.UIComponent#getClientId(javax.faces.context.FacesContext)},
- * as far as this string will be appended to clientId of iterator component.</li>
- * </ol>
- * @param key key for select current data, or null for clear selection.
- */
- public abstract void setRowKey(Object key);
-
- /**
- * @return key for selected data or <code>null</code>
- */
- public abstract Object getRowKey();
-
- /**
- * Iteration component can support save data for use at decoding/validation/update phases to avoid unnessesary calls to original models,
- * for example - to avoid requests to database until all data is validated.
- * @return
- */
- public SerializableDataModel getSerializableModel(Range range){
- // By default, model not serializable.
- return null;
- }
-
-
- /**
- * Iterate over model by "visitor" pattern, for given range
- * @param context current JSF context.
- * @param visitor instance of {@link DataVisitor}, for process each row.
- * @param range Implementation-specific range of data keys.
- * @param argument Implementation-specific argument
- * @throws IOException
- */
- public abstract void walk(FacesContext context,DataVisitor visitor,Range range, Object argument) throws IOException;
-
- /**
- * Create Iterator on all row keys for given range.
- * @param range - Implementation-specific range of data keys.
- * @return
- */
-// public abstract Iterator dataIterator(Range range);
-
-}
Deleted: trunk/framework/api/src/main/java/org/ajax4jsf/ajax/repeat/Range.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/ajax/repeat/Range.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/ajax/repeat/Range.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -1,33 +0,0 @@
-/**
- * License Agreement.
- *
- * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.ajax4jsf.ajax.repeat;
-
-/**
- * Marker interface for building iterator over dataModel values. over {@link ExtendedDataModel} elements.
- * It can be simple min/max values for data table, but also can provide set of expanded/collapsed nodes in tree,
- * can provide sorting order,
- * @author shura
- *
- */
-public interface Range {
-
-}
Deleted: trunk/framework/api/src/main/java/org/ajax4jsf/ajax/repeat/RepeatState.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/ajax/repeat/RepeatState.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/ajax/repeat/RepeatState.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -1,81 +0,0 @@
-/**
- * License Agreement.
- *
- * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.ajax4jsf.ajax.repeat;
-
-import java.io.Serializable;
-
-import javax.faces.context.FacesContext;
-
-/**
- * @author shura
- *
- */
-public class RepeatState implements DataComponentState,Serializable {
-
- /**
- *
- */
- private static final long serialVersionUID = -5552520123654180445L;
-
- private int _rows = -1;
-
- private int _first = 0;
-
-
- /**
- * @return the first
- */
- public int getFirst() {
- return _first;
- }
-
- /**
- * @param first the first to set
- */
- public void setFirst(int first) {
- this._first = first;
- }
-
- /**
- * @return the rows
- */
- public int getRows() {
- return _rows;
- }
-
- /**
- * @param rows the rows to set
- */
- public void setRows(int rows) {
- this._rows = rows;
- }
-
- /* (non-Javadoc)
- * @see org.ajax4jsf.ajax.repeat.DataComponentState#getRange()
- */
- public Range getRange() {
- // TODO Auto-generated method stub
- return new SequenceRange(getFirst(),getRows());
- }
-
-
-}
Deleted: trunk/framework/api/src/main/java/org/ajax4jsf/ajax/repeat/SequenceDataModel.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/ajax/repeat/SequenceDataModel.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/ajax/repeat/SequenceDataModel.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -1,202 +0,0 @@
-/**
- * License Agreement.
- *
- * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.ajax4jsf.ajax.repeat;
-
-import java.io.IOException;
-
-import javax.faces.context.FacesContext;
-import javax.faces.model.DataModel;
-
-/**
- * @author shura
- *
- */
-public class SequenceDataModel extends ExtendedDataModel {
-
- private DataModel wrappedModel;
-
- /**
- * @param wrapped
- */
- public SequenceDataModel(DataModel wrapped) {
- super();
- this.wrappedModel = wrapped;
- }
-
- /* (non-Javadoc)
- * @see org.ajax4jsf.ajax.repeat.ExtendedDataModel#dataIterator(org.ajax4jsf.ajax.repeat.Range)
- */
-/* public Iterator dataIterator(Range range) {
- final SequenceRange seqRange = (SequenceRange) range;
- int rows = seqRange.getRows();
- int rowCount = wrapped.getRowCount();
- final int firstRow = seqRange.getFirstRow();
- if(rows > 0){
- rows += firstRow;
- if(rowCount >=0){
- rows = Math.min(rows, rowCount);
- }
- } else if(rowCount >=0 ){
- rows = rowCount;
- }
- final int maxRow = rows;
- return new Iterator(){
-
- int rowIndex = firstRow;
-
- public boolean hasNext() {
- // TODO Auto-generated method stub
- return maxRow < 0 || rowIndex < maxRow;
- }
-
- public Object next() {
- // TODO Auto-generated method stub
- return new Integer(rowIndex++);
- }
-
- public void remove() {
- throw new IllegalStateException();
- }
-
- };
- }
-*/
- public void walk(FacesContext context, DataVisitor visitor, Range range, Object argument) throws IOException {
- final SequenceRange seqRange = (SequenceRange) range;
- int rows = seqRange.getRows();
- int rowCount = wrappedModel.getRowCount();
- int currentRow = seqRange.getFirstRow();
- if(rows > 0){
- rows += currentRow;
- if(rowCount >=0){
- rows = Math.min(rows, rowCount);
- }
- } else if(rowCount >=0 ){
- rows = rowCount;
- } else {
- rows = -1;
- }
- while (rows < 0 || currentRow < rows) {
- wrappedModel.setRowIndex(currentRow);
- if(wrappedModel.isRowAvailable()){
- visitor.process(context, new Integer(currentRow), argument);
- } else {
- break;
- }
- currentRow++;
- }
-
- }
-
- /* (non-Javadoc)
- * @see org.ajax4jsf.ajax.repeat.ExtendedDataModel#getRowKey()
- */
- public Object getRowKey() {
- int index = wrappedModel.getRowIndex();
- if(index<0){
- return null;
- }
- return new Integer(index);
- }
-
-
- /* (non-Javadoc)
- * @see org.ajax4jsf.ajax.repeat.ExtendedDataModel#setRowKey(java.lang.Object)
- */
- public void setRowKey(Object key) {
- if(null == key){
- wrappedModel.setRowIndex(-1);
- } else {
- Integer index = (Integer) key;
- wrappedModel.setRowIndex(index.intValue());
- }
- }
-
- /* (non-Javadoc)
- * @see javax.faces.model.DataModel#getRowCount()
- */
- public int getRowCount() {
- // TODO Auto-generated method stub
- return wrappedModel.getRowCount();
- }
-
- /* (non-Javadoc)
- * @see javax.faces.model.DataModel#getRowData()
- */
- public Object getRowData() {
- // TODO Auto-generated method stub
- return wrappedModel.getRowData();
- }
-
- /* (non-Javadoc)
- * @see javax.faces.model.DataModel#getRowIndex()
- */
- public int getRowIndex() {
- // TODO Auto-generated method stub
- return wrappedModel.getRowIndex();
- }
-
- /* (non-Javadoc)
- * @see javax.faces.model.DataModel#getWrappedData()
- */
- public Object getWrappedData() {
- // TODO Auto-generated method stub
- return wrappedModel.getWrappedData();
- }
-
- /* (non-Javadoc)
- * @see javax.faces.model.DataModel#isRowAvailable()
- */
- public boolean isRowAvailable() {
- // TODO Auto-generated method stub
- return wrappedModel.isRowAvailable();
- }
-
- /* (non-Javadoc)
- * @see javax.faces.model.DataModel#setRowIndex(int)
- */
- public void setRowIndex(int rowIndex) {
- wrappedModel.setRowIndex(rowIndex);
- }
-
- /* (non-Javadoc)
- * @see javax.faces.model.DataModel#setWrappedData(java.lang.Object)
- */
- public void setWrappedData(Object data) {
- wrappedModel.setWrappedData(data);
- }
-
- /**
- * @return the wrappedModel
- */
- protected DataModel getWrappedModel() {
- return this.wrappedModel;
- }
-
- /**
- * @param wrappedModel the wrappedModel to set
- */
- protected void setWrappedModel(DataModel wrappedModel) {
- this.wrappedModel = wrappedModel;
- }
-
-}
Deleted: trunk/framework/api/src/main/java/org/ajax4jsf/ajax/repeat/SequenceRange.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/ajax/repeat/SequenceRange.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/ajax/repeat/SequenceRange.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -1,58 +0,0 @@
-/**
- * License Agreement.
- *
- * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.ajax4jsf.ajax.repeat;
-
-/**
- * @author shura
- *
- */
-public class SequenceRange implements Range {
-
- private int firstRow = 0;
-
- private int rows = -1;
-
- /**
- * @return the firstRow
- */
- public int getFirstRow() {
- return firstRow;
- }
-
- /**
- * @return the rows
- */
- public int getRows() {
- return rows;
- }
-
- /**
- * @param firstRow
- * @param rows
- */
- public SequenceRange(int firstRow, int rows) {
- super();
- this.firstRow = firstRow;
- this.rows = rows;
- }
-
-}
Deleted: trunk/framework/api/src/main/java/org/ajax4jsf/ajax/repeat/SerializableDataModel.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/ajax/repeat/SerializableDataModel.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/ajax/repeat/SerializableDataModel.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -1,39 +0,0 @@
-/**
- * License Agreement.
- *
- * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.ajax4jsf.ajax.repeat;
-
-import java.io.Serializable;
-
-/**
- * Serializable version of {@link ExtendedDataModel}, for save lightweight version of data
- *
- * @author shura
- *
- */
-public abstract class SerializableDataModel extends ExtendedDataModel implements Serializable {
-
- /**
- * Method called after update all model values. For example, developer can update
- * database with new values of modified rows.
- */
- public abstract void update();
-}
Copied: trunk/framework/api/src/main/java/org/ajax4jsf/component/AjaxChildrenEncoder.java (from rev 1448, trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxChildrenEncoder.java)
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/component/AjaxChildrenEncoder.java (rev 0)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/component/AjaxChildrenEncoder.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -0,0 +1,55 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.component;
+
+import java.io.IOException;
+import java.util.Set;
+
+import javax.faces.context.FacesContext;
+
+/**
+ * Marker interface for components, have ability to manipulate rendering in case of Ajax responses.
+ * Such as ajax-enabled iterator, menus etc
+ * @author shura
+ *
+ */
+public interface AjaxChildrenEncoder {
+
+ /**
+ * Iterate over all childs of components. If component id contains in list ,
+ * or, if list is empty, compotents is submitted form - render it.
+ * TODO - Instead of calculate full path for every component, build current Path
+ * for componet and send as parameter.
+ *
+ * @param context -
+ * current context
+ * @param component -
+ * curent faces component.
+ * @param ids -
+ * list of Id to render.
+ * @throws IOException
+ */
+ public void encodeAjaxChild(FacesContext context,
+ String path,Set ids,Set renderedAreas) throws IOException ;
+
+
+}
Copied: trunk/framework/api/src/main/java/org/ajax4jsf/component/AjaxComponent.java (from rev 1448, trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxComponent.java)
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/component/AjaxComponent.java (rev 0)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/component/AjaxComponent.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -0,0 +1,194 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.component;
+
+
+/**
+ * Base Interface for Ajax-enabled acting components.
+ * TODO - extend <code>ActionSource</code>???
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.2 $ $Date: 2007/01/23 20:01:01 $
+ *
+ */
+public interface AjaxComponent
+{
+
+ public static final String AJAX_COMPONETT_PARAMETER = AjaxComponent.class.getName()+".parameter";
+
+ /**
+ * setter method for property
+ * @param new value of String, <code>Collection</code> or array of component's Id , updated in case of Ajax request by parent component. to set
+ */
+ public abstract void setReRender(Object targetId);
+
+ /**
+ * @return value or result of valueBinding of String, <code>Collection</code> or array of component's Id , updated in case of Ajax request by parent component.
+ */
+ public abstract Object getReRender();
+
+ /**
+ * setter method for property
+ * @param new value of ajaxType of control component - link or input to set
+ */
+// public abstract void setAjaxType(String ajaxType);
+
+ /**
+ * @return value or result of valueBinding of ajaxType of control component - link or input
+ */
+// public abstract String getAjaxType();
+
+ /**
+ * setter method for property
+ * @param new value of Id ( in format of UIComponent.findComponent() call ) of request status indicator to set
+ */
+ public abstract void setStatus(String status);
+
+ /**
+ * @return value or result of valueBinding of Id ( in format of UIComponent.findComponent() call ) of request status indicator
+ */
+ public abstract String getStatus();
+
+ /**
+ * setter method for property
+ * @param new value of Name of JavaScript function, called on complete Ajax request to set
+ */
+ public abstract void setOncomplete(String oncomplete);
+
+ /**
+ * @return value or result of valueBinding of Name of JavaScript function, called on complete Ajax request
+ */
+ public abstract String getOncomplete();
+
+ /**
+ * setter method for property
+ * @param new value of custom data translated to oncomplete function by AJAX
+ */
+ public abstract void setData(Object data);
+
+ /**
+ * @return value of custom data for translate to oncomplete function by AJAX
+ */
+ public abstract Object getData();
+
+ /**
+ * setter method for property
+ * @param new value of Submit ( or not ) full form on Ajax action. to set
+ */
+ public abstract void setLimitToList(boolean submitForm);
+
+ /**
+ * @return value or result of valueBinding of Submit ( or not ) full form on Ajax action.
+ */
+ public abstract boolean isLimitToList();
+
+ /**
+ * setter method for property
+ * @param new value of Submit ( or not ) full form on Ajax action. to set
+ */
+ public abstract void setAjaxSingle(boolean single);
+
+ /**
+ * @return value or result of valueBinding of Submit ( or not ) full form on Ajax action.
+ */
+ public abstract boolean isAjaxSingle();
+
+ /**
+ * Getter for bypassUpdates bean property. Indicate that component must invoke listeners after Process Validators phase
+ * and force render response after it - since no values of components will be updated. Can be used to perform validation of client input
+ * using server-side validators.
+ * @return true if component must force render after validation phase.
+ */
+ public abstract boolean isBypassUpdates();
+
+ /**
+ * Setter for bypassUpdates bean property.
+ * @param bypass true if component must force render after validation phase.
+ */
+ public abstract void setBypassUpdates(boolean bypass);
+
+ /**
+ * Getter for property name of events queue on client side - for avoid to send requests too frequnly ( on key events, for example ), implementation will be generated by
+ * componnents-generator
+ * @return property value
+ */
+ public abstract String getEventsQueue();
+
+ /**
+ * Setter for flag indicated aborting unfinished ajax requests in queue.
+ * @param newvalue - new property value. If true, unfinished request in queue will be aborted on new events.
+ */
+ public abstract void setIgnoreDupResponses(boolean newvalue);
+
+
+ /**
+ * Getter for property flag indicated aborting unfinished ajax requests in queue.
+ * componnents-generator
+ * @return property value
+ */
+ public abstract boolean isIgnoreDupResponses();
+
+ /**
+ * Setter for property name of events queue on client side - for avoid to send requests too frequnly ( on key events, for example ), implementation will be generated by
+ * componnents-generator
+ * @param newvalue - new property value
+ */
+ public abstract void setEventsQueue(String newvalue);
+
+ /**
+ * Getter for property Delay ( in ms. ) for send ajax request on JavaScript event. In conjunction with events queue can reduce number of requests on keyboard or mouse move events., implementation will be generated by
+ * componnents-generator
+ * @return property value
+ */
+ public abstract int getRequestDelay();
+
+ /**
+ * Setter for property Delay ( in ms. ) for send ajax request on JavaScript event. In conjunction with events queue can reduce number of requests on keyboard or mouse move events., implementation will be generated by
+ * componnents-generator
+ * @param newvalue - new property value
+ */
+ public abstract void setRequestDelay(int newvalue);
+
+ /**
+ * Getter for request timeout
+ * @return timeout in ms.
+ */
+ public abstract int getTimeout();
+
+ /**
+ * Setter for request timeout
+ * @param timeout new value in ms.
+ */
+ public abstract void setTimeout(int timeout);
+
+
+ /**
+ * Setter for a 'focus' bean property - id of component( or of DOM element ), to set focus after AJAX request.
+ * @param focus
+ */
+ public abstract void setFocus(String focus);
+
+ /**
+ * @return
+ */
+ public abstract String getFocus();
+
+}
\ No newline at end of file
Copied: trunk/framework/api/src/main/java/org/ajax4jsf/component/AjaxContainer.java (from rev 1448, trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxContainer.java)
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/component/AjaxContainer.java (rev 0)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/component/AjaxContainer.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -0,0 +1,56 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.component;
+
+import java.io.IOException;
+
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.framework.ajax.AjaxSource;
+
+
+/**
+ * Extend Ajax-enabled region to support event listeners on Ajax requests.
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:39 $
+ *
+ */
+public interface AjaxContainer extends AjaxContainerBase, AjaxSource
+{
+
+ /**
+ * Is ajax container must re-render all output from page or only it's children ?
+ * @return true if all ajax-enabled to re-render araes on page must be checked for output.
+ */
+ public abstract boolean isRenderRegionOnly();
+
+ public abstract void setRenderRegionOnly(boolean reRenderPage);
+
+ /**
+ * Encode AJAX response from this container ( call encode methods for selected components only )
+ * @param context
+ * @throws IOException
+ */
+ public void encodeAjax(FacesContext context) throws IOException ;
+
+
+}
\ No newline at end of file
Copied: trunk/framework/api/src/main/java/org/ajax4jsf/component/AjaxContainerBase.java (from rev 1448, trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxContainerBase.java)
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/component/AjaxContainerBase.java (rev 0)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/component/AjaxContainerBase.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -0,0 +1,94 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.component;
+
+import java.util.Collection;
+import java.util.Set;
+
+import javax.faces.el.MethodBinding;
+
+/**
+ * Base interface for controller component, managed AJAX Requests.
+ * Component, implemented this interface, must always return <code>true</code> for
+ * <code>javax.faces.component.UIComponent#getRendersChildren()</code> method.
+ * in common, set of components, rendered of current request, maintain by it.
+ * TODO - add capabilites for components, rendered in <code>PhaseListener</code>
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.2 $ $Date: 2007/02/06 16:23:20 $
+ *
+ */
+public interface AjaxContainerBase {
+ /**
+ * getter for AjaxListener method. Same as for <code>ActionSource</code>
+ *
+ * @see javax.faces.component.ActionSource#getActionListener()
+ */
+ public MethodBinding getAjaxListener();
+
+ /**
+ * setter for AjaxListener <code>MethodBinding</code>
+ * in case on AjaxRequest, component must call this method in
+ * <code>PhaseId.APPLY_REQUEST_VALUES</code> or
+ * <code>PhaseId.INVOKE_APPLICATION</code> phases, depend on immediate flag.
+ *
+ * @see javax.faces.component.ActionSource#setActionListener(javax.faces.el.MethodBinding)
+ */
+ public void setAjaxListener(MethodBinding AjaxListener);
+
+ /**
+ * getter for flag immediate call Listener's on PhaseId.APPLY_REQUEST_VALUES phase.
+ *
+ * @see javax.faces.component.ActionSource#isImmediate()
+ */
+ public boolean isImmediate();
+
+ /**
+ * getter for render method flag of subview. If true, on AJAX-request component render it children
+ * after {@link com.sun.faces.lifecycle.Phase.INVOKE_APPLICATION }
+ * @return value of selfRendered flag
+ */
+ public boolean isSelfRendered();
+
+ /**
+ * setter for self-render flag.
+ * @param selfRendered
+ */
+ public void setSelfRendered(boolean selfRendered);
+ /**
+ * setter for immediate flag.
+ *
+ * @see javax.faces.component.ActionSource#setImmediate(boolean)
+ */
+ public void setImmediate(boolean immediate);
+
+ public boolean isSubmitted();
+
+ public void setSubmitted(boolean submitted);
+
+ /**
+ * Render AJAX response for this container from stored View.
+ * @param context
+ * @throws FacesException
+ */
+// public void renderAjaxRegion(FacesContext context) throws FacesException ;
+
+}
Copied: trunk/framework/api/src/main/java/org/ajax4jsf/component/AjaxDataEncoder.java (from rev 1448, trunk/framework/api/src/main/java/org/ajax4jsf/ajax/repeat/AjaxDataEncoder.java)
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/component/AjaxDataEncoder.java (rev 0)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/component/AjaxDataEncoder.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -0,0 +1,43 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.component;
+
+import java.util.Set;
+
+import org.ajax4jsf.model.ExtendedDataModel;
+
+/**
+ * Interface for iterable component, allowed for render given set of rows in ajax response.
+ * @author shura
+ *
+ */
+public interface AjaxDataEncoder extends AjaxChildrenEncoder {
+
+ /**
+ * @return Set for values of {@link ExtendedDataModel} keys, encoded in ajax response by this component.
+ */
+ public Set getAjaxKeys();
+
+ public void setAjaxKeys(Set ajaxKeys);
+
+
+}
Copied: trunk/framework/api/src/main/java/org/ajax4jsf/component/AjaxOutput.java (from rev 1448, trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxOutput.java)
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/component/AjaxOutput.java (rev 0)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/component/AjaxOutput.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -0,0 +1,55 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.component;
+
+/**
+ * Marker interface for all JSF components, encoded ( or not ) on rendering
+ * Ajax request , depend on it self properties ( such as messages, help or like components )
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:39 $
+ *
+ */
+public interface AjaxOutput {
+ /**
+ * getter for ajax-rendered flag property.
+ * @return
+ */
+ public boolean isAjaxRendered();
+ /**
+ * Setter for ajax rendered property.
+ * @param ajaxRendered
+ */
+ public void setAjaxRendered(boolean ajaxRendered);
+
+ /**
+ * getter for ajax-rendered flag property.
+ * @return
+ */
+ public boolean isKeepTransient();
+ /**
+ * Setter for ajax rendered property.
+ * @param ajaxRendered
+ */
+ public void setKeepTransient(boolean ajaxRendered);
+
+
+}
Copied: trunk/framework/api/src/main/java/org/ajax4jsf/component/AjaxSupport.java (from rev 1448, trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxSupport.java)
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/component/AjaxSupport.java (rev 0)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/component/AjaxSupport.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -0,0 +1,71 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.component;
+
+import javax.faces.component.UIComponent;
+
+/**
+ * Version of {@link org.ajax4jsf.component.AjaxComponent} for append
+ * Ajax functions for non-ajax components
+ * @author asmirnov(a)exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:34 $
+ *
+ */
+public interface AjaxSupport extends AjaxComponent {
+
+ /**
+ * @return JavaScript eventString. Rebuild on every call, since
+ * can be in loop ( as in dataTable ) with different parameters.
+ */
+ public String getEventString();
+ /**
+ * setter method for property
+ * @param new value of Name of event property of parent component for build JavaScript AJAX.Submit call to set
+ */
+ public abstract void setEvent(String event);
+
+ /**
+ * @return value or result of valueBinding of Name of event property of parent component for build JavaScript AJAX.Submit call
+ */
+ public abstract String getEvent();
+
+
+ /**
+ * Getter for property If true, disable default action for target event ( encode 'return false' to JavaScript ), implementation will be generated by
+ * componnents-generator
+ * @return property value
+ */
+ public abstract boolean isDisableDefault();
+
+ /**
+ * Setter for property If true, disable default action for target event ( encode 'return false' to JavaScript ), implementation will be generated by
+ * componnents-generator
+ * @param newvalue - new property value
+ */
+ public abstract void setDisableDefault(boolean newvalue);
+
+ /**
+ * Set property for JavaScrept event generated by this component.
+ * @param parent
+ */
+ public void setParentProperties(UIComponent parent);
+}
Deleted: trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxChildrenEncoder.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxChildrenEncoder.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxChildrenEncoder.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -1,55 +0,0 @@
-/**
- * License Agreement.
- *
- * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.ajax4jsf.framework.ajax;
-
-import java.io.IOException;
-import java.util.Set;
-
-import javax.faces.context.FacesContext;
-
-/**
- * Marker interface for components, have ability to manipulate rendering in case of Ajax responses.
- * Such as ajax-enabled iterator, menus etc
- * @author shura
- *
- */
-public interface AjaxChildrenEncoder {
-
- /**
- * Iterate over all childs of components. If component id contains in list ,
- * or, if list is empty, compotents is submitted form - render it.
- * TODO - Instead of calculate full path for every component, build current Path
- * for componet and send as parameter.
- *
- * @param context -
- * current context
- * @param component -
- * curent faces component.
- * @param ids -
- * list of Id to render.
- * @throws IOException
- */
- public void encodeAjaxChild(FacesContext context,
- String path,Set ids,Set renderedAreas) throws IOException ;
-
-
-}
Deleted: trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxComponent.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxComponent.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxComponent.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -1,194 +0,0 @@
-/**
- * License Agreement.
- *
- * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.ajax4jsf.framework.ajax;
-
-
-/**
- * Base Interface for Ajax-enabled acting components.
- * TODO - extend <code>ActionSource</code>???
- * @author shura (latest modification by $Author: alexsmirnov $)
- * @version $Revision: 1.1.2.2 $ $Date: 2007/01/23 20:01:01 $
- *
- */
-public interface AjaxComponent
-{
-
- public static final String AJAX_COMPONETT_PARAMETER = AjaxComponent.class.getName()+".parameter";
-
- /**
- * setter method for property
- * @param new value of String, <code>Collection</code> or array of component's Id , updated in case of Ajax request by parent component. to set
- */
- public abstract void setReRender(Object targetId);
-
- /**
- * @return value or result of valueBinding of String, <code>Collection</code> or array of component's Id , updated in case of Ajax request by parent component.
- */
- public abstract Object getReRender();
-
- /**
- * setter method for property
- * @param new value of ajaxType of control component - link or input to set
- */
-// public abstract void setAjaxType(String ajaxType);
-
- /**
- * @return value or result of valueBinding of ajaxType of control component - link or input
- */
-// public abstract String getAjaxType();
-
- /**
- * setter method for property
- * @param new value of Id ( in format of UIComponent.findComponent() call ) of request status indicator to set
- */
- public abstract void setStatus(String status);
-
- /**
- * @return value or result of valueBinding of Id ( in format of UIComponent.findComponent() call ) of request status indicator
- */
- public abstract String getStatus();
-
- /**
- * setter method for property
- * @param new value of Name of JavaScript function, called on complete Ajax request to set
- */
- public abstract void setOncomplete(String oncomplete);
-
- /**
- * @return value or result of valueBinding of Name of JavaScript function, called on complete Ajax request
- */
- public abstract String getOncomplete();
-
- /**
- * setter method for property
- * @param new value of custom data translated to oncomplete function by AJAX
- */
- public abstract void setData(Object data);
-
- /**
- * @return value of custom data for translate to oncomplete function by AJAX
- */
- public abstract Object getData();
-
- /**
- * setter method for property
- * @param new value of Submit ( or not ) full form on Ajax action. to set
- */
- public abstract void setLimitToList(boolean submitForm);
-
- /**
- * @return value or result of valueBinding of Submit ( or not ) full form on Ajax action.
- */
- public abstract boolean isLimitToList();
-
- /**
- * setter method for property
- * @param new value of Submit ( or not ) full form on Ajax action. to set
- */
- public abstract void setAjaxSingle(boolean single);
-
- /**
- * @return value or result of valueBinding of Submit ( or not ) full form on Ajax action.
- */
- public abstract boolean isAjaxSingle();
-
- /**
- * Getter for bypassUpdates bean property. Indicate that component must invoke listeners after Process Validators phase
- * and force render response after it - since no values of components will be updated. Can be used to perform validation of client input
- * using server-side validators.
- * @return true if component must force render after validation phase.
- */
- public abstract boolean isBypassUpdates();
-
- /**
- * Setter for bypassUpdates bean property.
- * @param bypass true if component must force render after validation phase.
- */
- public abstract void setBypassUpdates(boolean bypass);
-
- /**
- * Getter for property name of events queue on client side - for avoid to send requests too frequnly ( on key events, for example ), implementation will be generated by
- * componnents-generator
- * @return property value
- */
- public abstract String getEventsQueue();
-
- /**
- * Setter for flag indicated aborting unfinished ajax requests in queue.
- * @param newvalue - new property value. If true, unfinished request in queue will be aborted on new events.
- */
- public abstract void setIgnoreDupResponses(boolean newvalue);
-
-
- /**
- * Getter for property flag indicated aborting unfinished ajax requests in queue.
- * componnents-generator
- * @return property value
- */
- public abstract boolean isIgnoreDupResponses();
-
- /**
- * Setter for property name of events queue on client side - for avoid to send requests too frequnly ( on key events, for example ), implementation will be generated by
- * componnents-generator
- * @param newvalue - new property value
- */
- public abstract void setEventsQueue(String newvalue);
-
- /**
- * Getter for property Delay ( in ms. ) for send ajax request on JavaScript event. In conjunction with events queue can reduce number of requests on keyboard or mouse move events., implementation will be generated by
- * componnents-generator
- * @return property value
- */
- public abstract int getRequestDelay();
-
- /**
- * Setter for property Delay ( in ms. ) for send ajax request on JavaScript event. In conjunction with events queue can reduce number of requests on keyboard or mouse move events., implementation will be generated by
- * componnents-generator
- * @param newvalue - new property value
- */
- public abstract void setRequestDelay(int newvalue);
-
- /**
- * Getter for request timeout
- * @return timeout in ms.
- */
- public abstract int getTimeout();
-
- /**
- * Setter for request timeout
- * @param timeout new value in ms.
- */
- public abstract void setTimeout(int timeout);
-
-
- /**
- * Setter for a 'focus' bean property - id of component( or of DOM element ), to set focus after AJAX request.
- * @param focus
- */
- public abstract void setFocus(String focus);
-
- /**
- * @return
- */
- public abstract String getFocus();
-
-}
\ No newline at end of file
Deleted: trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxContainer.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxContainer.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxContainer.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -1,54 +0,0 @@
-/**
- * License Agreement.
- *
- * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.ajax4jsf.framework.ajax;
-
-import java.io.IOException;
-
-import javax.faces.context.FacesContext;
-
-
-/**
- * Extend Ajax-enabled region to support event listeners on Ajax requests.
- * @author shura (latest modification by $Author: alexsmirnov $)
- * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:39 $
- *
- */
-public interface AjaxContainer extends AjaxContainerBase, AjaxSource
-{
-
- /**
- * Is ajax container must re-render all output from page or only it's children ?
- * @return true if all ajax-enabled to re-render araes on page must be checked for output.
- */
- public abstract boolean isRenderRegionOnly();
-
- public abstract void setRenderRegionOnly(boolean reRenderPage);
-
- /**
- * Encode AJAX response from this container ( call encode methods for selected components only )
- * @param context
- * @throws IOException
- */
- public void encodeAjax(FacesContext context) throws IOException ;
-
-
-}
\ No newline at end of file
Deleted: trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxContainerBase.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxContainerBase.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxContainerBase.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -1,94 +0,0 @@
-/**
- * License Agreement.
- *
- * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.ajax4jsf.framework.ajax;
-
-import java.util.Collection;
-import java.util.Set;
-
-import javax.faces.el.MethodBinding;
-
-/**
- * Base interface for controller component, managed AJAX Requests.
- * Component, implemented this interface, must always return <code>true</code> for
- * <code>javax.faces.component.UIComponent#getRendersChildren()</code> method.
- * in common, set of components, rendered of current request, maintain by it.
- * TODO - add capabilites for components, rendered in <code>PhaseListener</code>
- * @author shura (latest modification by $Author: alexsmirnov $)
- * @version $Revision: 1.1.2.2 $ $Date: 2007/02/06 16:23:20 $
- *
- */
-public interface AjaxContainerBase {
- /**
- * getter for AjaxListener method. Same as for <code>ActionSource</code>
- *
- * @see javax.faces.component.ActionSource#getActionListener()
- */
- public MethodBinding getAjaxListener();
-
- /**
- * setter for AjaxListener <code>MethodBinding</code>
- * in case on AjaxRequest, component must call this method in
- * <code>PhaseId.APPLY_REQUEST_VALUES</code> or
- * <code>PhaseId.INVOKE_APPLICATION</code> phases, depend on immediate flag.
- *
- * @see javax.faces.component.ActionSource#setActionListener(javax.faces.el.MethodBinding)
- */
- public void setAjaxListener(MethodBinding AjaxListener);
-
- /**
- * getter for flag immediate call Listener's on PhaseId.APPLY_REQUEST_VALUES phase.
- *
- * @see javax.faces.component.ActionSource#isImmediate()
- */
- public boolean isImmediate();
-
- /**
- * getter for render method flag of subview. If true, on AJAX-request component render it children
- * after {@link com.sun.faces.lifecycle.Phase.INVOKE_APPLICATION }
- * @return value of selfRendered flag
- */
- public boolean isSelfRendered();
-
- /**
- * setter for self-render flag.
- * @param selfRendered
- */
- public void setSelfRendered(boolean selfRendered);
- /**
- * setter for immediate flag.
- *
- * @see javax.faces.component.ActionSource#setImmediate(boolean)
- */
- public void setImmediate(boolean immediate);
-
- public boolean isSubmitted();
-
- public void setSubmitted(boolean submitted);
-
- /**
- * Render AJAX response for this container from stored View.
- * @param context
- * @throws FacesException
- */
-// public void renderAjaxRegion(FacesContext context) throws FacesException ;
-
-}
Deleted: trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxOutput.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxOutput.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxOutput.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -1,55 +0,0 @@
-/**
- * License Agreement.
- *
- * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.ajax4jsf.framework.ajax;
-
-/**
- * Marker interface for all JSF components, encoded ( or not ) on rendering
- * Ajax request , depend on it self properties ( such as messages, help or like components )
- * @author shura (latest modification by $Author: alexsmirnov $)
- * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:39 $
- *
- */
-public interface AjaxOutput {
- /**
- * getter for ajax-rendered flag property.
- * @return
- */
- public boolean isAjaxRendered();
- /**
- * Setter for ajax rendered property.
- * @param ajaxRendered
- */
- public void setAjaxRendered(boolean ajaxRendered);
-
- /**
- * getter for ajax-rendered flag property.
- * @return
- */
- public boolean isKeepTransient();
- /**
- * Setter for ajax rendered property.
- * @param ajaxRendered
- */
- public void setKeepTransient(boolean ajaxRendered);
-
-
-}
Deleted: trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxSupport.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxSupport.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxSupport.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -1,71 +0,0 @@
-/**
- * License Agreement.
- *
- * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.ajax4jsf.framework.ajax;
-
-import javax.faces.component.UIComponent;
-
-/**
- * Version of {@link org.ajax4jsf.framework.ajax.AjaxComponent} for append
- * Ajax functions for non-ajax components
- * @author asmirnov(a)exadel.com (latest modification by $Author: alexsmirnov $)
- * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:34 $
- *
- */
-public interface AjaxSupport extends AjaxComponent {
-
- /**
- * @return JavaScript eventString. Rebuild on every call, since
- * can be in loop ( as in dataTable ) with different parameters.
- */
- public String getEventString();
- /**
- * setter method for property
- * @param new value of Name of event property of parent component for build JavaScript AJAX.Submit call to set
- */
- public abstract void setEvent(String event);
-
- /**
- * @return value or result of valueBinding of Name of event property of parent component for build JavaScript AJAX.Submit call
- */
- public abstract String getEvent();
-
-
- /**
- * Getter for property If true, disable default action for target event ( encode 'return false' to JavaScript ), implementation will be generated by
- * componnents-generator
- * @return property value
- */
- public abstract boolean isDisableDefault();
-
- /**
- * Setter for property If true, disable default action for target event ( encode 'return false' to JavaScript ), implementation will be generated by
- * componnents-generator
- * @param newvalue - new property value
- */
- public abstract void setDisableDefault(boolean newvalue);
-
- /**
- * Set property for JavaScrept event generated by this component.
- * @param parent
- */
- public void setParentProperties(UIComponent parent);
-}
Copied: trunk/framework/api/src/main/java/org/ajax4jsf/model/DataComponentState.java (from rev 1448, trunk/framework/api/src/main/java/org/ajax4jsf/ajax/repeat/DataComponentState.java)
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/model/DataComponentState.java (rev 0)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/model/DataComponentState.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -0,0 +1,42 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.model;
+
+import javax.faces.component.StateHolder;
+
+/**
+ * Interface for classes keeped current iterable component state, as :
+ * active data objects range
+ * sorting order
+ * tree nodes expanded state
+ *
+ * @author shura
+ *
+ */
+public interface DataComponentState {
+
+ /**
+ * Build used data objects range for iteration.
+ * @return
+ */
+ public abstract Range getRange();
+}
Copied: trunk/framework/api/src/main/java/org/ajax4jsf/model/DataVisitor.java (from rev 1448, trunk/framework/api/src/main/java/org/ajax4jsf/ajax/repeat/DataVisitor.java)
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/model/DataVisitor.java (rev 0)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/model/DataVisitor.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -0,0 +1,45 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.model;
+
+import java.io.IOException;
+
+import javax.faces.context.FacesContext;
+
+/**
+ * Interface for classes, able to receive visitor processing calls from ExtendedDataModel
+ * @author shura
+ *
+ */
+public interface DataVisitor {
+
+ /**
+ * This method called back ( as visitor ) from {@link ExtendedDataModel#walk(FacesContext, DataVisitor, Range)} for
+ * each row.
+ * @param context current JSF context.
+ * @param rowKey current row key of DataModel
+ * @param argument Implementation-specific argument
+ * @throws IOException
+ */
+ public void process(FacesContext context,Object rowKey, Object argument) throws IOException;
+
+}
Copied: trunk/framework/api/src/main/java/org/ajax4jsf/model/ExtendedDataModel.java (from rev 1448, trunk/framework/api/src/main/java/org/ajax4jsf/ajax/repeat/ExtendedDataModel.java)
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/model/ExtendedDataModel.java (rev 0)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/model/ExtendedDataModel.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -0,0 +1,83 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.model;
+
+import java.io.IOException;
+import java.io.Serializable;
+
+import javax.faces.context.FacesContext;
+import javax.faces.model.DataModel;
+
+/**
+ * Extesion for {@link DataModel} , for support complex data structure, like tree, spreadsheet etc
+ * in iterable components.
+ * @author shura
+ *
+ */
+public abstract class ExtendedDataModel extends DataModel {
+
+ /**
+ * <p>Instead of simple <code>int</code> for current state selection, this model can use any object for
+ * select current data. Implementation depend on model, with any restrictions :</p>
+ * <ol>
+ * <li> key must be {@link Serializable}.</li>
+ * <li>{@link Object#toString()} method must return representation compatible with {@link javax.faces.component.UIComponent#getClientId(javax.faces.context.FacesContext)},
+ * as far as this string will be appended to clientId of iterator component.</li>
+ * </ol>
+ * @param key key for select current data, or null for clear selection.
+ */
+ public abstract void setRowKey(Object key);
+
+ /**
+ * @return key for selected data or <code>null</code>
+ */
+ public abstract Object getRowKey();
+
+ /**
+ * Iteration component can support save data for use at decoding/validation/update phases to avoid unnessesary calls to original models,
+ * for example - to avoid requests to database until all data is validated.
+ * @return
+ */
+ public SerializableDataModel getSerializableModel(Range range){
+ // By default, model not serializable.
+ return null;
+ }
+
+
+ /**
+ * Iterate over model by "visitor" pattern, for given range
+ * @param context current JSF context.
+ * @param visitor instance of {@link DataVisitor}, for process each row.
+ * @param range Implementation-specific range of data keys.
+ * @param argument Implementation-specific argument
+ * @throws IOException
+ */
+ public abstract void walk(FacesContext context,DataVisitor visitor,Range range, Object argument) throws IOException;
+
+ /**
+ * Create Iterator on all row keys for given range.
+ * @param range - Implementation-specific range of data keys.
+ * @return
+ */
+// public abstract Iterator dataIterator(Range range);
+
+}
Copied: trunk/framework/api/src/main/java/org/ajax4jsf/model/Range.java (from rev 1448, trunk/framework/api/src/main/java/org/ajax4jsf/ajax/repeat/Range.java)
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/model/Range.java (rev 0)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/model/Range.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -0,0 +1,33 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.model;
+
+/**
+ * Marker interface for building iterator over dataModel values. over {@link ExtendedDataModel} elements.
+ * It can be simple min/max values for data table, but also can provide set of expanded/collapsed nodes in tree,
+ * can provide sorting order,
+ * @author shura
+ *
+ */
+public interface Range {
+
+}
Copied: trunk/framework/api/src/main/java/org/ajax4jsf/model/RepeatState.java (from rev 1448, trunk/framework/api/src/main/java/org/ajax4jsf/ajax/repeat/RepeatState.java)
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/model/RepeatState.java (rev 0)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/model/RepeatState.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -0,0 +1,81 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.model;
+
+import java.io.Serializable;
+
+import javax.faces.context.FacesContext;
+
+/**
+ * @author shura
+ *
+ */
+public class RepeatState implements DataComponentState,Serializable {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -5552520123654180445L;
+
+ private int _rows = -1;
+
+ private int _first = 0;
+
+
+ /**
+ * @return the first
+ */
+ public int getFirst() {
+ return _first;
+ }
+
+ /**
+ * @param first the first to set
+ */
+ public void setFirst(int first) {
+ this._first = first;
+ }
+
+ /**
+ * @return the rows
+ */
+ public int getRows() {
+ return _rows;
+ }
+
+ /**
+ * @param rows the rows to set
+ */
+ public void setRows(int rows) {
+ this._rows = rows;
+ }
+
+ /* (non-Javadoc)
+ * @see org.ajax4jsf.ajax.repeat.DataComponentState#getRange()
+ */
+ public Range getRange() {
+ // TODO Auto-generated method stub
+ return new SequenceRange(getFirst(),getRows());
+ }
+
+
+}
Copied: trunk/framework/api/src/main/java/org/ajax4jsf/model/SequenceDataModel.java (from rev 1448, trunk/framework/api/src/main/java/org/ajax4jsf/ajax/repeat/SequenceDataModel.java)
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/model/SequenceDataModel.java (rev 0)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/model/SequenceDataModel.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -0,0 +1,202 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.model;
+
+import java.io.IOException;
+
+import javax.faces.context.FacesContext;
+import javax.faces.model.DataModel;
+
+/**
+ * @author shura
+ *
+ */
+public class SequenceDataModel extends ExtendedDataModel {
+
+ private DataModel wrappedModel;
+
+ /**
+ * @param wrapped
+ */
+ public SequenceDataModel(DataModel wrapped) {
+ super();
+ this.wrappedModel = wrapped;
+ }
+
+ /* (non-Javadoc)
+ * @see org.ajax4jsf.ajax.repeat.ExtendedDataModel#dataIterator(org.ajax4jsf.ajax.repeat.Range)
+ */
+/* public Iterator dataIterator(Range range) {
+ final SequenceRange seqRange = (SequenceRange) range;
+ int rows = seqRange.getRows();
+ int rowCount = wrapped.getRowCount();
+ final int firstRow = seqRange.getFirstRow();
+ if(rows > 0){
+ rows += firstRow;
+ if(rowCount >=0){
+ rows = Math.min(rows, rowCount);
+ }
+ } else if(rowCount >=0 ){
+ rows = rowCount;
+ }
+ final int maxRow = rows;
+ return new Iterator(){
+
+ int rowIndex = firstRow;
+
+ public boolean hasNext() {
+ // TODO Auto-generated method stub
+ return maxRow < 0 || rowIndex < maxRow;
+ }
+
+ public Object next() {
+ // TODO Auto-generated method stub
+ return new Integer(rowIndex++);
+ }
+
+ public void remove() {
+ throw new IllegalStateException();
+ }
+
+ };
+ }
+*/
+ public void walk(FacesContext context, DataVisitor visitor, Range range, Object argument) throws IOException {
+ final SequenceRange seqRange = (SequenceRange) range;
+ int rows = seqRange.getRows();
+ int rowCount = wrappedModel.getRowCount();
+ int currentRow = seqRange.getFirstRow();
+ if(rows > 0){
+ rows += currentRow;
+ if(rowCount >=0){
+ rows = Math.min(rows, rowCount);
+ }
+ } else if(rowCount >=0 ){
+ rows = rowCount;
+ } else {
+ rows = -1;
+ }
+ while (rows < 0 || currentRow < rows) {
+ wrappedModel.setRowIndex(currentRow);
+ if(wrappedModel.isRowAvailable()){
+ visitor.process(context, new Integer(currentRow), argument);
+ } else {
+ break;
+ }
+ currentRow++;
+ }
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.ajax4jsf.ajax.repeat.ExtendedDataModel#getRowKey()
+ */
+ public Object getRowKey() {
+ int index = wrappedModel.getRowIndex();
+ if(index<0){
+ return null;
+ }
+ return new Integer(index);
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.ajax4jsf.ajax.repeat.ExtendedDataModel#setRowKey(java.lang.Object)
+ */
+ public void setRowKey(Object key) {
+ if(null == key){
+ wrappedModel.setRowIndex(-1);
+ } else {
+ Integer index = (Integer) key;
+ wrappedModel.setRowIndex(index.intValue());
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.model.DataModel#getRowCount()
+ */
+ public int getRowCount() {
+ // TODO Auto-generated method stub
+ return wrappedModel.getRowCount();
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.model.DataModel#getRowData()
+ */
+ public Object getRowData() {
+ // TODO Auto-generated method stub
+ return wrappedModel.getRowData();
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.model.DataModel#getRowIndex()
+ */
+ public int getRowIndex() {
+ // TODO Auto-generated method stub
+ return wrappedModel.getRowIndex();
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.model.DataModel#getWrappedData()
+ */
+ public Object getWrappedData() {
+ // TODO Auto-generated method stub
+ return wrappedModel.getWrappedData();
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.model.DataModel#isRowAvailable()
+ */
+ public boolean isRowAvailable() {
+ // TODO Auto-generated method stub
+ return wrappedModel.isRowAvailable();
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.model.DataModel#setRowIndex(int)
+ */
+ public void setRowIndex(int rowIndex) {
+ wrappedModel.setRowIndex(rowIndex);
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.model.DataModel#setWrappedData(java.lang.Object)
+ */
+ public void setWrappedData(Object data) {
+ wrappedModel.setWrappedData(data);
+ }
+
+ /**
+ * @return the wrappedModel
+ */
+ protected DataModel getWrappedModel() {
+ return this.wrappedModel;
+ }
+
+ /**
+ * @param wrappedModel the wrappedModel to set
+ */
+ protected void setWrappedModel(DataModel wrappedModel) {
+ this.wrappedModel = wrappedModel;
+ }
+
+}
Copied: trunk/framework/api/src/main/java/org/ajax4jsf/model/SequenceRange.java (from rev 1448, trunk/framework/api/src/main/java/org/ajax4jsf/ajax/repeat/SequenceRange.java)
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/model/SequenceRange.java (rev 0)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/model/SequenceRange.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -0,0 +1,58 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.model;
+
+/**
+ * @author shura
+ *
+ */
+public class SequenceRange implements Range {
+
+ private int firstRow = 0;
+
+ private int rows = -1;
+
+ /**
+ * @return the firstRow
+ */
+ public int getFirstRow() {
+ return firstRow;
+ }
+
+ /**
+ * @return the rows
+ */
+ public int getRows() {
+ return rows;
+ }
+
+ /**
+ * @param firstRow
+ * @param rows
+ */
+ public SequenceRange(int firstRow, int rows) {
+ super();
+ this.firstRow = firstRow;
+ this.rows = rows;
+ }
+
+}
Copied: trunk/framework/api/src/main/java/org/ajax4jsf/model/SerializableDataModel.java (from rev 1448, trunk/framework/api/src/main/java/org/ajax4jsf/ajax/repeat/SerializableDataModel.java)
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/model/SerializableDataModel.java (rev 0)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/model/SerializableDataModel.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -0,0 +1,39 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.model;
+
+import java.io.Serializable;
+
+/**
+ * Serializable version of {@link ExtendedDataModel}, for save lightweight version of data
+ *
+ * @author shura
+ *
+ */
+public abstract class SerializableDataModel extends ExtendedDataModel implements Serializable {
+
+ /**
+ * Method called after update all model values. For example, developer can update
+ * database with new values of modified rows.
+ */
+ public abstract void update();
+}
Modified: trunk/framework/api/src/main/java/org/richfaces/component/AbstractTreeDataModel.java
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/component/AbstractTreeDataModel.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/framework/api/src/main/java/org/richfaces/component/AbstractTreeDataModel.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -26,9 +26,9 @@
import javax.faces.component.NamingContainer;
import javax.faces.context.FacesContext;
-import org.ajax4jsf.ajax.repeat.DataVisitor;
-import org.ajax4jsf.ajax.repeat.ExtendedDataModel;
-import org.ajax4jsf.ajax.repeat.Range;
+import org.ajax4jsf.model.DataVisitor;
+import org.ajax4jsf.model.ExtendedDataModel;
+import org.ajax4jsf.model.Range;
import org.richfaces.component.state.TreeRange;
/**
Modified: trunk/framework/api/src/main/java/org/richfaces/component/TreeDataModel.java
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/component/TreeDataModel.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/framework/api/src/main/java/org/richfaces/component/TreeDataModel.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -27,8 +27,8 @@
import javax.faces.context.FacesContext;
-import org.ajax4jsf.ajax.repeat.DataVisitor;
-import org.ajax4jsf.ajax.repeat.Range;
+import org.ajax4jsf.model.DataVisitor;
+import org.ajax4jsf.model.Range;
import org.richfaces.component.state.TreeRange;
/**
Modified: trunk/framework/api/src/main/java/org/richfaces/component/state/TreeRange.java
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/component/state/TreeRange.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/framework/api/src/main/java/org/richfaces/component/state/TreeRange.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -21,7 +21,7 @@
package org.richfaces.component.state;
-import org.ajax4jsf.ajax.repeat.Range;
+import org.ajax4jsf.model.Range;
import org.richfaces.component.TreeRowKey;
/**
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/UIDataAdaptor.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/UIDataAdaptor.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/ajax/repeat/UIDataAdaptor.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -47,7 +47,12 @@
import javax.faces.model.ListDataModel;
import javax.faces.render.Renderer;
+import org.ajax4jsf.component.AjaxDataEncoder;
import org.ajax4jsf.framework.renderer.AjaxChildrenRenderer;
+import org.ajax4jsf.model.DataComponentState;
+import org.ajax4jsf.model.DataVisitor;
+import org.ajax4jsf.model.ExtendedDataModel;
+import org.ajax4jsf.model.SerializableDataModel;
/**
* Base class for iterable components, like dataTable, Tomahawk dataList,
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/component/AjaxActionComponent.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/component/AjaxActionComponent.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/component/AjaxActionComponent.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -30,7 +30,6 @@
import javax.faces.event.PhaseId;
import org.ajax4jsf.context.AjaxContext;
-import org.ajax4jsf.framework.ajax.AjaxComponent;
import org.ajax4jsf.framework.ajax.AjaxEvent;
import org.ajax4jsf.framework.ajax.AjaxListener;
import org.ajax4jsf.framework.ajax.AjaxSingleEvent;
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/component/AjaxInputComponent.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/component/AjaxInputComponent.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/component/AjaxInputComponent.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -30,7 +30,6 @@
import javax.faces.event.PhaseId;
import org.ajax4jsf.context.AjaxContext;
-import org.ajax4jsf.framework.ajax.AjaxComponent;
import org.ajax4jsf.framework.ajax.AjaxEvent;
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxContextImpl.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxContextImpl.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxContextImpl.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -52,6 +52,7 @@
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
+import org.ajax4jsf.component.AjaxContainer;
import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter;
import org.ajax4jsf.framework.ajax.xmlfilter.FilterServletResponseWrapper;
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxRegionBrige.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxRegionBrige.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxRegionBrige.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -31,6 +31,7 @@
import javax.faces.event.AbortProcessingException;
import javax.faces.event.FacesEvent;
+import org.ajax4jsf.component.AjaxContainerBase;
import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.framework.util.message.Messages;
import org.apache.commons.logging.Log;
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxViewRoot.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxViewRoot.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxViewRoot.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -32,6 +32,7 @@
import javax.faces.event.FacesEvent;
import javax.faces.event.PhaseId;
+import org.ajax4jsf.component.AjaxContainer;
import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.framework.renderer.AjaxContainerRenderer;
import org.ajax4jsf.framework.util.message.Messages;
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/EventValueBinding.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/EventValueBinding.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/EventValueBinding.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -28,6 +28,8 @@
import javax.faces.el.PropertyNotFoundException;
import javax.faces.el.ValueBinding;
+import org.ajax4jsf.component.AjaxComponent;
+import org.ajax4jsf.component.AjaxSupport;
import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
import org.ajax4jsf.framework.util.message.Messages;
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxChildrenRenderer.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxChildrenRenderer.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxChildrenRenderer.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -31,8 +31,8 @@
import javax.faces.context.FacesContext;
import org.ajax4jsf.ajax.UILoadBundle;
-import org.ajax4jsf.framework.ajax.AjaxChildrenEncoder;
-import org.ajax4jsf.framework.ajax.AjaxOutput;
+import org.ajax4jsf.component.AjaxChildrenEncoder;
+import org.ajax4jsf.component.AjaxOutput;
import org.ajax4jsf.framework.util.message.Messages;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxContainerRenderer.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxContainerRenderer.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxContainerRenderer.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -29,8 +29,8 @@
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
+import org.ajax4jsf.component.AjaxContainer;
import org.ajax4jsf.context.AjaxContext;
-import org.ajax4jsf.framework.ajax.AjaxContainer;
import org.ajax4jsf.framework.ajax.AjaxEvent;
import org.ajax4jsf.framework.util.message.Messages;
import org.apache.commons.logging.Log;
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxRendererUtils.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxRendererUtils.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxRendererUtils.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -44,10 +44,10 @@
import javax.servlet.http.HttpServletResponse;
import org.ajax4jsf.ajax.UILoadBundle;
+import org.ajax4jsf.component.AjaxComponent;
+import org.ajax4jsf.component.AjaxContainer;
+import org.ajax4jsf.component.AjaxSupport;
import org.ajax4jsf.context.AjaxContext;
-import org.ajax4jsf.framework.ajax.AjaxComponent;
-import org.ajax4jsf.framework.ajax.AjaxContainer;
-import org.ajax4jsf.framework.ajax.AjaxSupport;
import org.ajax4jsf.framework.ajax.AjaxViewRoot;
import org.ajax4jsf.framework.ajax.JavaScriptParameter;
import org.ajax4jsf.framework.renderer.RendererUtils.HTML;
@@ -645,18 +645,18 @@
* @param uiComponent
* @return
*/
- public static org.ajax4jsf.framework.ajax.AjaxContainer findAjaxContainer(
+ public static org.ajax4jsf.component.AjaxContainer findAjaxContainer(
FacesContext facesContext, UIComponent uiComponent) {
UIComponent parent = uiComponent.getParent();
while (parent != null
- && !(parent instanceof org.ajax4jsf.framework.ajax.AjaxContainer)) {
+ && !(parent instanceof org.ajax4jsf.component.AjaxContainer)) {
parent = parent.getParent();
}
- org.ajax4jsf.framework.ajax.AjaxContainer nestingContainer = null;
+ org.ajax4jsf.component.AjaxContainer nestingContainer = null;
if (parent != null) {
// link is nested inside a form
- nestingContainer = (org.ajax4jsf.framework.ajax.AjaxContainer) parent;
+ nestingContainer = (org.ajax4jsf.component.AjaxContainer) parent;
} else if (facesContext.getViewRoot() instanceof AjaxViewRoot) {
nestingContainer = (AjaxContainer) facesContext.getViewRoot();
}
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxForm.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxForm.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxForm.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -29,8 +29,8 @@
import javax.faces.event.AbortProcessingException;
import javax.faces.event.FacesEvent;
+import org.ajax4jsf.component.AjaxComponent;
import org.ajax4jsf.context.AjaxContext;
-import org.ajax4jsf.framework.ajax.AjaxComponent;
import org.ajax4jsf.framework.ajax.AjaxEvent;
import org.ajax4jsf.framework.ajax.AjaxListener;
import org.ajax4jsf.framework.ajax.AjaxSource;
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxOutputPanel.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxOutputPanel.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxOutputPanel.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -23,7 +23,7 @@
import javax.faces.component.UIPanel;
-import org.ajax4jsf.framework.ajax.AjaxOutput;
+import org.ajax4jsf.component.AjaxOutput;
/**
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxRegion.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxRegion.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxRegion.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -34,8 +34,8 @@
import javax.faces.event.AbortProcessingException;
import javax.faces.event.FacesEvent;
+import org.ajax4jsf.component.AjaxContainer;
import org.ajax4jsf.context.AjaxContext;
-import org.ajax4jsf.framework.ajax.AjaxContainer;
import org.ajax4jsf.framework.ajax.AjaxContextImpl;
import org.ajax4jsf.framework.ajax.AjaxListener;
import org.ajax4jsf.framework.ajax.AjaxRegionBrige;
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxStatus.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxStatus.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxStatus.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -29,7 +29,7 @@
import javax.faces.context.FacesContext;
import javax.faces.el.ValueBinding;
-import org.ajax4jsf.framework.ajax.AjaxContainer;
+import org.ajax4jsf.component.AjaxContainer;
import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
import org.ajax4jsf.framework.util.message.Messages;
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxSupport.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxSupport.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxSupport.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -29,7 +29,7 @@
import javax.faces.el.ValueBinding;
import org.ajax4jsf.component.AjaxActionComponent;
-import org.ajax4jsf.framework.ajax.AjaxSupport;
+import org.ajax4jsf.component.AjaxSupport;
import org.ajax4jsf.framework.ajax.EventValueBinding;
import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
import org.ajax4jsf.framework.util.message.Messages;
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIInclude.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIInclude.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIInclude.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -33,8 +33,8 @@
import javax.faces.event.FacesListener;
import javax.faces.event.PhaseId;
+import org.ajax4jsf.component.AjaxOutput;
import org.ajax4jsf.context.AjaxContext;
-import org.ajax4jsf.framework.ajax.AjaxOutput;
import org.ajax4jsf.framework.ajax.ViewIdHolder;
/**
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/ajax/repeat/UIRepeat.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/ajax/repeat/UIRepeat.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/ajax/repeat/UIRepeat.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -34,6 +34,12 @@
import javax.faces.model.ResultSetDataModel;
import javax.faces.model.ScalarDataModel;
import javax.servlet.jsp.jstl.sql.Result;
+
+import org.ajax4jsf.model.DataComponentState;
+import org.ajax4jsf.model.ExtendedDataModel;
+import org.ajax4jsf.model.Range;
+import org.ajax4jsf.model.SequenceDataModel;
+import org.ajax4jsf.model.SequenceRange;
/**
* @author shura
*
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/ajax/repeat/UISelector.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/ajax/repeat/UISelector.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/ajax/repeat/UISelector.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -31,6 +31,7 @@
import javax.faces.component.UIComponentBase;
import javax.faces.context.FacesContext;
+import org.ajax4jsf.component.AjaxDataEncoder;
import org.ajax4jsf.framework.renderer.AjaxChildrenRenderer;
import org.apache.commons.beanutils.PropertyUtils;
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/html/AjaxPageRenderer.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/html/AjaxPageRenderer.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/html/AjaxPageRenderer.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -30,8 +30,8 @@
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
+import org.ajax4jsf.component.AjaxContainer;
import org.ajax4jsf.context.AjaxContext;
-import org.ajax4jsf.framework.ajax.AjaxContainer;
import org.ajax4jsf.framework.ajax.AjaxViewRoot;
import org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter;
import org.ajax4jsf.framework.renderer.AjaxContainerRenderer;
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/html/RepeatRenderer.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/html/RepeatRenderer.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/html/RepeatRenderer.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -27,9 +27,9 @@
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
-import org.ajax4jsf.ajax.repeat.DataVisitor;
import org.ajax4jsf.ajax.repeat.UIRepeat;
import org.ajax4jsf.framework.renderer.RendererBase;
+import org.ajax4jsf.model.DataVisitor;
/**
* @author shura
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxReRendrRule.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxReRendrRule.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxReRendrRule.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -23,7 +23,7 @@
import java.util.Set;
-import org.ajax4jsf.framework.ajax.AjaxComponent;
+import org.ajax4jsf.component.AjaxComponent;
import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
import com.sun.facelets.FaceletContext;
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/jsp/AjaxRegionTag.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/jsp/AjaxRegionTag.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/jsp/AjaxRegionTag.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -25,7 +25,7 @@
import javax.faces.el.MethodBinding;
import org.ajax4jsf.ajax.UIAjaxRegion;
-import org.ajax4jsf.framework.ajax.AjaxContainer;
+import org.ajax4jsf.component.AjaxContainer;
import org.ajax4jsf.framework.ajax.AjaxListener;
import org.ajax4jsf.framework.taglib.UIComponentTagBase;
import org.ajax4jsf.framework.util.message.Messages;
Modified: trunk/ui/dataTable/src/main/java/org/richfaces/component/UIDataTable.java
===================================================================
--- trunk/ui/dataTable/src/main/java/org/richfaces/component/UIDataTable.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/ui/dataTable/src/main/java/org/richfaces/component/UIDataTable.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -27,8 +27,8 @@
import javax.faces.component.UIComponent;
import org.ajax4jsf.ajax.repeat.UIRepeat;
+import org.ajax4jsf.component.AjaxSupport;
import org.ajax4jsf.dnd.Dropzone;
-import org.ajax4jsf.framework.ajax.AjaxSupport;
import org.apache.commons.collections.Predicate;
import org.apache.commons.collections.iterators.FilterIterator;
import org.apache.commons.collections.iterators.IteratorChain;
Modified: trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractRowsRenderer.java
===================================================================
--- trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractRowsRenderer.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractRowsRenderer.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -28,12 +28,12 @@
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
-import org.ajax4jsf.ajax.repeat.DataVisitor;
import org.ajax4jsf.ajax.repeat.UIDataAdaptor;
import org.ajax4jsf.framework.renderer.HeaderResourcesRendererBase;
import org.ajax4jsf.framework.renderer.RendererBase;
import org.ajax4jsf.framework.renderer.RendererUtils;
import org.ajax4jsf.framework.renderer.RendererUtils.HTML;
+import org.ajax4jsf.model.DataVisitor;
import org.richfaces.component.Row;
/**
Modified: trunk/ui/dataTable/src/test/java/org/richfaces/component/DataTableComponentTest.java
===================================================================
--- trunk/ui/dataTable/src/test/java/org/richfaces/component/DataTableComponentTest.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/ui/dataTable/src/test/java/org/richfaces/component/DataTableComponentTest.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -37,7 +37,7 @@
import javax.faces.model.ListDataModel;
import org.ajax4jsf.ajax.UIAjaxSupport;
-import org.ajax4jsf.framework.ajax.AjaxSupport;
+import org.ajax4jsf.component.AjaxSupport;
import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
import org.apache.commons.collections.Predicate;
Modified: trunk/ui/menu-components/src/main/java/org/richfaces/component/UIMenuItem.java
===================================================================
--- trunk/ui/menu-components/src/main/java/org/richfaces/component/UIMenuItem.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/ui/menu-components/src/main/java/org/richfaces/component/UIMenuItem.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -24,7 +24,7 @@
import javax.faces.component.ActionSource;
import org.ajax4jsf.component.AjaxActionComponent;
-import org.ajax4jsf.framework.ajax.AjaxComponent;
+import org.ajax4jsf.component.AjaxComponent;
import org.ajax4jsf.framework.ajax.AjaxSource;
Modified: trunk/ui/simpleTogglePanel/src/main/java/org/richfaces/component/UISimpleTogglePanel.java
===================================================================
--- trunk/ui/simpleTogglePanel/src/main/java/org/richfaces/component/UISimpleTogglePanel.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/ui/simpleTogglePanel/src/main/java/org/richfaces/component/UISimpleTogglePanel.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -22,7 +22,7 @@
package org.richfaces.component;
import org.ajax4jsf.component.AjaxActionComponent;
-import org.ajax4jsf.framework.ajax.AjaxComponent;
+import org.ajax4jsf.component.AjaxComponent;
import org.ajax4jsf.framework.ajax.AjaxSource;
import javax.faces.component.ActionSource;
Modified: trunk/ui/suggestionbox/src/main/java/org/richfaces/component/UISuggestionBox.java
===================================================================
--- trunk/ui/suggestionbox/src/main/java/org/richfaces/component/UISuggestionBox.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/ui/suggestionbox/src/main/java/org/richfaces/component/UISuggestionBox.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -21,8 +21,8 @@
package org.richfaces.component;
+import org.ajax4jsf.component.AjaxComponent;
import org.ajax4jsf.context.AjaxContext;
-import org.ajax4jsf.framework.ajax.AjaxComponent;
import org.ajax4jsf.framework.ajax.AjaxEvent;
import org.ajax4jsf.framework.ajax.AjaxListener;
import org.ajax4jsf.framework.ajax.AjaxSource;
Modified: trunk/ui/tabPanel/src/main/java/org/richfaces/component/UITab.java
===================================================================
--- trunk/ui/tabPanel/src/main/java/org/richfaces/component/UITab.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/ui/tabPanel/src/main/java/org/richfaces/component/UITab.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -22,7 +22,7 @@
package org.richfaces.component;
import org.ajax4jsf.component.AjaxActionComponent;
-import org.ajax4jsf.framework.ajax.AjaxComponent;
+import org.ajax4jsf.component.AjaxComponent;
import org.ajax4jsf.framework.ajax.AjaxSource;
import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
Modified: trunk/ui/togglePanel/src/main/java/org/richfaces/component/UIToggleControl.java
===================================================================
--- trunk/ui/togglePanel/src/main/java/org/richfaces/component/UIToggleControl.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/ui/togglePanel/src/main/java/org/richfaces/component/UIToggleControl.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -32,7 +32,7 @@
import javax.faces.el.ValueBinding;
import org.ajax4jsf.component.AjaxActionComponent;
-import org.ajax4jsf.framework.ajax.AjaxComponent;
+import org.ajax4jsf.component.AjaxComponent;
import org.ajax4jsf.framework.ajax.AjaxSource;
import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
import org.ajax4jsf.framework.renderer.RendererUtils;
Modified: trunk/ui/tree/src/main/java/org/richfaces/component/CacheableTreeDataModel.java
===================================================================
--- trunk/ui/tree/src/main/java/org/richfaces/component/CacheableTreeDataModel.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/ui/tree/src/main/java/org/richfaces/component/CacheableTreeDataModel.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -25,8 +25,8 @@
import javax.faces.context.FacesContext;
-import org.ajax4jsf.ajax.repeat.DataVisitor;
-import org.ajax4jsf.ajax.repeat.Range;
+import org.ajax4jsf.model.DataVisitor;
+import org.ajax4jsf.model.Range;
/**
* @author Nick - mailto:nbelaevski@exadel.com created 08.01.2007
Modified: trunk/ui/tree/src/main/java/org/richfaces/component/UITree.java
===================================================================
--- trunk/ui/tree/src/main/java/org/richfaces/component/UITree.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/ui/tree/src/main/java/org/richfaces/component/UITree.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -35,10 +35,6 @@
import javax.faces.event.FacesListener;
import javax.faces.event.PhaseId;
-import org.ajax4jsf.ajax.repeat.DataComponentState;
-import org.ajax4jsf.ajax.repeat.DataVisitor;
-import org.ajax4jsf.ajax.repeat.ExtendedDataModel;
-import org.ajax4jsf.ajax.repeat.Range;
import org.ajax4jsf.ajax.repeat.UIDataAdaptor;
import org.ajax4jsf.dnd.Draggable;
import org.ajax4jsf.dnd.Dropzone;
@@ -48,6 +44,10 @@
import org.ajax4jsf.dnd.event.DropListener;
import org.ajax4jsf.framework.ajax.AjaxEvent;
import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
+import org.ajax4jsf.model.DataComponentState;
+import org.ajax4jsf.model.DataVisitor;
+import org.ajax4jsf.model.ExtendedDataModel;
+import org.ajax4jsf.model.Range;
import org.apache.commons.collections.iterators.SingletonIterator;
import org.richfaces.component.events.NodeExpandedEvent;
import org.richfaces.component.events.NodeExpandedListener;
Modified: trunk/ui/tree/src/main/java/org/richfaces/component/state/TreeState.java
===================================================================
--- trunk/ui/tree/src/main/java/org/richfaces/component/state/TreeState.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/ui/tree/src/main/java/org/richfaces/component/state/TreeState.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -29,9 +29,9 @@
import javax.faces.component.StateHolder;
import javax.faces.context.FacesContext;
-import org.ajax4jsf.ajax.repeat.DataComponentState;
-import org.ajax4jsf.ajax.repeat.DataVisitor;
-import org.ajax4jsf.ajax.repeat.Range;
+import org.ajax4jsf.model.DataComponentState;
+import org.ajax4jsf.model.DataVisitor;
+import org.ajax4jsf.model.Range;
import org.richfaces.component.TreeRowKey;
import org.richfaces.component.UITree;
import org.richfaces.component.state.events.TreeStateCommandsListener;
Modified: trunk/ui/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java
===================================================================
--- trunk/ui/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/ui/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -35,7 +35,6 @@
import javax.faces.context.ResponseWriter;
import javax.faces.el.MethodBinding;
-import org.ajax4jsf.ajax.repeat.DataVisitor;
import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
import org.ajax4jsf.framework.renderer.ComponentVariables;
import org.ajax4jsf.framework.renderer.ComponentsVariableResolver;
@@ -43,6 +42,7 @@
import org.ajax4jsf.framework.util.javascript.JSFunction;
import org.ajax4jsf.framework.util.javascript.JSReference;
import org.ajax4jsf.framework.util.javascript.ScriptUtils;
+import org.ajax4jsf.model.DataVisitor;
import org.richfaces.component.LastElementAware;
import org.richfaces.component.TreeRowKey;
import org.richfaces.component.UITree;
Modified: trunk/ui/tree/src/test/java/org/richfaces/component/TreeModelTest.java
===================================================================
--- trunk/ui/tree/src/test/java/org/richfaces/component/TreeModelTest.java 2007-07-03 20:06:53 UTC (rev 1449)
+++ trunk/ui/tree/src/test/java/org/richfaces/component/TreeModelTest.java 2007-07-03 20:13:44 UTC (rev 1450)
@@ -31,7 +31,7 @@
import junit.framework.TestCase;
-import org.ajax4jsf.ajax.repeat.DataVisitor;
+import org.ajax4jsf.model.DataVisitor;
import org.richfaces.component.xml.XmlNodeData;
import org.richfaces.component.xml.XmlTreeDataBuilder;
import org.xml.sax.InputSource;
17 years, 4 months
JBoss Rich Faces SVN: r1449 - in trunk: framework/api/src/main/java/org/ajax4jsf/context and 17 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2007-07-03 16:06:53 -0400 (Tue, 03 Jul 2007)
New Revision: 1449
Added:
trunk/framework/api/src/main/java/org/ajax4jsf/context/
trunk/framework/api/src/main/java/org/ajax4jsf/context/AjaxContext.java
trunk/framework/impl/src/main/java/org/ajax4jsf/component/
trunk/framework/impl/src/main/java/org/ajax4jsf/component/AjaxActionComponent.java
trunk/framework/impl/src/main/java/org/ajax4jsf/component/AjaxInputComponent.java
Removed:
trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxActionComponent.java
trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxContext.java
trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxInputComponent.java
Modified:
trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxContextImpl.java
trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxRegionBrige.java
trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxViewHandler.java
trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxViewRoot.java
trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/JsfOneOneInvoker.java
trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/BaseXMLFilter.java
trunk/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxContainerRenderer.java
trunk/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxPhaseListener.java
trunk/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxRendererUtils.java
trunk/ui/core/src/main/java/org/ajax4jsf/ajax/ForceRender.java
trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxCommandButton.java
trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxCommandLink.java
trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxForm.java
trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxFunction.java
trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxRegion.java
trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxSupport.java
trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIInclude.java
trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIPoll.java
trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIPush.java
trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/AjaxCommandRendererBase.java
trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/html/AjaxOutputPanelRenderer.java
trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/html/AjaxPageRenderer.java
trunk/ui/drag-drop/src/main/java/org/richfaces/component/UIDragSupport.java
trunk/ui/drag-drop/src/main/java/org/richfaces/component/UIDropSupport.java
trunk/ui/dropdown-menu/src/main/java/org/richfaces/renderkit/html/DropDownMenuRendererBase.java
trunk/ui/menu-components/src/main/java/org/richfaces/component/UIMenuItem.java
trunk/ui/simpleTogglePanel/src/main/java/org/richfaces/component/UISimpleTogglePanel.java
trunk/ui/suggestionbox/src/main/java/org/richfaces/component/UISuggestionBox.java
trunk/ui/suggestionbox/src/main/java/org/richfaces/renderkit/html/SuggestionBoxRenderer.java
trunk/ui/tabPanel/src/main/java/org/richfaces/component/UITab.java
trunk/ui/togglePanel/src/main/java/org/richfaces/component/UIToggleControl.java
Log:
packages and classes refactor
Copied: trunk/framework/api/src/main/java/org/ajax4jsf/context/AjaxContext.java (from rev 1448, trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxContext.java)
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/context/AjaxContext.java (rev 0)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/context/AjaxContext.java 2007-07-03 20:06:53 UTC (rev 1449)
@@ -0,0 +1,125 @@
+package org.ajax4jsf.context;
+
+import java.io.IOException;
+import java.util.Map;
+import java.util.Set;
+
+import javax.faces.FacesException;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.el.VariableResolver;
+
+import org.ajax4jsf.framework.ajax.ViewIdHolder;
+
+public abstract class AjaxContext {
+
+ /**
+ * Key for keep request state information in request-scope attributes.
+ */
+ public static final String AJAX_CONTEXT_KEY = "ajaxContext";
+
+ public abstract Map getCommonAjaxParameters();
+
+ public abstract String getAjaxActionURL(FacesContext context);
+
+ public abstract String getAjaxActionURL();
+
+ public abstract void setResponseData(Object responseData);
+
+ public abstract Object getResponseData();
+
+ public abstract void setViewIdHolder(ViewIdHolder viewIdHolder);
+
+ public abstract ViewIdHolder getViewIdHolder();
+
+ public abstract boolean removeRenderedArea(String id);
+
+ public abstract void addRenderedArea(String id);
+
+ public abstract Set getAjaxRenderedAreas();
+
+ public abstract void addComponentToAjaxRender(UIComponent base, String id);
+
+ public abstract void addComponentToAjaxRender(UIComponent component);
+
+ public abstract void addRegionsFromComponent(UIComponent component);
+
+ public abstract Set getAjaxAreasToRender();
+
+ public abstract boolean isAjaxRequest(FacesContext context);
+
+ public abstract boolean isAjaxRequest();
+
+ public abstract void processHeadResources(FacesContext context)
+ throws FacesException;
+
+ public abstract void encodeAjaxEnd(FacesContext context, UIComponent component)
+ throws IOException;
+
+ public abstract void encodeAjaxBegin(FacesContext context, UIComponent component)
+ throws IOException;
+
+ public abstract void renderAjaxRegion(FacesContext context, UIComponent component,
+ boolean useFilterWriter) throws FacesException;
+
+ public abstract void renderSubmittedAjaxRegion(FacesContext context, final boolean useFilterWriter);
+
+ public abstract void renderSubmittedAjaxRegion(FacesContext context);
+
+ public static final String SCRIPTS_PARAMETER = "org.ajax4jsf.framework.HEADER_SCRIPTS";
+ public static final String STYLES_PARAMETER = "org.ajax4jsf.framework.HEADER_STYLES";
+ public static final String RESPONSE_DATA_KEY = "_ajax:data";
+
+ /**
+ * Get instance of current AJAX Context. Instance get by
+ * {@link VariableResolver#resolveVariable(FacesContext, String)} for
+ * variable {@link AjaxContext#AJAX_CONTEXT_KEY}
+ *
+ * @return memento instance for current request
+ */
+ public static AjaxContext getCurrentInstance() {
+ FacesContext context = FacesContext.getCurrentInstance();
+ return getCurrentInstance(context);
+ }
+
+ /**
+ * Get instance of current AJAX Context. Instance get by
+ * {@link VariableResolver#resolveVariable(FacesContext, String)} for
+ * variable {@link AjaxContext#AJAX_CONTEXT_KEY}
+ *
+ * @param context
+ * current FacesContext
+ * @return instance of AjaxContext.
+ */
+ public static AjaxContext getCurrentInstance(FacesContext context) {
+ if (null == context) {
+ throw new NullPointerException("FacesContext is null");
+ }
+ AjaxContext ajaxContext = (AjaxContext) context.getApplication()
+ .getVariableResolver().resolveVariable(context,
+ AJAX_CONTEXT_KEY);
+ if (null == ajaxContext) {
+ // TODO Create default implementation.
+// ajaxContext = new AjaxContext();
+// context.getExternalContext().getRequestMap().put(AJAX_CONTEXT_KEY,
+// ajaxContext);
+ }
+ return ajaxContext;
+ }
+
+ public AjaxContext() {
+ super();
+ }
+
+ public abstract Map getResponseDataMap();
+
+ public abstract void setAjaxRequest(boolean b);
+
+ public abstract boolean isSelfRender();
+
+ public abstract void setSelfRender(boolean b);
+
+ public abstract String getSubmittedRegionClientId(FacesContext context);
+
+ public abstract void saveViewState(FacesContext context) throws IOException;
+}
\ No newline at end of file
Deleted: trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxActionComponent.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxActionComponent.java 2007-07-03 19:11:11 UTC (rev 1448)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxActionComponent.java 2007-07-03 20:06:53 UTC (rev 1449)
@@ -1,154 +0,0 @@
-/**
- * License Agreement.
- *
- * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.ajax4jsf.framework.ajax;
-
-import javax.faces.component.UICommand;
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-import javax.faces.event.AbortProcessingException;
-import javax.faces.event.ActionEvent;
-import javax.faces.event.FacesEvent;
-import javax.faces.event.PhaseId;
-
-
-/**
- * @author shura (latest modification by $Author: alexsmirnov $)
- * @version $Revision: 1.1.2.3 $ $Date: 2007/02/06 16:23:21 $
- *
- */
-public abstract class AjaxActionComponent extends UICommand implements
- AjaxComponent, AjaxSource {
-
- public static final String FOCUS_DATA_ID = "_A4J.AJAX.focus";
-
- /*
- * (non-Javadoc)
- *
- * @see javax.faces.component.UIComponentBase#broadcast(javax.faces.event.FacesEvent)
- */
- public void broadcast(FacesEvent event) throws AbortProcessingException {
- // Hack - throw exception to AjaxViewRoot, to fix state of all iterable components.
- if (event instanceof AjaxSingleEvent) {
- throw new AjaxSingleException(getSingleComponent());
- }
- // perform default
- super.broadcast(event);
- if (event instanceof AjaxEvent) {
- FacesContext context = getFacesContext();
- // complete re-Render fields. AjaxEvent deliver before render
- // response.
- setupReRender(context);
- // Put data for send in response
- Object data = getData();
- AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
- if (null != data) {
- ajaxContext.setResponseData(data);
- }
- String focus = getFocus();
- if (null != focus) {
- // search for component in tree.
- // TODO - use more pourful search, as in h:outputLabel component.
- UIComponent focusComponent = findComponent(focus);
- if(null != focusComponent){
- focus = focusComponent.getClientId(context);
- }
- ajaxContext.getResponseDataMap().put(FOCUS_DATA_ID, focus);
- }
- }
- }
-
- /**
- * Template method with old signature, for backward compability.
- */
- protected void setupReRender() {
- }
-
- /**
- * Template methods for fill set of resions to render in subclasses.
- *
- * @param facesContext
- * TODO
- */
- protected void setupReRender(FacesContext facesContext) {
- AjaxContext.getCurrentInstance(facesContext).addRegionsFromComponent(
- this);
- setupReRender();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see javax.faces.component.UIComponentBase#queueEvent(javax.faces.event.FacesEvent)
- */
- public void queueEvent(FacesEvent event) {
- if (event instanceof ActionEvent && event.getComponent() == this) {
- if (isImmediate()) {
- event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
- } else if (isBypassUpdates()) {
- event.setPhaseId(PhaseId.PROCESS_VALIDATIONS);
- } else {
- event.setPhaseId(PhaseId.INVOKE_APPLICATION);
- }
- getParent().queueEvent(event);
- if(isAjaxSingle()){
- super.queueEvent(new AjaxSingleEvent(this));
- }
- } else {
- super.queueEvent(event);
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.ajax4jsf.framework.ajax.AjaxSource#addAjaxListener(org.ajax4jsf.framework.ajax.AjaxListener)
- */
- public void addAjaxListener(AjaxListener listener) {
- addFacesListener(listener);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.ajax4jsf.framework.ajax.AjaxSource#getAjaxListeners()
- */
- public AjaxListener[] getAjaxListeners() {
- AjaxListener al[] = (AjaxListener[]) getFacesListeners(AjaxListener.class);
- return (al);
-
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.ajax4jsf.framework.ajax.AjaxSource#removeAjaxListener(org.ajax4jsf.framework.ajax.AjaxListener)
- */
- public void removeAjaxListener(AjaxListener listener) {
- removeFacesListener(listener);
-
- }
-
- protected UIComponent getSingleComponent(){
- return this;
- }
-
-}
Deleted: trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxContext.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxContext.java 2007-07-03 19:11:11 UTC (rev 1448)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxContext.java 2007-07-03 20:06:53 UTC (rev 1449)
@@ -1,123 +0,0 @@
-package org.ajax4jsf.framework.ajax;
-
-import java.io.IOException;
-import java.util.Map;
-import java.util.Set;
-
-import javax.faces.FacesException;
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-import javax.faces.el.VariableResolver;
-
-public abstract class AjaxContext {
-
- /**
- * Key for keep request state information in request-scope attributes.
- */
- public static final String AJAX_CONTEXT_KEY = "ajaxContext";
-
- public abstract Map getCommonAjaxParameters();
-
- public abstract String getAjaxActionURL(FacesContext context);
-
- public abstract String getAjaxActionURL();
-
- public abstract void setResponseData(Object responseData);
-
- public abstract Object getResponseData();
-
- public abstract void setViewIdHolder(ViewIdHolder viewIdHolder);
-
- public abstract ViewIdHolder getViewIdHolder();
-
- public abstract boolean removeRenderedArea(String id);
-
- public abstract void addRenderedArea(String id);
-
- public abstract Set getAjaxRenderedAreas();
-
- public abstract void addComponentToAjaxRender(UIComponent base, String id);
-
- public abstract void addComponentToAjaxRender(UIComponent component);
-
- public abstract void addRegionsFromComponent(UIComponent component);
-
- public abstract Set getAjaxAreasToRender();
-
- public abstract boolean isAjaxRequest(FacesContext context);
-
- public abstract boolean isAjaxRequest();
-
- public abstract void processHeadResources(FacesContext context)
- throws FacesException;
-
- public abstract void encodeAjaxEnd(FacesContext context, UIComponent component)
- throws IOException;
-
- public abstract void encodeAjaxBegin(FacesContext context, UIComponent component)
- throws IOException;
-
- public abstract void renderAjaxRegion(FacesContext context, UIComponent component,
- boolean useFilterWriter) throws FacesException;
-
- public abstract void renderSubmittedAjaxRegion(FacesContext context, final boolean useFilterWriter);
-
- public abstract void renderSubmittedAjaxRegion(FacesContext context);
-
- public static final String SCRIPTS_PARAMETER = "org.ajax4jsf.framework.HEADER_SCRIPTS";
- public static final String STYLES_PARAMETER = "org.ajax4jsf.framework.HEADER_STYLES";
- public static final String RESPONSE_DATA_KEY = "_ajax:data";
-
- /**
- * Get instance of current AJAX Context. Instance get by
- * {@link VariableResolver#resolveVariable(FacesContext, String)} for
- * variable {@link AjaxContext#AJAX_CONTEXT_KEY}
- *
- * @return memento instance for current request
- */
- public static AjaxContext getCurrentInstance() {
- FacesContext context = FacesContext.getCurrentInstance();
- return getCurrentInstance(context);
- }
-
- /**
- * Get instance of current AJAX Context. Instance get by
- * {@link VariableResolver#resolveVariable(FacesContext, String)} for
- * variable {@link AjaxContext#AJAX_CONTEXT_KEY}
- *
- * @param context
- * current FacesContext
- * @return instance of AjaxContext.
- */
- public static AjaxContext getCurrentInstance(FacesContext context) {
- if (null == context) {
- throw new NullPointerException("FacesContext is null");
- }
- AjaxContext ajaxContext = (AjaxContext) context.getApplication()
- .getVariableResolver().resolveVariable(context,
- AJAX_CONTEXT_KEY);
- if (null == ajaxContext) {
- // TODO Create default implementation.
-// ajaxContext = new AjaxContext();
-// context.getExternalContext().getRequestMap().put(AJAX_CONTEXT_KEY,
-// ajaxContext);
- }
- return ajaxContext;
- }
-
- public AjaxContext() {
- super();
- }
-
- public abstract Map getResponseDataMap();
-
- public abstract void setAjaxRequest(boolean b);
-
- public abstract boolean isSelfRender();
-
- public abstract void setSelfRender(boolean b);
-
- public abstract String getSubmittedRegionClientId(FacesContext context);
-
- public abstract void saveViewState(FacesContext context) throws IOException;
-}
\ No newline at end of file
Copied: trunk/framework/impl/src/main/java/org/ajax4jsf/component/AjaxActionComponent.java (from rev 1448, trunk/framework/api/src/main/java/org/ajax4jsf/framework/ajax/AjaxActionComponent.java)
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/component/AjaxActionComponent.java (rev 0)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/component/AjaxActionComponent.java 2007-07-03 20:06:53 UTC (rev 1449)
@@ -0,0 +1,162 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.component;
+
+import javax.faces.component.UICommand;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.event.AbortProcessingException;
+import javax.faces.event.ActionEvent;
+import javax.faces.event.FacesEvent;
+import javax.faces.event.PhaseId;
+
+import org.ajax4jsf.context.AjaxContext;
+import org.ajax4jsf.framework.ajax.AjaxComponent;
+import org.ajax4jsf.framework.ajax.AjaxEvent;
+import org.ajax4jsf.framework.ajax.AjaxListener;
+import org.ajax4jsf.framework.ajax.AjaxSingleEvent;
+import org.ajax4jsf.framework.ajax.AjaxSingleException;
+import org.ajax4jsf.framework.ajax.AjaxSource;
+
+
+/**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.3 $ $Date: 2007/02/06 16:23:21 $
+ *
+ */
+public abstract class AjaxActionComponent extends UICommand implements
+ AjaxComponent, AjaxSource {
+
+ public static final String FOCUS_DATA_ID = "_A4J.AJAX.focus";
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see javax.faces.component.UIComponentBase#broadcast(javax.faces.event.FacesEvent)
+ */
+ public void broadcast(FacesEvent event) throws AbortProcessingException {
+ // Hack - throw exception to AjaxViewRoot, to fix state of all iterable components.
+ if (event instanceof AjaxSingleEvent) {
+ throw new AjaxSingleException(getSingleComponent());
+ }
+ // perform default
+ super.broadcast(event);
+ if (event instanceof AjaxEvent) {
+ FacesContext context = getFacesContext();
+ // complete re-Render fields. AjaxEvent deliver before render
+ // response.
+ setupReRender(context);
+ // Put data for send in response
+ Object data = getData();
+ AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
+ if (null != data) {
+ ajaxContext.setResponseData(data);
+ }
+ String focus = getFocus();
+ if (null != focus) {
+ // search for component in tree.
+ // TODO - use more pourful search, as in h:outputLabel component.
+ UIComponent focusComponent = findComponent(focus);
+ if(null != focusComponent){
+ focus = focusComponent.getClientId(context);
+ }
+ ajaxContext.getResponseDataMap().put(FOCUS_DATA_ID, focus);
+ }
+ }
+ }
+
+ /**
+ * Template method with old signature, for backward compability.
+ */
+ protected void setupReRender() {
+ }
+
+ /**
+ * Template methods for fill set of resions to render in subclasses.
+ *
+ * @param facesContext
+ * TODO
+ */
+ protected void setupReRender(FacesContext facesContext) {
+ AjaxContext.getCurrentInstance(facesContext).addRegionsFromComponent(
+ this);
+ setupReRender();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see javax.faces.component.UIComponentBase#queueEvent(javax.faces.event.FacesEvent)
+ */
+ public void queueEvent(FacesEvent event) {
+ if (event instanceof ActionEvent && event.getComponent() == this) {
+ if (isImmediate()) {
+ event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
+ } else if (isBypassUpdates()) {
+ event.setPhaseId(PhaseId.PROCESS_VALIDATIONS);
+ } else {
+ event.setPhaseId(PhaseId.INVOKE_APPLICATION);
+ }
+ getParent().queueEvent(event);
+ if(isAjaxSingle()){
+ super.queueEvent(new AjaxSingleEvent(this));
+ }
+ } else {
+ super.queueEvent(event);
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.ajax4jsf.framework.ajax.AjaxSource#addAjaxListener(org.ajax4jsf.framework.ajax.AjaxListener)
+ */
+ public void addAjaxListener(AjaxListener listener) {
+ addFacesListener(listener);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.ajax4jsf.framework.ajax.AjaxSource#getAjaxListeners()
+ */
+ public AjaxListener[] getAjaxListeners() {
+ AjaxListener al[] = (AjaxListener[]) getFacesListeners(AjaxListener.class);
+ return (al);
+
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.ajax4jsf.framework.ajax.AjaxSource#removeAjaxListener(org.ajax4jsf.framework.ajax.AjaxListener)
+ */
+ public void removeAjaxListener(AjaxListener listener) {
+ removeFacesListener(listener);
+
+ }
+
+ protected UIComponent getSingleComponent(){
+ return this;
+ }
+
+}
Copied: trunk/framework/impl/src/main/java/org/ajax4jsf/component/AjaxInputComponent.java (from rev 1448, trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxInputComponent.java)
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/component/AjaxInputComponent.java (rev 0)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/component/AjaxInputComponent.java 2007-07-03 20:06:53 UTC (rev 1449)
@@ -0,0 +1,81 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.component;
+
+import javax.faces.component.EditableValueHolder;
+import javax.faces.component.UIInput;
+import javax.faces.context.FacesContext;
+import javax.faces.event.AbortProcessingException;
+import javax.faces.event.ActionEvent;
+import javax.faces.event.FacesEvent;
+import javax.faces.event.PhaseId;
+
+import org.ajax4jsf.context.AjaxContext;
+import org.ajax4jsf.framework.ajax.AjaxComponent;
+import org.ajax4jsf.framework.ajax.AjaxEvent;
+
+
+/**
+ * Base class for all AJAX-enabled Input components
+ * @author asmirnov(a)exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.2 $ $Date: 2007/02/06 16:23:21 $
+ *
+ */
+public abstract class AjaxInputComponent extends UIInput implements AjaxComponent,EditableValueHolder {
+
+ /* (non-Javadoc)
+ * @see javax.faces.component.UIComponentBase#broadcast(javax.faces.event.FacesEvent)
+ */
+ public void broadcast(FacesEvent event) throws AbortProcessingException {
+ // perform default
+ super.broadcast(event);
+ if (event instanceof AjaxEvent) {
+ // complete re-Render fields. AjaxEvent deliver before render response.
+ setupReRender();
+ }
+ }
+ /**
+ * Template methods for fill set of resions to render in subclasses.
+ */
+ protected void setupReRender() {
+ FacesContext context = getFacesContext();
+ AjaxContext.getCurrentInstance(context).addRegionsFromComponent(this);
+
+ }
+ /* (non-Javadoc)
+ * @see javax.faces.component.UIComponentBase#queueEvent(javax.faces.event.FacesEvent)
+ */
+ public void queueEvent(FacesEvent event) {
+ if (event instanceof ActionEvent && event.getComponent()==this) {
+ if (isImmediate()) {
+ event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
+ } else if (isBypassUpdates()) {
+ event.setPhaseId(PhaseId.PROCESS_VALIDATIONS);
+ }else {
+ event.setPhaseId(PhaseId.INVOKE_APPLICATION);
+ }
+ }
+ super.queueEvent(event);
+ }
+
+
+}
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxContextImpl.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxContextImpl.java 2007-07-03 19:11:11 UTC (rev 1448)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxContextImpl.java 2007-07-03 20:06:53 UTC (rev 1449)
@@ -52,6 +52,7 @@
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
+import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter;
import org.ajax4jsf.framework.ajax.xmlfilter.FilterServletResponseWrapper;
import org.ajax4jsf.framework.renderer.AjaxContainerRenderer;
Deleted: trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxInputComponent.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxInputComponent.java 2007-07-03 19:11:11 UTC (rev 1448)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxInputComponent.java 2007-07-03 20:06:53 UTC (rev 1449)
@@ -1,77 +0,0 @@
-/**
- * License Agreement.
- *
- * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.ajax4jsf.framework.ajax;
-
-import javax.faces.component.EditableValueHolder;
-import javax.faces.component.UIInput;
-import javax.faces.context.FacesContext;
-import javax.faces.event.AbortProcessingException;
-import javax.faces.event.ActionEvent;
-import javax.faces.event.FacesEvent;
-import javax.faces.event.PhaseId;
-
-
-/**
- * Base class for all AJAX-enabled Input components
- * @author asmirnov(a)exadel.com (latest modification by $Author: alexsmirnov $)
- * @version $Revision: 1.1.2.2 $ $Date: 2007/02/06 16:23:21 $
- *
- */
-public abstract class AjaxInputComponent extends UIInput implements AjaxComponent,EditableValueHolder {
-
- /* (non-Javadoc)
- * @see javax.faces.component.UIComponentBase#broadcast(javax.faces.event.FacesEvent)
- */
- public void broadcast(FacesEvent event) throws AbortProcessingException {
- // perform default
- super.broadcast(event);
- if (event instanceof AjaxEvent) {
- // complete re-Render fields. AjaxEvent deliver before render response.
- setupReRender();
- }
- }
- /**
- * Template methods for fill set of resions to render in subclasses.
- */
- protected void setupReRender() {
- FacesContext context = getFacesContext();
- AjaxContext.getCurrentInstance(context).addRegionsFromComponent(this);
-
- }
- /* (non-Javadoc)
- * @see javax.faces.component.UIComponentBase#queueEvent(javax.faces.event.FacesEvent)
- */
- public void queueEvent(FacesEvent event) {
- if (event instanceof ActionEvent && event.getComponent()==this) {
- if (isImmediate()) {
- event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
- } else if (isBypassUpdates()) {
- event.setPhaseId(PhaseId.PROCESS_VALIDATIONS);
- }else {
- event.setPhaseId(PhaseId.INVOKE_APPLICATION);
- }
- }
- super.queueEvent(event);
- }
-
-
-}
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxRegionBrige.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxRegionBrige.java 2007-07-03 19:11:11 UTC (rev 1448)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxRegionBrige.java 2007-07-03 20:06:53 UTC (rev 1449)
@@ -31,6 +31,7 @@
import javax.faces.event.AbortProcessingException;
import javax.faces.event.FacesEvent;
+import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.framework.util.message.Messages;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxViewHandler.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxViewHandler.java 2007-07-03 19:11:11 UTC (rev 1448)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxViewHandler.java 2007-07-03 20:06:53 UTC (rev 1449)
@@ -32,6 +32,7 @@
import javax.faces.context.ResponseWriter;
import javax.servlet.http.HttpServletResponse;
+import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.framework.ViewHandlerWrapper;
import org.ajax4jsf.framework.renderer.AjaxContainerRenderer;
import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxViewRoot.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxViewRoot.java 2007-07-03 19:11:11 UTC (rev 1448)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxViewRoot.java 2007-07-03 20:06:53 UTC (rev 1449)
@@ -32,6 +32,7 @@
import javax.faces.event.FacesEvent;
import javax.faces.event.PhaseId;
+import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.framework.renderer.AjaxContainerRenderer;
import org.ajax4jsf.framework.util.message.Messages;
import org.apache.commons.collections.Buffer;
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/JsfOneOneInvoker.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/JsfOneOneInvoker.java 2007-07-03 19:11:11 UTC (rev 1448)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/JsfOneOneInvoker.java 2007-07-03 20:06:53 UTC (rev 1449)
@@ -27,6 +27,8 @@
import javax.faces.component.UIViewRoot;
import javax.faces.context.FacesContext;
+import org.ajax4jsf.context.AjaxContext;
+
/**
* @author shura
*
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/BaseXMLFilter.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/BaseXMLFilter.java 2007-07-03 19:11:11 UTC (rev 1448)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/xmlfilter/BaseXMLFilter.java 2007-07-03 20:06:53 UTC (rev 1449)
@@ -38,7 +38,7 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import org.ajax4jsf.framework.ajax.AjaxContext;
+import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.framework.ajax.AjaxViewHandler;
import org.ajax4jsf.framework.renderer.AjaxContainerRenderer;
import org.ajax4jsf.framework.util.message.Messages;
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxContainerRenderer.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxContainerRenderer.java 2007-07-03 19:11:11 UTC (rev 1448)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxContainerRenderer.java 2007-07-03 20:06:53 UTC (rev 1449)
@@ -29,8 +29,8 @@
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
+import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.framework.ajax.AjaxContainer;
-import org.ajax4jsf.framework.ajax.AjaxContext;
import org.ajax4jsf.framework.ajax.AjaxEvent;
import org.ajax4jsf.framework.util.message.Messages;
import org.apache.commons.logging.Log;
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxPhaseListener.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxPhaseListener.java 2007-07-03 19:11:11 UTC (rev 1448)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxPhaseListener.java 2007-07-03 20:06:53 UTC (rev 1449)
@@ -32,7 +32,7 @@
import javax.faces.event.PhaseId;
import javax.faces.event.PhaseListener;
-import org.ajax4jsf.framework.ajax.AjaxContext;
+import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.framework.skin.SkinFactory;
import org.ajax4jsf.framework.util.message.Messages;
import org.apache.commons.logging.Log;
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxRendererUtils.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxRendererUtils.java 2007-07-03 19:11:11 UTC (rev 1448)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxRendererUtils.java 2007-07-03 20:06:53 UTC (rev 1449)
@@ -44,9 +44,9 @@
import javax.servlet.http.HttpServletResponse;
import org.ajax4jsf.ajax.UILoadBundle;
+import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.framework.ajax.AjaxComponent;
import org.ajax4jsf.framework.ajax.AjaxContainer;
-import org.ajax4jsf.framework.ajax.AjaxContext;
import org.ajax4jsf.framework.ajax.AjaxSupport;
import org.ajax4jsf.framework.ajax.AjaxViewRoot;
import org.ajax4jsf.framework.ajax.JavaScriptParameter;
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/ajax/ForceRender.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/ajax/ForceRender.java 2007-07-03 19:11:11 UTC (rev 1448)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/ajax/ForceRender.java 2007-07-03 20:06:53 UTC (rev 1449)
@@ -24,7 +24,7 @@
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
-import org.ajax4jsf.framework.ajax.AjaxContext;
+import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.framework.ajax.AjaxEvent;
import org.ajax4jsf.framework.ajax.AjaxListener;
import org.ajax4jsf.framework.ajax.AjaxRenderEvent;
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxCommandButton.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxCommandButton.java 2007-07-03 19:11:11 UTC (rev 1448)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxCommandButton.java 2007-07-03 20:06:53 UTC (rev 1449)
@@ -21,7 +21,7 @@
package org.ajax4jsf.ajax;
-import org.ajax4jsf.framework.ajax.AjaxActionComponent;
+import org.ajax4jsf.component.AjaxActionComponent;
/**
* @author asmirnov(a)exadel.com (latest modification by $Author: alexsmirnov $)
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxCommandLink.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxCommandLink.java 2007-07-03 19:11:11 UTC (rev 1448)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxCommandLink.java 2007-07-03 20:06:53 UTC (rev 1449)
@@ -21,7 +21,7 @@
package org.ajax4jsf.ajax;
-import org.ajax4jsf.framework.ajax.AjaxActionComponent;
+import org.ajax4jsf.component.AjaxActionComponent;
/**
* @author asmirnov(a)exadel.com (latest modification by $Author: alexsmirnov $)
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxForm.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxForm.java 2007-07-03 19:11:11 UTC (rev 1448)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxForm.java 2007-07-03 20:06:53 UTC (rev 1449)
@@ -29,8 +29,8 @@
import javax.faces.event.AbortProcessingException;
import javax.faces.event.FacesEvent;
+import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.framework.ajax.AjaxComponent;
-import org.ajax4jsf.framework.ajax.AjaxContext;
import org.ajax4jsf.framework.ajax.AjaxEvent;
import org.ajax4jsf.framework.ajax.AjaxListener;
import org.ajax4jsf.framework.ajax.AjaxSource;
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxFunction.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxFunction.java 2007-07-03 19:11:11 UTC (rev 1448)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxFunction.java 2007-07-03 20:06:53 UTC (rev 1449)
@@ -21,7 +21,7 @@
package org.ajax4jsf.ajax;
-import org.ajax4jsf.framework.ajax.AjaxActionComponent;
+import org.ajax4jsf.component.AjaxActionComponent;
/**
* @author asmirnov(a)exadel.com (latest modification by $Author: alexsmirnov $)
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxRegion.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxRegion.java 2007-07-03 19:11:11 UTC (rev 1448)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxRegion.java 2007-07-03 20:06:53 UTC (rev 1449)
@@ -34,8 +34,8 @@
import javax.faces.event.AbortProcessingException;
import javax.faces.event.FacesEvent;
+import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.framework.ajax.AjaxContainer;
-import org.ajax4jsf.framework.ajax.AjaxContext;
import org.ajax4jsf.framework.ajax.AjaxContextImpl;
import org.ajax4jsf.framework.ajax.AjaxListener;
import org.ajax4jsf.framework.ajax.AjaxRegionBrige;
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxSupport.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxSupport.java 2007-07-03 19:11:11 UTC (rev 1448)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIAjaxSupport.java 2007-07-03 20:06:53 UTC (rev 1449)
@@ -28,7 +28,7 @@
import javax.faces.context.FacesContext;
import javax.faces.el.ValueBinding;
-import org.ajax4jsf.framework.ajax.AjaxActionComponent;
+import org.ajax4jsf.component.AjaxActionComponent;
import org.ajax4jsf.framework.ajax.AjaxSupport;
import org.ajax4jsf.framework.ajax.EventValueBinding;
import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIInclude.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIInclude.java 2007-07-03 19:11:11 UTC (rev 1448)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIInclude.java 2007-07-03 20:06:53 UTC (rev 1449)
@@ -33,7 +33,7 @@
import javax.faces.event.FacesListener;
import javax.faces.event.PhaseId;
-import org.ajax4jsf.framework.ajax.AjaxContext;
+import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.framework.ajax.AjaxOutput;
import org.ajax4jsf.framework.ajax.ViewIdHolder;
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIPoll.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIPoll.java 2007-07-03 19:11:11 UTC (rev 1448)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIPoll.java 2007-07-03 20:06:53 UTC (rev 1449)
@@ -23,8 +23,8 @@
import javax.faces.context.FacesContext;
-import org.ajax4jsf.framework.ajax.AjaxActionComponent;
-import org.ajax4jsf.framework.ajax.AjaxContext;
+import org.ajax4jsf.component.AjaxActionComponent;
+import org.ajax4jsf.context.AjaxContext;
/**
* Component for periodically call AJAX events on server ( poll actions )
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIPush.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIPush.java 2007-07-03 19:11:11 UTC (rev 1448)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/ajax/UIPush.java 2007-07-03 20:06:53 UTC (rev 1449)
@@ -28,8 +28,8 @@
import javax.faces.el.MethodBinding;
import javax.servlet.http.HttpSession;
-import org.ajax4jsf.framework.ajax.AjaxActionComponent;
-import org.ajax4jsf.framework.ajax.AjaxContext;
+import org.ajax4jsf.component.AjaxActionComponent;
+import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.framework.ajax.xmlfilter.PollEventsManager;
/**
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/AjaxCommandRendererBase.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/AjaxCommandRendererBase.java 2007-07-03 19:11:11 UTC (rev 1448)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/AjaxCommandRendererBase.java 2007-07-03 20:06:53 UTC (rev 1449)
@@ -30,7 +30,7 @@
import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent;
-import org.ajax4jsf.framework.ajax.AjaxContext;
+import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.framework.ajax.AjaxEvent;
import org.ajax4jsf.framework.renderer.AjaxComponentRendererBase;
import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/html/AjaxOutputPanelRenderer.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/html/AjaxOutputPanelRenderer.java 2007-07-03 19:11:11 UTC (rev 1448)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/html/AjaxOutputPanelRenderer.java 2007-07-03 20:06:53 UTC (rev 1449)
@@ -30,7 +30,7 @@
import javax.faces.context.ResponseWriter;
import org.ajax4jsf.ajax.UIAjaxOutputPanel;
-import org.ajax4jsf.framework.ajax.AjaxContext;
+import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.framework.renderer.RendererBase;
import org.ajax4jsf.framework.renderer.RendererUtils.HTML;
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/html/AjaxPageRenderer.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/html/AjaxPageRenderer.java 2007-07-03 19:11:11 UTC (rev 1448)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/html/AjaxPageRenderer.java 2007-07-03 20:06:53 UTC (rev 1449)
@@ -30,8 +30,8 @@
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
+import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.framework.ajax.AjaxContainer;
-import org.ajax4jsf.framework.ajax.AjaxContext;
import org.ajax4jsf.framework.ajax.AjaxViewRoot;
import org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter;
import org.ajax4jsf.framework.renderer.AjaxContainerRenderer;
Modified: trunk/ui/drag-drop/src/main/java/org/richfaces/component/UIDragSupport.java
===================================================================
--- trunk/ui/drag-drop/src/main/java/org/richfaces/component/UIDragSupport.java 2007-07-03 19:11:11 UTC (rev 1448)
+++ trunk/ui/drag-drop/src/main/java/org/richfaces/component/UIDragSupport.java 2007-07-03 20:06:53 UTC (rev 1449)
@@ -27,10 +27,10 @@
import javax.faces.event.FacesEvent;
import javax.faces.event.PhaseId;
+import org.ajax4jsf.component.AjaxActionComponent;
import org.ajax4jsf.dnd.Draggable;
import org.ajax4jsf.dnd.event.DragEvent;
import org.ajax4jsf.dnd.event.DragListener;
-import org.ajax4jsf.framework.ajax.AjaxActionComponent;
import org.ajax4jsf.framework.ajax.AjaxEvent;
/**
Modified: trunk/ui/drag-drop/src/main/java/org/richfaces/component/UIDropSupport.java
===================================================================
--- trunk/ui/drag-drop/src/main/java/org/richfaces/component/UIDropSupport.java 2007-07-03 19:11:11 UTC (rev 1448)
+++ trunk/ui/drag-drop/src/main/java/org/richfaces/component/UIDropSupport.java 2007-07-03 20:06:53 UTC (rev 1449)
@@ -27,10 +27,10 @@
import javax.faces.event.FacesEvent;
import javax.faces.event.PhaseId;
+import org.ajax4jsf.component.AjaxActionComponent;
import org.ajax4jsf.dnd.Dropzone;
import org.ajax4jsf.dnd.event.DropEvent;
import org.ajax4jsf.dnd.event.DropListener;
-import org.ajax4jsf.framework.ajax.AjaxActionComponent;
import org.ajax4jsf.framework.ajax.AjaxEvent;
/**
Modified: trunk/ui/dropdown-menu/src/main/java/org/richfaces/renderkit/html/DropDownMenuRendererBase.java
===================================================================
--- trunk/ui/dropdown-menu/src/main/java/org/richfaces/renderkit/html/DropDownMenuRendererBase.java 2007-07-03 19:11:11 UTC (rev 1448)
+++ trunk/ui/dropdown-menu/src/main/java/org/richfaces/renderkit/html/DropDownMenuRendererBase.java 2007-07-03 20:06:53 UTC (rev 1449)
@@ -34,7 +34,7 @@
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
-import org.ajax4jsf.framework.ajax.AjaxContext;
+import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.framework.renderer.HeaderResourcesRendererBase;
import org.ajax4jsf.framework.util.javascript.JSFunction;
import org.richfaces.component.UIDropDownMenu;
Modified: trunk/ui/menu-components/src/main/java/org/richfaces/component/UIMenuItem.java
===================================================================
--- trunk/ui/menu-components/src/main/java/org/richfaces/component/UIMenuItem.java 2007-07-03 19:11:11 UTC (rev 1448)
+++ trunk/ui/menu-components/src/main/java/org/richfaces/component/UIMenuItem.java 2007-07-03 20:06:53 UTC (rev 1449)
@@ -23,7 +23,7 @@
import javax.faces.component.ActionSource;
-import org.ajax4jsf.framework.ajax.AjaxActionComponent;
+import org.ajax4jsf.component.AjaxActionComponent;
import org.ajax4jsf.framework.ajax.AjaxComponent;
import org.ajax4jsf.framework.ajax.AjaxSource;
Modified: trunk/ui/simpleTogglePanel/src/main/java/org/richfaces/component/UISimpleTogglePanel.java
===================================================================
--- trunk/ui/simpleTogglePanel/src/main/java/org/richfaces/component/UISimpleTogglePanel.java 2007-07-03 19:11:11 UTC (rev 1448)
+++ trunk/ui/simpleTogglePanel/src/main/java/org/richfaces/component/UISimpleTogglePanel.java 2007-07-03 20:06:53 UTC (rev 1449)
@@ -21,7 +21,7 @@
package org.richfaces.component;
-import org.ajax4jsf.framework.ajax.AjaxActionComponent;
+import org.ajax4jsf.component.AjaxActionComponent;
import org.ajax4jsf.framework.ajax.AjaxComponent;
import org.ajax4jsf.framework.ajax.AjaxSource;
Modified: trunk/ui/suggestionbox/src/main/java/org/richfaces/component/UISuggestionBox.java
===================================================================
--- trunk/ui/suggestionbox/src/main/java/org/richfaces/component/UISuggestionBox.java 2007-07-03 19:11:11 UTC (rev 1448)
+++ trunk/ui/suggestionbox/src/main/java/org/richfaces/component/UISuggestionBox.java 2007-07-03 20:06:53 UTC (rev 1449)
@@ -21,8 +21,8 @@
package org.richfaces.component;
+import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.framework.ajax.AjaxComponent;
-import org.ajax4jsf.framework.ajax.AjaxContext;
import org.ajax4jsf.framework.ajax.AjaxEvent;
import org.ajax4jsf.framework.ajax.AjaxListener;
import org.ajax4jsf.framework.ajax.AjaxSource;
Modified: trunk/ui/suggestionbox/src/main/java/org/richfaces/renderkit/html/SuggestionBoxRenderer.java
===================================================================
--- trunk/ui/suggestionbox/src/main/java/org/richfaces/renderkit/html/SuggestionBoxRenderer.java 2007-07-03 19:11:11 UTC (rev 1448)
+++ trunk/ui/suggestionbox/src/main/java/org/richfaces/renderkit/html/SuggestionBoxRenderer.java 2007-07-03 20:06:53 UTC (rev 1449)
@@ -21,7 +21,7 @@
package org.richfaces.renderkit.html;
-import org.ajax4jsf.framework.ajax.AjaxContext;
+import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.framework.renderer.AjaxComponentRendererBase;
import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
import org.ajax4jsf.framework.renderer.RendererBase;
Modified: trunk/ui/tabPanel/src/main/java/org/richfaces/component/UITab.java
===================================================================
--- trunk/ui/tabPanel/src/main/java/org/richfaces/component/UITab.java 2007-07-03 19:11:11 UTC (rev 1448)
+++ trunk/ui/tabPanel/src/main/java/org/richfaces/component/UITab.java 2007-07-03 20:06:53 UTC (rev 1449)
@@ -21,7 +21,7 @@
package org.richfaces.component;
-import org.ajax4jsf.framework.ajax.AjaxActionComponent;
+import org.ajax4jsf.component.AjaxActionComponent;
import org.ajax4jsf.framework.ajax.AjaxComponent;
import org.ajax4jsf.framework.ajax.AjaxSource;
import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
Modified: trunk/ui/togglePanel/src/main/java/org/richfaces/component/UIToggleControl.java
===================================================================
--- trunk/ui/togglePanel/src/main/java/org/richfaces/component/UIToggleControl.java 2007-07-03 19:11:11 UTC (rev 1448)
+++ trunk/ui/togglePanel/src/main/java/org/richfaces/component/UIToggleControl.java 2007-07-03 20:06:53 UTC (rev 1449)
@@ -31,7 +31,7 @@
import javax.faces.el.MethodBinding;
import javax.faces.el.ValueBinding;
-import org.ajax4jsf.framework.ajax.AjaxActionComponent;
+import org.ajax4jsf.component.AjaxActionComponent;
import org.ajax4jsf.framework.ajax.AjaxComponent;
import org.ajax4jsf.framework.ajax.AjaxSource;
import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
17 years, 4 months
JBoss Rich Faces SVN: r1448 - trunk/ui/dropdown-menu/src/main/resources/org/richfaces/renderkit/html/css.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-07-03 15:11:11 -0400 (Tue, 03 Jul 2007)
New Revision: 1448
Modified:
trunk/ui/dropdown-menu/src/main/resources/org/richfaces/renderkit/html/css/dropdownmenu.xcss
Log:
Menu style fixed: removed 1px black bottom line
Modified: trunk/ui/dropdown-menu/src/main/resources/org/richfaces/renderkit/html/css/dropdownmenu.xcss
===================================================================
--- trunk/ui/dropdown-menu/src/main/resources/org/richfaces/renderkit/html/css/dropdownmenu.xcss 2007-07-03 17:26:05 UTC (rev 1447)
+++ trunk/ui/dropdown-menu/src/main/resources/org/richfaces/renderkit/html/css/dropdownmenu.xcss 2007-07-03 19:11:11 UTC (rev 1448)
@@ -12,7 +12,14 @@
position : absolute;
}
.dr-menu-list-bg {
- border : 1px solid;
+ border-top-style : solid;
+ border-left-style : solid;
+ border-right-style : solid;
+
+ border-top-width : 1px;
+ border-left-width : 1px;
+ border-right-width : 1px;
+
background : repeat-y left;
}
.dr-menu-label {
17 years, 4 months
JBoss Rich Faces SVN: r1446 - trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-07-03 12:48:28 -0400 (Tue, 03 Jul 2007)
New Revision: 1446
Modified:
trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/html/AjaxFormRenderer.java
Log:
Optimized imports
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/html/AjaxFormRenderer.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/html/AjaxFormRenderer.java 2007-07-03 16:48:03 UTC (rev 1445)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/html/AjaxFormRenderer.java 2007-07-03 16:48:28 UTC (rev 1446)
@@ -26,7 +26,6 @@
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
-import java.util.regex.Matcher;
import javax.faces.component.NamingContainer;
import javax.faces.component.UIComponent;
@@ -43,7 +42,6 @@
import org.ajax4jsf.framework.renderer.RendererUtils.HTML;
import org.ajax4jsf.framework.resource.InternetResource;
import org.ajax4jsf.framework.util.javascript.JSFunction;
-import org.ajax4jsf.framework.util.javascript.JSReference;
/**
* @author shura
17 years, 4 months