Author: alexsmirnov
Date: 2007-07-09 20:39:15 -0400 (Mon, 09 Jul 2007)
New Revision: 1558
Added:
trunk/framework/impl/src/main/java/org/ajax4jsf/application/package.html
trunk/framework/impl/src/main/java/org/ajax4jsf/javascript/AjaxScript.java
trunk/framework/impl/src/main/java/org/ajax4jsf/javascript/DnDScript.java
trunk/framework/impl/src/main/java/org/ajax4jsf/javascript/ImageCacheScript.java
trunk/ui/core/src/main/java/org/ajax4jsf/component/ResourceBundleMap.java
Removed:
trunk/framework/impl/src/main/java/org/ajax4jsf/ajax/ResourceBundleMap.java
trunk/framework/impl/src/main/java/org/ajax4jsf/dnd/DnDScript.java
trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxScript.java
trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/ImageCacheScript.java
trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/package.html
Modified:
trunk/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxComponentRendererBase.java
trunk/framework/impl/src/main/resources/META-INF/resources-config.xml
trunk/framework/test/src/test/java/DnDScriptTest.java
trunk/ui/core/src/main/java/org/ajax4jsf/component/UILoadBundle.java
trunk/ui/datascroller/src/main/templates/org/richfaces/htmlDatascroller.jspx
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/renderkit/html/DragSupportRenderer.java
trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/html/DropSupportRenderer.java
trunk/ui/drag-drop/src/main/templates/org/richfaces/htmlDragIndicator.jspx
trunk/ui/dropdown-menu/src/main/templates/org/richfaces/htmlDropDownMenu.jspx
trunk/ui/menu-components/src/main/templates/org/richfaces/htmlMenuGroup.jspx
trunk/ui/menu-components/src/main/templates/org/richfaces/htmlMenuItem.jspx
trunk/ui/simpleTogglePanel/src/main/templates/simpleTogglePanel.jspx
trunk/ui/tabPanel/src/main/templates/tabPanel.jspx
trunk/ui/togglePanel/src/main/templates/toggleControl.jspx
Log:
packages and classes refactor in the "impl" project
Deleted: trunk/framework/impl/src/main/java/org/ajax4jsf/ajax/ResourceBundleMap.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/ajax/ResourceBundleMap.java 2007-07-10
00:31:28 UTC (rev 1557)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/ajax/ResourceBundleMap.java 2007-07-10
00:39:15 UTC (rev 1558)
@@ -1,147 +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;
-
-import java.util.Collection;
-import java.util.Map;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-import java.util.Set;
-
-import org.ajax4jsf.Messages;
-
-/**
- * Very limited Map decorator to ResourceBundle.
- * @author shura
- *
- */
-public class ResourceBundleMap implements Map {
-
- private ResourceBundle _bundle;
-
- /**
- * @param bundle
- */
- public ResourceBundleMap(ResourceBundle bundle) {
- super();
- _bundle = bundle;
- }
-
- /* (non-Javadoc)
- * @see java.util.Map#size()
- */
- public int size() {
- return 0;
- }
-
- /* (non-Javadoc)
- * @see java.util.Map#isEmpty()
- */
- public boolean isEmpty() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see java.util.Map#containsKey(java.lang.Object)
- */
- public boolean containsKey(Object key) {
-
- try {
- _bundle.getObject(key.toString());
- return true;
- } catch (MissingResourceException e) {
- return false;
- }
- }
-
- /* (non-Javadoc)
- * @see java.util.Map#containsValue(java.lang.Object)
- */
- public boolean containsValue(Object value) {
- // TODO Auto-generated method stub
- return false;
- }
-
- /* (non-Javadoc)
- * @see java.util.Map#get(java.lang.Object)
- */
- public Object get(Object key) {
- try {
- return _bundle.getObject(key.toString());
- } catch (MissingResourceException e) {
- return key;
- }
- }
-
- /* (non-Javadoc)
- * @see java.util.Map#put(java.lang.Object, java.lang.Object)
- */
- public Object put(Object arg0, Object arg1) {
- throw new
UnsupportedOperationException(Messages.getMessage(Messages.BUNDLE_MAP_NO_PUT_VALUE));
- }
-
- /* (non-Javadoc)
- * @see java.util.Map#remove(java.lang.Object)
- */
- public Object remove(Object key) {
- throw new
UnsupportedOperationException(Messages.getMessage(Messages.BUNDLE_MAP_NO_REMOVE_VALUE));
- }
-
- /* (non-Javadoc)
- * @see java.util.Map#putAll(java.util.Map)
- */
- public void putAll(Map arg0) {
- throw new
UnsupportedOperationException(Messages.getMessage(Messages.BUNDLE_MAP_NO_PUT_VALUE));
- }
-
- /* (non-Javadoc)
- * @see java.util.Map#clear()
- */
- public void clear() {
- throw new
UnsupportedOperationException(Messages.getMessage(Messages.BUNDLE_MAP_NO_REMOVE_VALUE));
- }
-
- /* (non-Javadoc)
- * @see java.util.Map#keySet()
- */
- public Set keySet() {
- // TODO Auto-generated method stub
- return null;
- }
-
- /* (non-Javadoc)
- * @see java.util.Map#values()
- */
- public Collection values() {
- // TODO Auto-generated method stub
- return null;
- }
-
- /* (non-Javadoc)
- * @see java.util.Map#entrySet()
- */
- public Set entrySet() {
- // TODO Auto-generated method stub
- return null;
- }
-
-}
Copied: trunk/framework/impl/src/main/java/org/ajax4jsf/application/package.html (from rev
1551, trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/package.html)
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/application/package.html
(rev 0)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/application/package.html 2007-07-10
00:39:15 UTC (rev 1558)
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html;
charset=Cp1251"/>
+<title>Package description for AJAX components</title>
+</head>
+<body>
+</body>
+</html>
Deleted: trunk/framework/impl/src/main/java/org/ajax4jsf/dnd/DnDScript.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/dnd/DnDScript.java 2007-07-10 00:31:28
UTC (rev 1557)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/dnd/DnDScript.java 2007-07-10 00:39:15
UTC (rev 1558)
@@ -1,46 +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.resource.ClientScript;
-
-/**
- * @author shura
- *
- */
-public class DnDScript extends ClientScript {
-
- /* (non-Javadoc)
- * @see org.ajax4jsf.resource.ClientScript#getJavaScript()
- */
- public String getJavaScript() {
- return "/org/ajax4jsf/framework/ajax/scripts/dnd.js";
- }
-
- /* (non-Javadoc)
- * @see org.ajax4jsf.resource.ClientScript#isUsePrototype()
- */
- protected boolean isUsePrototype() {
- return true;
- }
-
-}
Deleted: trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxScript.java
===================================================================
---
trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxScript.java 2007-07-10
00:31:28 UTC (rev 1557)
+++
trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxScript.java 2007-07-10
00:39:15 UTC (rev 1558)
@@ -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.framework.ajax;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import org.ajax4jsf.resource.ClientScript;
-
-/**
- * Resource for AJAX client-side script. Render one time per page.
- * @author asmirnov(a)exadel.com (latest modification by $Author: alexsmirnov $)
- * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:33 $
- *
- */
-public class AjaxScript extends ClientScript {
-
- private static final Log _log = LogFactory.getLog(AjaxScript.class);
-
- /**
- * Set JavaScript renderer and modification time to application-startup time.
- */
- public AjaxScript() {
- super();
- if (_log.isDebugEnabled()) {
- _log.debug("AjaxScript() - Created instance of AjaxScript resource");
//$NON-NLS-1$
- }
- }
-
-
- /**
- * @return Returns the javaScript.
- */
- public String getJavaScript() {
- return "scripts/AJAX.js";
- }
-
-
-}
Deleted:
trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/ImageCacheScript.java
===================================================================
---
trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/ImageCacheScript.java 2007-07-10
00:31:28 UTC (rev 1557)
+++
trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/ImageCacheScript.java 2007-07-10
00:39:15 UTC (rev 1558)
@@ -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 org.ajax4jsf.resource.ClientScript;
-
-/**
- * Resource for Drag ' Drop client javascript
- * @author asmirnov(a)exadel.com (latest modification by $Author: alexsmirnov $)
- * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:33 $
- *
- */
-public class ImageCacheScript extends ClientScript {
-
-
-
- /**
- *
- */
- public ImageCacheScript() {
- super();
- usePrototype=true;
-// setRenderer(new ScriptRenderer());
-// setLastModified(new Date(InternetResourceBuilder.getInstance().getStartTime()));
- }
-
- /* (non-Javadoc)
- * @see org.ajax4jsf.framework.ajax.ClientScript#getJavaScript()
- */
- public String getJavaScript() {
- // TODO Auto-generated method stub
- return "scripts/imagecache.js";
- }
-
-
-}
Deleted: trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/package.html
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/package.html 2007-07-10
00:31:28 UTC (rev 1557)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/package.html 2007-07-10
00:39:15 UTC (rev 1558)
@@ -1,9 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html;
charset=Cp1251"/>
-<title>Package description for AJAX components</title>
-</head>
-<body>
-</body>
-</html>
Modified:
trunk/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxComponentRendererBase.java
===================================================================
---
trunk/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxComponentRendererBase.java 2007-07-10
00:31:28 UTC (rev 1557)
+++
trunk/framework/impl/src/main/java/org/ajax4jsf/framework/renderer/AjaxComponentRendererBase.java 2007-07-10
00:39:15 UTC (rev 1558)
@@ -21,7 +21,7 @@
package org.ajax4jsf.framework.renderer;
-import org.ajax4jsf.framework.ajax.AjaxScript;
+import org.ajax4jsf.javascript.AjaxScript;
import org.ajax4jsf.renderkit.HeaderResourceProducer;
import org.ajax4jsf.resource.InternetResource;
Copied: trunk/framework/impl/src/main/java/org/ajax4jsf/javascript/AjaxScript.java (from
rev 1551, trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/AjaxScript.java)
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/javascript/AjaxScript.java
(rev 0)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/javascript/AjaxScript.java 2007-07-10
00:39:15 UTC (rev 1558)
@@ -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.javascript;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import org.ajax4jsf.resource.ClientScript;
+
+/**
+ * Resource for AJAX client-side script. Render one time per page.
+ * @author asmirnov(a)exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:33 $
+ *
+ */
+public class AjaxScript extends ClientScript {
+
+ private static final Log _log = LogFactory.getLog(AjaxScript.class);
+
+ /**
+ * Set JavaScript renderer and modification time to application-startup time.
+ */
+ public AjaxScript() {
+ super();
+ if (_log.isDebugEnabled()) {
+ _log.debug("AjaxScript() - Created instance of AjaxScript resource");
//$NON-NLS-1$
+ }
+ }
+
+
+ /**
+ * @return Returns the javaScript.
+ */
+ public String getJavaScript() {
+ return "scripts/AJAX.js";
+ }
+
+
+}
Copied: trunk/framework/impl/src/main/java/org/ajax4jsf/javascript/DnDScript.java (from
rev 1551, trunk/framework/impl/src/main/java/org/ajax4jsf/dnd/DnDScript.java)
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/javascript/DnDScript.java
(rev 0)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/javascript/DnDScript.java 2007-07-10
00:39:15 UTC (rev 1558)
@@ -0,0 +1,46 @@
+/**
+ * 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.javascript;
+
+import org.ajax4jsf.resource.ClientScript;
+
+/**
+ * @author shura
+ *
+ */
+public class DnDScript extends ClientScript {
+
+ /* (non-Javadoc)
+ * @see org.ajax4jsf.resource.ClientScript#getJavaScript()
+ */
+ public String getJavaScript() {
+ return "/org/ajax4jsf/framework/ajax/scripts/dnd.js";
+ }
+
+ /* (non-Javadoc)
+ * @see org.ajax4jsf.resource.ClientScript#isUsePrototype()
+ */
+ protected boolean isUsePrototype() {
+ return true;
+ }
+
+}
Copied: trunk/framework/impl/src/main/java/org/ajax4jsf/javascript/ImageCacheScript.java
(from rev 1551,
trunk/framework/impl/src/main/java/org/ajax4jsf/framework/ajax/ImageCacheScript.java)
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/javascript/ImageCacheScript.java
(rev 0)
+++
trunk/framework/impl/src/main/java/org/ajax4jsf/javascript/ImageCacheScript.java 2007-07-10
00:39:15 UTC (rev 1558)
@@ -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.javascript;
+
+import org.ajax4jsf.resource.ClientScript;
+
+/**
+ * Resource for Drag ' Drop client javascript
+ * @author asmirnov(a)exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:33 $
+ *
+ */
+public class ImageCacheScript extends ClientScript {
+
+
+
+ /**
+ *
+ */
+ public ImageCacheScript() {
+ super();
+ usePrototype=true;
+// setRenderer(new ScriptRenderer());
+// setLastModified(new Date(InternetResourceBuilder.getInstance().getStartTime()));
+ }
+
+ /* (non-Javadoc)
+ * @see org.ajax4jsf.framework.ajax.ClientScript#getJavaScript()
+ */
+ public String getJavaScript() {
+ // TODO Auto-generated method stub
+ return "scripts/imagecache.js";
+ }
+
+
+}
Modified: trunk/framework/impl/src/main/resources/META-INF/resources-config.xml
===================================================================
--- trunk/framework/impl/src/main/resources/META-INF/resources-config.xml 2007-07-10
00:31:28 UTC (rev 1557)
+++ trunk/framework/impl/src/main/resources/META-INF/resources-config.xml 2007-07-10
00:39:15 UTC (rev 1558)
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<resource-config>
- <resource class="org.ajax4jsf.framework.ajax.AjaxScript">
- <name>org.ajax4jsf.framework.ajax.AjaxScript</name>
+ <resource class="org.ajax4jsf.javascript.AjaxScript">
+ <name>org.ajax4jsf.javascript.AjaxScript</name>
</resource>
- <resource class="org.ajax4jsf.framework.ajax.AjaxScript">
+ <resource class="org.ajax4jsf.javascript.AjaxScript">
<name>ajax.js</name>
</resource>
<resource class="org.ajax4jsf.resource.PrototypeScript">
<name>prototype.js</name>
</resource>
- <resource class="org.ajax4jsf.dnd.DnDScript">
+ <resource class="org.ajax4jsf.javascript.DnDScript">
<name>dnd.js</name>
</resource>
<resource >
Modified: trunk/framework/test/src/test/java/DnDScriptTest.java
===================================================================
--- trunk/framework/test/src/test/java/DnDScriptTest.java 2007-07-10 00:31:28 UTC (rev
1557)
+++ trunk/framework/test/src/test/java/DnDScriptTest.java 2007-07-10 00:39:15 UTC (rev
1558)
@@ -21,7 +21,7 @@
import java.io.IOException;
-import org.ajax4jsf.dnd.DnDScript;
+import org.ajax4jsf.javascript.DnDScript;
import org.ajax4jsf.resource.FacesResourceContext;
import org.ajax4jsf.resource.ResourceContext;
import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
Copied: trunk/ui/core/src/main/java/org/ajax4jsf/component/ResourceBundleMap.java (from
rev 1551, trunk/framework/impl/src/main/java/org/ajax4jsf/ajax/ResourceBundleMap.java)
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/component/ResourceBundleMap.java
(rev 0)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/component/ResourceBundleMap.java 2007-07-10
00:39:15 UTC (rev 1558)
@@ -0,0 +1,147 @@
+/**
+ * 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.Map;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+import java.util.Set;
+
+import org.ajax4jsf.Messages;
+
+/**
+ * Very limited Map decorator to ResourceBundle.
+ * @author shura
+ *
+ */
+public class ResourceBundleMap implements Map {
+
+ private ResourceBundle _bundle;
+
+ /**
+ * @param bundle
+ */
+ public ResourceBundleMap(ResourceBundle bundle) {
+ super();
+ _bundle = bundle;
+ }
+
+ /* (non-Javadoc)
+ * @see java.util.Map#size()
+ */
+ public int size() {
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see java.util.Map#isEmpty()
+ */
+ public boolean isEmpty() {
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see java.util.Map#containsKey(java.lang.Object)
+ */
+ public boolean containsKey(Object key) {
+
+ try {
+ _bundle.getObject(key.toString());
+ return true;
+ } catch (MissingResourceException e) {
+ return false;
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.util.Map#containsValue(java.lang.Object)
+ */
+ public boolean containsValue(Object value) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see java.util.Map#get(java.lang.Object)
+ */
+ public Object get(Object key) {
+ try {
+ return _bundle.getObject(key.toString());
+ } catch (MissingResourceException e) {
+ return key;
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see java.util.Map#put(java.lang.Object, java.lang.Object)
+ */
+ public Object put(Object arg0, Object arg1) {
+ throw new
UnsupportedOperationException(Messages.getMessage(Messages.BUNDLE_MAP_NO_PUT_VALUE));
+ }
+
+ /* (non-Javadoc)
+ * @see java.util.Map#remove(java.lang.Object)
+ */
+ public Object remove(Object key) {
+ throw new
UnsupportedOperationException(Messages.getMessage(Messages.BUNDLE_MAP_NO_REMOVE_VALUE));
+ }
+
+ /* (non-Javadoc)
+ * @see java.util.Map#putAll(java.util.Map)
+ */
+ public void putAll(Map arg0) {
+ throw new
UnsupportedOperationException(Messages.getMessage(Messages.BUNDLE_MAP_NO_PUT_VALUE));
+ }
+
+ /* (non-Javadoc)
+ * @see java.util.Map#clear()
+ */
+ public void clear() {
+ throw new
UnsupportedOperationException(Messages.getMessage(Messages.BUNDLE_MAP_NO_REMOVE_VALUE));
+ }
+
+ /* (non-Javadoc)
+ * @see java.util.Map#keySet()
+ */
+ public Set keySet() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see java.util.Map#values()
+ */
+ public Collection values() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see java.util.Map#entrySet()
+ */
+ public Set entrySet() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/component/UILoadBundle.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/component/UILoadBundle.java 2007-07-10
00:31:28 UTC (rev 1557)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/component/UILoadBundle.java 2007-07-10
00:39:15 UTC (rev 1558)
@@ -31,7 +31,6 @@
import javax.faces.context.FacesContext;
import org.ajax4jsf.Messages;
-import org.ajax4jsf.ajax.ResourceBundleMap;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
Modified: trunk/ui/datascroller/src/main/templates/org/richfaces/htmlDatascroller.jspx
===================================================================
---
trunk/ui/datascroller/src/main/templates/org/richfaces/htmlDatascroller.jspx 2007-07-10
00:31:28 UTC (rev 1557)
+++
trunk/ui/datascroller/src/main/templates/org/richfaces/htmlDatascroller.jspx 2007-07-10
00:39:15 UTC (rev 1558)
@@ -13,7 +13,7 @@
<h:scripts>
new org.ajax4jsf.resource.PrototypeScript(),
- new org.ajax4jsf.framework.ajax.AjaxScript(),
+ new org.ajax4jsf.javascript.AjaxScript(),
</h:scripts>
<f:clientid var="clientId"/>
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-10
00:31:28 UTC (rev 1557)
+++
trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/DraggableRendererContributor.java 2007-07-10
00:39:15 UTC (rev 1558)
@@ -29,8 +29,8 @@
import javax.faces.context.FacesContext;
import javax.faces.event.FacesEvent;
-import org.ajax4jsf.dnd.DnDScript;
import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
+import org.ajax4jsf.javascript.DnDScript;
import org.ajax4jsf.resource.PrototypeScript;
import org.richfaces.component.Draggable;
import org.richfaces.component.Dropzone;
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-10
00:31:28 UTC (rev 1557)
+++
trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/DropzoneRendererContributor.java 2007-07-10
00:39:15 UTC (rev 1558)
@@ -28,8 +28,8 @@
import javax.faces.context.FacesContext;
import javax.faces.event.FacesEvent;
-import org.ajax4jsf.dnd.DnDScript;
import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
+import org.ajax4jsf.javascript.DnDScript;
import org.ajax4jsf.javascript.JSFunction;
import org.ajax4jsf.javascript.JSFunctionDefinition;
import org.ajax4jsf.javascript.JSReference;
Modified:
trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/html/DragSupportRenderer.java
===================================================================
---
trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/html/DragSupportRenderer.java 2007-07-10
00:31:28 UTC (rev 1557)
+++
trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/html/DragSupportRenderer.java 2007-07-10
00:39:15 UTC (rev 1558)
@@ -28,8 +28,8 @@
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
-import org.ajax4jsf.framework.ajax.AjaxScript;
import org.ajax4jsf.framework.renderer.RendererUtils.HTML;
+import org.ajax4jsf.javascript.AjaxScript;
import org.ajax4jsf.javascript.JSFunction;
import org.ajax4jsf.resource.InternetResource;
import org.richfaces.component.UIDragSupport;
Modified:
trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/html/DropSupportRenderer.java
===================================================================
---
trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/html/DropSupportRenderer.java 2007-07-10
00:31:28 UTC (rev 1557)
+++
trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/html/DropSupportRenderer.java 2007-07-10
00:39:15 UTC (rev 1558)
@@ -28,8 +28,8 @@
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
-import org.ajax4jsf.framework.ajax.AjaxScript;
import org.ajax4jsf.framework.renderer.RendererUtils.HTML;
+import org.ajax4jsf.javascript.AjaxScript;
import org.ajax4jsf.javascript.JSFunction;
import org.ajax4jsf.resource.InternetResource;
import org.richfaces.component.UIDropSupport;
Modified: trunk/ui/drag-drop/src/main/templates/org/richfaces/htmlDragIndicator.jspx
===================================================================
--- trunk/ui/drag-drop/src/main/templates/org/richfaces/htmlDragIndicator.jspx 2007-07-10
00:31:28 UTC (rev 1557)
+++ trunk/ui/drag-drop/src/main/templates/org/richfaces/htmlDragIndicator.jspx 2007-07-10
00:39:15 UTC (rev 1558)
@@ -13,8 +13,8 @@
<h:scripts>
new org.ajax4jsf.resource.PrototypeScript(),
- new org.ajax4jsf.framework.ajax.AjaxScript(),
- new org.ajax4jsf.dnd.DnDScript(),
+ new org.ajax4jsf.javascript.AjaxScript(),
+ new org.ajax4jsf.javascript.DnDScript(),
/org/richfaces/renderkit/html/scripts/utils.js,
/org/richfaces/renderkit/html/scripts/json/json-dom.js,
/org/richfaces/renderkit/html/scripts/dnd/dnd-common.js,
Modified: trunk/ui/dropdown-menu/src/main/templates/org/richfaces/htmlDropDownMenu.jspx
===================================================================
---
trunk/ui/dropdown-menu/src/main/templates/org/richfaces/htmlDropDownMenu.jspx 2007-07-10
00:31:28 UTC (rev 1557)
+++
trunk/ui/dropdown-menu/src/main/templates/org/richfaces/htmlDropDownMenu.jspx 2007-07-10
00:39:15 UTC (rev 1558)
@@ -13,7 +13,7 @@
<h:scripts>
new org.ajax4jsf.resource.PrototypeScript(),
- new org.ajax4jsf.framework.ajax.AjaxScript(),
+ new org.ajax4jsf.javascript.AjaxScript(),
scripts/menu.js
</h:scripts>
Modified: trunk/ui/menu-components/src/main/templates/org/richfaces/htmlMenuGroup.jspx
===================================================================
---
trunk/ui/menu-components/src/main/templates/org/richfaces/htmlMenuGroup.jspx 2007-07-10
00:31:28 UTC (rev 1557)
+++
trunk/ui/menu-components/src/main/templates/org/richfaces/htmlMenuGroup.jspx 2007-07-10
00:39:15 UTC (rev 1558)
@@ -14,7 +14,7 @@
<h:scripts>
new org.ajax4jsf.resource.PrototypeScript(),
- new org.ajax4jsf.framework.ajax.AjaxScript()
+ new org.ajax4jsf.javascript.AjaxScript()
</h:scripts>
<f:clientid var="clientId"/>
Modified: trunk/ui/menu-components/src/main/templates/org/richfaces/htmlMenuItem.jspx
===================================================================
--- trunk/ui/menu-components/src/main/templates/org/richfaces/htmlMenuItem.jspx 2007-07-10
00:31:28 UTC (rev 1557)
+++ trunk/ui/menu-components/src/main/templates/org/richfaces/htmlMenuItem.jspx 2007-07-10
00:39:15 UTC (rev 1558)
@@ -13,7 +13,7 @@
<h:scripts>
new org.ajax4jsf.resource.PrototypeScript(),
- new org.ajax4jsf.framework.ajax.AjaxScript(),
+ new org.ajax4jsf.javascript.AjaxScript(),
/org/richfaces/renderkit/html/scripts/utils.js,
/org/ajax4jsf/renderkit/html/scripts/form.js,
/org/richfaces/renderkit/html/scripts/form.js
Modified: trunk/ui/simpleTogglePanel/src/main/templates/simpleTogglePanel.jspx
===================================================================
--- trunk/ui/simpleTogglePanel/src/main/templates/simpleTogglePanel.jspx 2007-07-10
00:31:28 UTC (rev 1557)
+++ trunk/ui/simpleTogglePanel/src/main/templates/simpleTogglePanel.jspx 2007-07-10
00:39:15 UTC (rev 1558)
@@ -13,8 +13,8 @@
<h:styles>css/simpleTogglePanel.xcss</h:styles>
<h:scripts>
new org.ajax4jsf.resource.PrototypeScript(),
-new org.ajax4jsf.framework.ajax.AjaxScript(),
-new org.ajax4jsf.framework.ajax.ImageCacheScript(),
+new org.ajax4jsf.javascript.AjaxScript(),
+new org.ajax4jsf.javascript.ImageCacheScript(),
/org/ajax4jsf/renderkit/html/scripts/form.js,
/org/richfaces/renderkit/html/scripts/browser_info.js,
scripts/simpleTogglePanel.js
Modified: trunk/ui/tabPanel/src/main/templates/tabPanel.jspx
===================================================================
--- trunk/ui/tabPanel/src/main/templates/tabPanel.jspx 2007-07-10 00:31:28 UTC (rev 1557)
+++ trunk/ui/tabPanel/src/main/templates/tabPanel.jspx 2007-07-10 00:39:15 UTC (rev 1558)
@@ -13,8 +13,8 @@
<h:styles>css/tabPanel.xcss</h:styles>
<h:scripts>
new org.ajax4jsf.resource.PrototypeScript(),
- new org.ajax4jsf.framework.ajax.AjaxScript(),
- new org.ajax4jsf.framework.ajax.ImageCacheScript(),
+ new org.ajax4jsf.javascript.AjaxScript(),
+ new org.ajax4jsf.javascript.ImageCacheScript(),
/org/richfaces/renderkit/html/scripts/browser_info.js,
/org/ajax4jsf/renderkit/html/scripts/form.js,
scripts/tabPanel.js
Modified: trunk/ui/togglePanel/src/main/templates/toggleControl.jspx
===================================================================
--- trunk/ui/togglePanel/src/main/templates/toggleControl.jspx 2007-07-10 00:31:28 UTC
(rev 1557)
+++ trunk/ui/togglePanel/src/main/templates/toggleControl.jspx 2007-07-10 00:39:15 UTC
(rev 1558)
@@ -12,7 +12,7 @@
<h:styles>css/toggleControl.xcss</h:styles>
<h:scripts>
new org.ajax4jsf.resource.PrototypeScript(),
- new org.ajax4jsf.framework.ajax.AjaxScript(),
+ new org.ajax4jsf.javascript.AjaxScript(),
scripts/togglePanel.js
</h:scripts> <f:clientid var="clientId"/>
<a id="#{clientId}" href="#"