JBoss Rich Faces SVN: r37 - in trunk/richfaces: drag-drop/src/main/java/org/richfaces/renderkit and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-03-07 13:55:53 -0500 (Wed, 07 Mar 2007)
New Revision: 37
Added:
trunk/richfaces/common/src/main/resources/org/richfaces/renderkit/html/scripts/dnd/dnd-common.js
Modified:
trunk/richfaces/common/src/main/resources/org/richfaces/renderkit/html/scripts/dnd/dnd-draggable.js
trunk/richfaces/common/src/main/resources/org/richfaces/renderkit/html/scripts/dnd/dnd-dropzone.js
trunk/richfaces/drag-drop/src/main/java/org/richfaces/renderkit/DraggableRendererContributor.java
trunk/richfaces/drag-drop/src/main/java/org/richfaces/renderkit/DropzoneRendererContributor.java
Log:
DnD "multi" indicator enhancements.
{label} is now {count} + {units} | 'items' where
{count} - is items count
{units} - units name eg. computers, mails, etc. 'items' by default
Added: trunk/richfaces/common/src/main/resources/org/richfaces/renderkit/html/scripts/dnd/dnd-common.js
===================================================================
--- trunk/richfaces/common/src/main/resources/org/richfaces/renderkit/html/scripts/dnd/dnd-common.js (rev 0)
+++ trunk/richfaces/common/src/main/resources/org/richfaces/renderkit/html/scripts/dnd/dnd-common.js 2007-03-07 18:55:53 UTC (rev 37)
@@ -0,0 +1,53 @@
+DnD.getDnDDefaultParams = function(elt) {
+ var attr = elt.attributes["rich:defaultdndparams"];
+
+ if (attr) {
+ return attr.value.parseJSON();
+ }
+
+ return null;
+}
+
+DnD.getDnDMergedParams = function(elt, name) {
+ var params = DnD.getDnDDefaultParams(elt);
+
+ var attr = elt.attributes[name];
+
+ if (attr) {
+ var dndParams = attr.value.parseJSON();
+ if (params) {
+ if (dndParams) {
+ Object.extend(params, dndParams);
+ }
+ } else {
+ params = dndParams;
+ }
+ }
+
+ return params;
+};
+
+DnD.getDnDDragParams = function(elt) {
+ return DnD.getDnDMergedParams(elt, "rich:dragdndparams");
+};
+
+DnD.getDnDDropParams = function(elt) {
+ return DnD.getDnDMergedParams(elt, "rich:dropdndparams");
+};
+
+DnD.setDefaultDnDParams = function(params) {
+ if (params) {
+ if (drag && drag.source && drag.source.getDraggableItems && drag.source.getDraggableItems() > 1) {
+ if (!params) {
+ params = {};
+ }
+
+ var itemsCount = drag.source.getDraggableItems();
+ params["count"] = itemsCount;
+ if (!params["label"]) {
+ params["label"] = params["count"] + " " + (params["units"] ?
+ params["units"] : "items");
+ }
+ }
+ }
+};
Modified: trunk/richfaces/common/src/main/resources/org/richfaces/renderkit/html/scripts/dnd/dnd-draggable.js
===================================================================
--- trunk/richfaces/common/src/main/resources/org/richfaces/renderkit/html/scripts/dnd/dnd-draggable.js 2007-03-07 18:08:08 UTC (rev 36)
+++ trunk/richfaces/common/src/main/resources/org/richfaces/renderkit/html/scripts/dnd/dnd-draggable.js 2007-03-07 18:55:53 UTC (rev 37)
@@ -4,37 +4,6 @@
*/
DnD.Draggable = function() {};
-if (!DnD.getDnDDefaultParams) {
- DnD.getDnDDefaultParams = function(elt) {
- var attr = elt.attributes["rich:defaultdndparams"];
-
- if (attr) {
- return attr.value.parseJSON();
- }
-
- return null;
- };
-}
-
-DnD.getDnDDragParams = function(elt) {
- var params = DnD.getDnDDefaultParams(elt);
-
- var attr = elt.attributes["rich:dragdndparams"];
-
- if (attr) {
- var dndParams = attr.value.parseJSON();
- if (params) {
- if (dndParams) {
- Object.extend(params, dndParams);
- }
- } else {
- params = dndParams;
- }
- }
-
- return params;
-};
-
DnD.Draggable.prototype = {
getElement: function() {
@@ -81,13 +50,9 @@
if (indicator) {
var dndParams = this.getDnDDragParams();
- if (this.getDraggableItems && this.getDraggableItems() > 1) {
- if (!dndParams) {
- dndParams = {};
- }
+ DnD.setDefaultDnDParams(dndParams);
- dndParams["draggableItems"] = this.getDraggableItems();
-
+ if (this.getDraggableItems && this.getDraggableItems() > 1) {
indicator.setContent("default", false, dndParams);
} else {
indicator.setContent("default", true, dndParams);
Modified: trunk/richfaces/common/src/main/resources/org/richfaces/renderkit/html/scripts/dnd/dnd-dropzone.js
===================================================================
--- trunk/richfaces/common/src/main/resources/org/richfaces/renderkit/html/scripts/dnd/dnd-dropzone.js 2007-03-07 18:08:08 UTC (rev 36)
+++ trunk/richfaces/common/src/main/resources/org/richfaces/renderkit/html/scripts/dnd/dnd-dropzone.js 2007-03-07 18:55:53 UTC (rev 37)
@@ -5,37 +5,6 @@
*/
DnD.Dropzone = function(){};
-if (!DnD.getDnDDefaultParams) {
- DnD.getDnDDefaultParams = function(elt) {
- var attr = elt.attributes["rich:defaultdndparams"];
-
- if (attr) {
- return attr.value.parseJSON();
- }
-
- return null;
- };
-}
-
-DnD.getDnDDropParams = function(elt) {
- var params = DnD.getDnDDefaultParams(elt);
-
- var attr = elt.attributes["rich:dropdndparams"];
-
- if (attr) {
- var dndParams = attr.value.parseJSON();
- if (params) {
- if (dndParams) {
- Object.extend(params, dndParams);
- }
- } else {
- params = dndParams;
- }
- }
-
- return params;
-};
-
DnD.Dropzone.DROP_TARGET_ID = "dropTargetId";
DnD.Dropzone.prototype = {
@@ -106,13 +75,9 @@
var accepts = this.accept(drag);
var markerType = accepts ? "accept" : "reject";
+ DnD.setDefaultDnDParams(dndParams);
+
if (drag.source.getDraggableItems && drag.source.getDraggableItems() > 1) {
- if (!dndParams) {
- dndParams = {};
- }
-
- dndParams["draggableItems"] = drag.source.getDraggableItems();
-
indicator.setContent(markerType, false, dndParams);
} else {
indicator.setContent(markerType, true, dndParams);
Modified: trunk/richfaces/drag-drop/src/main/java/org/richfaces/renderkit/DraggableRendererContributor.java
===================================================================
--- trunk/richfaces/drag-drop/src/main/java/org/richfaces/renderkit/DraggableRendererContributor.java 2007-03-07 18:08:08 UTC (rev 36)
+++ trunk/richfaces/drag-drop/src/main/java/org/richfaces/renderkit/DraggableRendererContributor.java 2007-03-07 18:55:53 UTC (rev 37)
@@ -114,6 +114,7 @@
PrototypeScript.class.getName(),
"/org/richfaces/renderkit/html/scripts/json/json.js",
DnDScript.class.getName(),
+ "/org/richfaces/renderkit/html/scripts/dnd/dnd-common.js",
"/org/richfaces/renderkit/html/scripts/dnd/dnd-draggable.js"
};
}
Modified: trunk/richfaces/drag-drop/src/main/java/org/richfaces/renderkit/DropzoneRendererContributor.java
===================================================================
--- trunk/richfaces/drag-drop/src/main/java/org/richfaces/renderkit/DropzoneRendererContributor.java 2007-03-07 18:08:08 UTC (rev 36)
+++ trunk/richfaces/drag-drop/src/main/java/org/richfaces/renderkit/DropzoneRendererContributor.java 2007-03-07 18:55:53 UTC (rev 37)
@@ -190,6 +190,7 @@
PrototypeScript.class.getName(),
"/org/richfaces/renderkit/html/scripts/json/json.js",
DnDScript.class.getName(),
+ "/org/richfaces/renderkit/html/scripts/dnd/dnd-common.js",
"/org/richfaces/renderkit/html/scripts/dnd/dnd-dropzone.js"
};
}
17 years, 2 months
JBoss Rich Faces SVN: r36 - in trunk: richfaces/common and 37 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-03-07 13:08:08 -0500 (Wed, 07 Mar 2007)
New Revision: 36
Removed:
trunk/richfaces/tree/out
Modified:
trunk/richfaces-samples/
trunk/richfaces-samples/dataFilterSliderDemo/
trunk/richfaces-samples/dataTableDemo/
trunk/richfaces-samples/datascroller-sample/
trunk/richfaces-samples/dragDropDemo/
trunk/richfaces-samples/gmap-sample/
trunk/richfaces-samples/inputNumberSliderDemo/
trunk/richfaces-samples/inputNumberSpinnerDemo/
trunk/richfaces-samples/modalpanel-sample/
trunk/richfaces-samples/panel-sample/
trunk/richfaces-samples/panelbar-sample/
trunk/richfaces-samples/simpleTogglePanel-sample/
trunk/richfaces-samples/skins/
trunk/richfaces-samples/suggestionbox-sample/
trunk/richfaces-samples/tabPanelDemo/
trunk/richfaces-samples/togglePanel-sample/
trunk/richfaces-samples/toolBarDemo/
trunk/richfaces-samples/tree-demo/
trunk/richfaces/
trunk/richfaces/common/
trunk/richfaces/dataFilterSlider/
trunk/richfaces/dataTable/
trunk/richfaces/datascroller/
trunk/richfaces/drag-drop/
trunk/richfaces/gmap/
trunk/richfaces/inputnumber-slider/
trunk/richfaces/inputnumber-spinner/
trunk/richfaces/modal-panel/
trunk/richfaces/paint2D/
trunk/richfaces/panel/
trunk/richfaces/panelBar/
trunk/richfaces/separator/
trunk/richfaces/simpleTogglePanel/
trunk/richfaces/spacer/
trunk/richfaces/suggestionbox/
trunk/richfaces/tabPanel/
trunk/richfaces/togglePanel/
trunk/richfaces/toolBar/
trunk/richfaces/tree/
Log:
Eclipse stuff added to svn:ignore. Garbage collected
Property changes on: trunk/richfaces
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: trunk/richfaces/common
___________________________________________________________________
Name: svn:ignore
- target
+ target
.classpath
.project
.settings
Property changes on: trunk/richfaces/dataFilterSlider
___________________________________________________________________
Name: svn:ignore
- target
+ target
.settings
.classpath
.project
Property changes on: trunk/richfaces/dataTable
___________________________________________________________________
Name: svn:ignore
- target
+ target
.settings
.classpath
.project
Property changes on: trunk/richfaces/datascroller
___________________________________________________________________
Name: svn:ignore
- target
+ target
.settings
.classpath
.project
Property changes on: trunk/richfaces/drag-drop
___________________________________________________________________
Name: svn:ignore
- target
+ target
.settings
.classpath
.project
Property changes on: trunk/richfaces/gmap
___________________________________________________________________
Name: svn:ignore
- target
+ target
.settings
.classpath
.project
Property changes on: trunk/richfaces/inputnumber-slider
___________________________________________________________________
Name: svn:ignore
- target
+ target
.settings
.classpath
.project
Property changes on: trunk/richfaces/inputnumber-spinner
___________________________________________________________________
Name: svn:ignore
- target
+ target
.settings
.classpath
.project
Property changes on: trunk/richfaces/modal-panel
___________________________________________________________________
Name: svn:ignore
- target
+ target
.settings
.classpath
.project
Property changes on: trunk/richfaces/paint2D
___________________________________________________________________
Name: svn:ignore
- target
+ target
.settings
.classpath
.project
Property changes on: trunk/richfaces/panel
___________________________________________________________________
Name: svn:ignore
- target
+ target
.settings
.classpath
.project
Property changes on: trunk/richfaces/panelBar
___________________________________________________________________
Name: svn:ignore
- target
+ target
.settings
.classpath
.project
Property changes on: trunk/richfaces/separator
___________________________________________________________________
Name: svn:ignore
- target
+ target
.settings
.classpath
.project
Property changes on: trunk/richfaces/simpleTogglePanel
___________________________________________________________________
Name: svn:ignore
- target
+ target
.settings
.classpath
.project
Property changes on: trunk/richfaces/spacer
___________________________________________________________________
Name: svn:ignore
- target
+ target
.settings
.classpath
.project
Property changes on: trunk/richfaces/suggestionbox
___________________________________________________________________
Name: svn:ignore
- target
+ target
.settings
.classpath
.project
Property changes on: trunk/richfaces/tabPanel
___________________________________________________________________
Name: svn:ignore
- target
+ target
.settings
.classpath
.project
Property changes on: trunk/richfaces/togglePanel
___________________________________________________________________
Name: svn:ignore
- target
+ target
.settings
.classpath
.project
Property changes on: trunk/richfaces/toolBar
___________________________________________________________________
Name: svn:ignore
- target
+ target
.settings
.classpath
.project
Property changes on: trunk/richfaces/tree
___________________________________________________________________
Name: svn:ignore
- target
+ target
.settings
.classpath
.project
Deleted: trunk/richfaces/tree/out
===================================================================
--- trunk/richfaces/tree/out 2007-03-07 17:31:02 UTC (rev 35)
+++ trunk/richfaces/tree/out 2007-03-07 18:08:08 UTC (rev 36)
@@ -1,257 +0,0 @@
-+ Error stacktraces are turned on.
-[INFO] Scanning for projects...
-[INFO] ----------------------------------------------------------------------------
-[INFO] Building Unnamed - org.richfaces:tree:jar:3.0.0-SNAPSHOT
-[INFO] task-segment: [clean, install]
-[INFO] ----------------------------------------------------------------------------
-[INFO] snapshot org.ajax4jsf.cdk:maven-cdk-plugin:1.1.0-SNAPSHOT: checking for updates from maven2-snapshots.ajax4jsf.org
-[INFO] snapshot org.ajax4jsf.cdk:maven-cdk-plugin:1.1.0-SNAPSHOT: checking for updates from maven2-snapshots.ajax4jsf.org
-[INFO] snapshot org.ajax4jsf:cdk:1.1.0-SNAPSHOT: checking for updates from maven2-snapshots.ajax4jsf.org
-[INFO] snapshot org.ajax4jsf:cdk:1.1.0-SNAPSHOT: checking for updates from maven2-snapshots.ajax4jsf.org
-[INFO] snapshot org.ajax4jsf:master:1.1.0-SNAPSHOT: checking for updates from maven2-snapshots.ajax4jsf.org
-[INFO] snapshot org.ajax4jsf:master:1.1.0-SNAPSHOT: checking for updates from maven2-snapshots.ajax4jsf.org
-[INFO] [clean:clean]
-[INFO] Deleting directory C:\projects\exadel\RichFaces3\ezfaces\richfaces\tree\target
-[INFO] Deleting directory C:\projects\exadel\RichFaces3\ezfaces\richfaces\tree\target\classes
-[INFO] Deleting directory C:\projects\exadel\RichFaces3\ezfaces\richfaces\tree\target\test-classes
-[INFO] Preparing cdk:generate
-[WARNING] Removing: generate from forked lifecycle, to prevent recursive invocation.
-[INFO] [resources:resources]
-[INFO] Using default encoding to copy filtered resources.
-[INFO] snapshot org.richfaces:common:3.0.0-SNAPSHOT: checking for updates from maven2-snapshots.ajax4jsf.org
-[INFO] snapshot org.richfaces:richfaces-parent:3.0.0-SNAPSHOT: checking for updates from maven2-snapshots.ajax4jsf.org
-[WARNING]
- Artifact javax.servlet:servlet-api:jar:2.4:provided retains local scope 'provided' overriding broader scope 'runtime'
- given by a dependency. If this is not intended, modify or remove the local scope.
-
-[INFO] snapshot org.ajax4jsf:ajax4jsf:1.1.0-SNAPSHOT: checking for updates from maven2-snapshots.ajax4jsf.org
-[INFO] snapshot org.ajax4jsf:test:1.1.0-SNAPSHOT: checking for updates from maven2-snapshots.ajax4jsf.org
-[INFO] snapshot org.richfaces:drag-drop:3.0.0-SNAPSHOT: checking for updates from maven2-snapshots.ajax4jsf.org
-[INFO] [compiler:compile]
-Compiling 47 source files to C:\projects\exadel\RichFaces3\ezfaces\richfaces\tree\target\classes
-[INFO] snapshot org.ajax4jsf.cdk:generator:1.1.0-SNAPSHOT: checking for updates from maven2-snapshots.ajax4jsf.org
-[INFO] snapshot org.ajax4jsf.cdk:compiler:1.1.0-SNAPSHOT: checking for updates from maven2-snapshots.ajax4jsf.org
-[INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
-[INFO] Setting property: velocimacro.messages.on => 'false'.
-[INFO] Setting property: resource.loader => 'classpath'.
-[INFO] Setting property: resource.manager.logwhenfound => 'false'.
-[INFO] **************************************************************
-[INFO] Starting Jakarta Velocity v1.4
-[INFO] RuntimeInstance initializing.
-[INFO] Default Properties File: org\apache\velocity\runtime\defaults\velocity.properties
-[INFO] Default ResourceManager initializing. (class org.apache.velocity.runtime.resource.ResourceManagerImpl)
-[INFO] Resource Loader Instantiated: org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader
-[INFO] ClasspathResourceLoader : initialization starting.
-[INFO] ClasspathResourceLoader : initialization complete.
-[INFO] ResourceCache : initialized. (class org.apache.velocity.runtime.resource.ResourceCacheImpl)
-[INFO] Default ResourceManager initialization complete.
-[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Literal
-[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Macro
-[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Parse
-[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Include
-[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Foreach
-[INFO] Created: 20 parsers.
-[INFO] Velocimacro : initialization starting.
-[INFO] Velocimacro : adding VMs from VM library template : VM_global_library.vm
-[ERROR] ResourceManager : unable to find resource 'VM_global_library.vm' in any resource loader.
-[INFO] Velocimacro : error using VM library template VM_global_library.vm : org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource 'VM_global_library.vm'
-[INFO] Velocimacro : VM library template macro registration complete.
-[INFO] Velocimacro : allowInline = true : VMs can be defined inline in templates
-[INFO] Velocimacro : allowInlineToOverride = false : VMs defined inline may NOT replace previous VM definitions
-[INFO] Velocimacro : allowInlineLocal = false : VMs defined inline will be global in scope if allowed.
-[INFO] Velocimacro : initialization complete.
-[INFO] Velocity successfully started.
-[INFO] [cdk:generate {execution: default}]
-[INFO] Parse config file C:\projects\exadel\RichFaces3\ezfaces\richfaces\tree\src\main\config\component\tree.xml
-[INFO] Parse config file C:\projects\exadel\RichFaces3\ezfaces\richfaces\tree\src\main\config\component\treeNode.xml
-[INFO] Create class file org.richfaces.component.html.HtmlTree
-[INFO] Create class file org.richfaces.component.html.HtmlTreeNode
-Error load class: org.richfaces.component.html.HtmlTree
-loading class: org.ajax4jsf.templatecompiler.elements.vcp.HeaderStylesElement
-loading class: org.ajax4jsf.templatecompiler.elements.vcp.HeaderScriptsElement
-loading class: org.ajax4jsf.templatecompiler.elements.vcp.FClientIDTemplateElement
-class : org.richfaces.component.UITree
- method : getClientId
- paramTypes : [class javax.faces.context.FacesContext]
-Method found, return type : java.lang.String
-loading class: org.ajax4jsf.templatecompiler.elements.jsp.Scriptlet
-loading class: org.ajax4jsf.templatecompiler.elements.html.HTMLElement
-Object: org.richfaces.component.UITree, property: attributes
-propertyObject: java.util.Map
-Object: org.richfaces.component.UITree, property: attributes
-propertyObject: java.util.Map
-loading class: org.ajax4jsf.templatecompiler.elements.vcp.FCallTemplateElement
-[]
-Try to load class : org.richfaces.renderkit.TreeRendererBase
-class : org.richfaces.renderkit.TreeRendererBase
- method : writeNamespace
- paramTypes : [class javax.faces.context.FacesContext]
-Method not found
-class : org.richfaces.renderkit.TreeRendererBase
- method : writeNamespace
- paramTypes : [class javax.faces.context.FacesContext, class org.richfaces.component.UITree]
-Method found, return type : void
-writeNamespace(context, component)
-loading class: org.ajax4jsf.templatecompiler.elements.html.HTMLElement
-loading class: org.ajax4jsf.templatecompiler.elements.html.HTMLElement
-loading class: org.ajax4jsf.templatecompiler.elements.vcp.VcpBodyTemplateElement
-loading class: org.ajax4jsf.templatecompiler.elements.vcp.FCallTemplateElement
-[]
-Try to load class : org.richfaces.renderkit.TreeRendererBase
-class : org.richfaces.renderkit.TreeRendererBase
- method : encodeSelectionStateInput
- paramTypes : [class javax.faces.context.FacesContext]
-Method not found
-class : org.richfaces.renderkit.TreeRendererBase
- method : encodeSelectionStateInput
- paramTypes : [class javax.faces.context.FacesContext, class org.richfaces.component.UITree]
-Method found, return type : java.lang.String
-encodeSelectionStateInput(context, component)
-loading class: org.ajax4jsf.templatecompiler.elements.vcp.FClientIDTemplateElement
-class : org.richfaces.component.UITree
- method : getClientId
- paramTypes : [class javax.faces.context.FacesContext]
-Method found, return type : java.lang.String
-loading class: org.ajax4jsf.templatecompiler.elements.html.HTMLElement
-loading class: org.ajax4jsf.templatecompiler.elements.html.HTMLElement
-loading class: org.ajax4jsf.templatecompiler.elements.html.HTMLElement
-Processing function : this
-Processing function : getJavaScriptVarName
-Processing function : this:getJavaScriptVarName
-Object: org.richfaces.component.UITree, property: switchType
-propertyObject: java.lang.String
-Object: org.richfaces.component.UITree, property: attributes
-propertyObject: java.util.Map
-Object: org.richfaces.component.UITree, property: attributes
-propertyObject: java.util.Map
-Object: org.richfaces.component.UITree, property: attributes
-propertyObject: java.util.Map
-Processing function : this
-Processing function : getAjaxScript
-Processing function : this:getAjaxScript
-Processing function : this
-Processing function : getDragIndicatorId
-Processing function : this:getDragIndicatorId
-Processing function : this
-Processing function : getScriptContributions
-Processing function : this:getScriptContributions
-Error load class: org.richfaces.component.html.HtmlTreeNode
-loading class: org.ajax4jsf.templatecompiler.elements.jsp.DirectivePage
-loading class: org.ajax4jsf.templatecompiler.elements.std.SetTemplateElement
-Processing function : this
-Processing function : getParentClientId
-Processing function : this:getParentClientId
-loading class: org.ajax4jsf.templatecompiler.elements.vcp.FResourceTemplateElement
-loading class: org.ajax4jsf.templatecompiler.elements.vcp.FResourceTemplateElement
-loading class: org.ajax4jsf.templatecompiler.elements.vcp.FResourceTemplateElement
-loading class: org.ajax4jsf.templatecompiler.elements.vcp.FResourceTemplateElement
-loading class: org.ajax4jsf.templatecompiler.elements.vcp.FResourceTemplateElement
-loading class: org.ajax4jsf.templatecompiler.elements.vcp.FCallTemplateElement
-[]
-Try to load class : org.richfaces.renderkit.NodeRendererBase
-class : org.richfaces.renderkit.NodeRendererBase
- method : initializeLines
- paramTypes : [class javax.faces.context.FacesContext]
-Method not found
-class : org.richfaces.renderkit.NodeRendererBase
- method : initializeLines
- paramTypes : [class javax.faces.context.FacesContext, class org.richfaces.component.UITreeNode]
-Method found, return type : void
-initializeLines(context, component)
-loading class: org.ajax4jsf.templatecompiler.elements.vcp.FCallTemplateElement
-[]
-Try to load class : org.richfaces.renderkit.NodeRendererBase
-class : org.richfaces.renderkit.NodeRendererBase
- method : initializeResources
- paramTypes : [class javax.faces.context.FacesContext]
-Method not found
-class : org.richfaces.renderkit.NodeRendererBase
- method : initializeResources
- paramTypes : [class javax.faces.context.FacesContext, class org.richfaces.component.UITreeNode]
-Method found, return type : void
-initializeResources(context, component)
-loading class: org.ajax4jsf.templatecompiler.elements.html.HTMLElement
-loading class: org.ajax4jsf.templatecompiler.elements.html.HTMLElement
-loading class: org.ajax4jsf.templatecompiler.elements.jsp.Scriptlet
-loading class: org.ajax4jsf.templatecompiler.elements.html.HTMLElement
-loading class: org.ajax4jsf.templatecompiler.elements.jsp.Scriptlet
-loading class: org.ajax4jsf.templatecompiler.elements.html.HTMLElement
-Processing function : this
-Processing function : getToggleScript
-Processing function : this:getToggleScript
-loading class: org.ajax4jsf.templatecompiler.elements.jsp.Scriptlet
-loading class: org.ajax4jsf.templatecompiler.elements.html.HTMLElement
-loading class: org.ajax4jsf.templatecompiler.elements.html.HTMLElement
-loading class: org.ajax4jsf.templatecompiler.elements.jsp.Scriptlet
-loading class: org.ajax4jsf.templatecompiler.elements.html.HTMLElement
-loading class: org.ajax4jsf.templatecompiler.elements.html.HTMLElement
-loading class: org.ajax4jsf.templatecompiler.elements.jsp.Scriptlet
-loading class: org.ajax4jsf.templatecompiler.elements.jsp.Scriptlet
-loading class: org.ajax4jsf.templatecompiler.elements.html.HTMLElement
-Object: org.richfaces.component.UITreeNode, property: attributes
-propertyObject: java.util.Map
-Processing function : this
-Processing function : getAjaxSelectedListenerFlag
-Processing function : this:getAjaxSelectedListenerFlag
-Processing function : this
-Processing function : getDraggableScriptOptions
-Processing function : this:getDraggableScriptOptions
-Processing function : this
-Processing function : getDragType
-Processing function : this:getDragType
-Processing function : this
-Processing function : getDropzoneScriptOptions
-Processing function : this:getDropzoneScriptOptions
-Object: org.richfaces.component.UITreeNode, property: attributes
-propertyObject: java.util.Map
-loading class: org.ajax4jsf.templatecompiler.elements.jsp.Scriptlet
-loading class: org.ajax4jsf.templatecompiler.elements.html.HTMLElement
-loading class: org.ajax4jsf.templatecompiler.elements.jsp.Scriptlet
-loading class: org.ajax4jsf.templatecompiler.elements.html.HTMLElement
-loading class: org.ajax4jsf.templatecompiler.elements.jsp.Scriptlet
-loading class: org.ajax4jsf.templatecompiler.elements.html.HTMLElement
-loading class: org.ajax4jsf.templatecompiler.elements.vcp.VcpBodyTemplateElement
-[INFO] Create tag class file org.richfaces.component.html.HtmlTree
-[INFO] Create tag class file org.richfaces.component.html.HtmlTreeNode
-[INFO] Component org.richfaces.Tree included to taglib tree
-[INFO] Component org.richfaces.TreeNode included to taglib tree
-[INFO] Component org.richfaces.Tree included to taglib tree
-[INFO] Component org.richfaces.TreeNode included to taglib tree
-[INFO] [resources:resources]
-[INFO] Using default encoding to copy filtered resources.
-[INFO] [compiler:compile]
-Compiling 10 source files to C:\projects\exadel\RichFaces3\ezfaces\richfaces\tree\target\classes
-[INFO] [resources:testResources]
-[INFO] Using default encoding to copy filtered resources.
-[INFO] [compiler:testCompile]
-Compiling 1 source file to C:\projects\exadel\RichFaces3\ezfaces\richfaces\tree\target\test-classes
-[INFO] [surefire:test]
-[INFO] Surefire report directory: C:\projects\exadel\RichFaces3\ezfaces\richfaces\tree\target\surefire-reports
-
--------------------------------------------------------
- T E S T S
--------------------------------------------------------
-Running org.richfaces.component.JSFComponentTest
-Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.031 sec
-
-Results :
-Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
-
-[INFO] [jar:jar]
-[INFO] Building jar: C:\projects\exadel\RichFaces3\ezfaces\richfaces\tree\target\tree-3.0.0-SNAPSHOT.jar
-[INFO] Preparing source:jar
-[WARNING] Removing: generate from forked lifecycle, to prevent recursive invocation.
-[WARNING] Removing: jar from forked lifecycle, to prevent recursive invocation.
-[INFO] No goals needed for project - skipping
-[INFO] [source:jar {execution: attach-source}]
-[INFO] Building jar: C:\projects\exadel\RichFaces3\ezfaces\richfaces\tree\target\tree-3.0.0-SNAPSHOT-sources.jar
-[INFO] [install:install]
-[INFO] Installing C:\projects\exadel\RichFaces3\ezfaces\richfaces\tree\target\tree-3.0.0-SNAPSHOT.jar to C:\Documents and Settings\Andrey\.m2\repository\org\richfaces\tree\3.0.0-SNAPSHOT\tree-3.0.0-SNAPSHOT.jar
-[INFO] Installing C:\projects\exadel\RichFaces3\ezfaces\richfaces\tree\target\tree-3.0.0-SNAPSHOT-sources.jar to C:\Documents and Settings\Andrey\.m2\repository\org\richfaces\tree\3.0.0-SNAPSHOT\tree-3.0.0-SNAPSHOT-sources.jar
-[INFO] ------------------------------------------------------------------------
-[INFO] BUILD SUCCESSFUL
-[INFO] ------------------------------------------------------------------------
-[INFO] Total time: 35 seconds
-[INFO] Finished at: Fri Feb 16 18:07:13 EET 2007
-[INFO] Final Memory: 14M/28M
-[INFO] ------------------------------------------------------------------------
Property changes on: trunk/richfaces-samples
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: trunk/richfaces-samples/dataFilterSliderDemo
___________________________________________________________________
Name: svn:ignore
- target
+ target
.settings
.classpath
.project
Property changes on: trunk/richfaces-samples/dataTableDemo
___________________________________________________________________
Name: svn:ignore
- target
+ target
.settings
.classpath
.project
Property changes on: trunk/richfaces-samples/datascroller-sample
___________________________________________________________________
Name: svn:ignore
- target
+ target
.settings
.classpath
.project
Property changes on: trunk/richfaces-samples/dragDropDemo
___________________________________________________________________
Name: svn:ignore
- target
+ target
.settings
.classpath
.project
Property changes on: trunk/richfaces-samples/gmap-sample
___________________________________________________________________
Name: svn:ignore
- target
+ target
.settings
.classpath
.project
Property changes on: trunk/richfaces-samples/inputNumberSliderDemo
___________________________________________________________________
Name: svn:ignore
- target
+ target
.settings
.classpath
.project
Property changes on: trunk/richfaces-samples/inputNumberSpinnerDemo
___________________________________________________________________
Name: svn:ignore
- target
+ target
.settings
.classpath
.project
Property changes on: trunk/richfaces-samples/modalpanel-sample
___________________________________________________________________
Name: svn:ignore
- target
+ target
.settings
.classpath
.project
Property changes on: trunk/richfaces-samples/panel-sample
___________________________________________________________________
Name: svn:ignore
- target
+ target
.settings
.classpath
.project
Property changes on: trunk/richfaces-samples/panelbar-sample
___________________________________________________________________
Name: svn:ignore
- target
+ target
.settings
.classpath
.project
Property changes on: trunk/richfaces-samples/simpleTogglePanel-sample
___________________________________________________________________
Name: svn:ignore
- target
+ target
.settings
.classpath
.project
Property changes on: trunk/richfaces-samples/skins
___________________________________________________________________
Name: svn:ignore
- target
+ target
.settings
.classpath
.project
Property changes on: trunk/richfaces-samples/suggestionbox-sample
___________________________________________________________________
Name: svn:ignore
- target
+ target
.settings
.classpath
.project
Property changes on: trunk/richfaces-samples/tabPanelDemo
___________________________________________________________________
Name: svn:ignore
- target
+ target
.settings
.classpath
.project
Property changes on: trunk/richfaces-samples/togglePanel-sample
___________________________________________________________________
Name: svn:ignore
- target
+ target
.settings
.classpath
.project
Property changes on: trunk/richfaces-samples/toolBarDemo
___________________________________________________________________
Name: svn:ignore
- target
+ target
.settings
.classpath
.project
Property changes on: trunk/richfaces-samples/tree-demo
___________________________________________________________________
Name: svn:ignore
- target
+ target
.settings
.classpath
.project
17 years, 2 months
JBoss Rich Faces SVN: r35 - in trunk: richfaces/tree/src/main/java/org/richfaces/component/xml and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-03-07 12:31:02 -0500 (Wed, 07 Mar 2007)
New Revision: 35
Modified:
trunk/richfaces-samples/tree-demo/src/main/java/org/richfaces/Bean.java
trunk/richfaces-samples/tree-demo/src/main/resources/org/richfaces/test.xml
trunk/richfaces/tree/src/main/java/org/richfaces/component/ListRowKey.java
trunk/richfaces/tree/src/main/java/org/richfaces/component/TreeRowKey.java
trunk/richfaces/tree/src/main/java/org/richfaces/component/xml/XmlTreeDataBuilder.java
Log:
Colons escaping in Tree row keys implemented
Modified: trunk/richfaces/tree/src/main/java/org/richfaces/component/ListRowKey.java
===================================================================
--- trunk/richfaces/tree/src/main/java/org/richfaces/component/ListRowKey.java 2007-03-07 15:48:00 UTC (rev 34)
+++ trunk/richfaces/tree/src/main/java/org/richfaces/component/ListRowKey.java 2007-03-07 17:31:02 UTC (rev 35)
@@ -79,7 +79,7 @@
int oldIdx = 0;
do {
- idx = trimmedPath.indexOf(AbstractTreeDataModel.SEPARATOR, oldIdx);
+ idx = trimmedPath.indexOf(ESCAPED_SEPARATOR_CHAR_STRING, oldIdx);
String subData;
@@ -91,10 +91,11 @@
subData = subData.trim();
if (subData.length() != 0) {
- result.add(subData);
+ //unescape
+ result.add(subData.replace(ESCAPED_ESCAPE_CHAR_STRING, ESCAPE_CHAR_STRING));
}
- oldIdx = idx + 1;
+ oldIdx = idx + ESCAPED_SEPARATOR_CHAR_STRING.length();
} while (idx != -1);
return result;
@@ -189,7 +190,22 @@
boolean hasNext = iterator.hasNext();
while (hasNext) {
- result.append(iterator.next());
+ 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) {
Modified: trunk/richfaces/tree/src/main/java/org/richfaces/component/TreeRowKey.java
===================================================================
--- trunk/richfaces/tree/src/main/java/org/richfaces/component/TreeRowKey.java 2007-03-07 15:48:00 UTC (rev 34)
+++ trunk/richfaces/tree/src/main/java/org/richfaces/component/TreeRowKey.java 2007-03-07 17:31:02 UTC (rev 35)
@@ -30,6 +30,17 @@
* Base abstract clas for all tree row keys
*/
public abstract class TreeRowKey implements Serializable {
+
+ public static final char SEPARATOR_ESCAPE_CHAR = '-';
+
+ //that is to escape colons in path by preceding with "-"
+ //colon is SEPARATOR_CHAR
+ protected static final String ESCAPE_CHAR_STRING = String.valueOf(SEPARATOR_ESCAPE_CHAR);
+ protected static final String ESCAPED_ESCAPE_CHAR_STRING = ESCAPE_CHAR_STRING + ESCAPE_CHAR_STRING;
+
+ protected static final String SEPARATOR_CHAR_STRING = String.valueOf(AbstractTreeDataModel.SEPARATOR);
+ protected static final String ESCAPED_SEPARATOR_CHAR_STRING = ESCAPE_CHAR_STRING + SEPARATOR_CHAR_STRING;
+
/**
* getter for key depth
* @return key depth
@@ -63,7 +74,7 @@
return false;
}
- return (rowKey.getPath() + AbstractTreeDataModel.SEPARATOR).startsWith(getPath());
+ return (rowKey.getPath() + ESCAPED_SEPARATOR_CHAR_STRING).startsWith(getPath());
}
/**
Modified: trunk/richfaces/tree/src/main/java/org/richfaces/component/xml/XmlTreeDataBuilder.java
===================================================================
--- trunk/richfaces/tree/src/main/java/org/richfaces/component/xml/XmlTreeDataBuilder.java 2007-03-07 15:48:00 UTC (rev 34)
+++ trunk/richfaces/tree/src/main/java/org/richfaces/component/xml/XmlTreeDataBuilder.java 2007-03-07 17:31:02 UTC (rev 35)
@@ -79,11 +79,19 @@
if (id == null || id.length() == 0) {
int currentId = 0;
- if (idsList.size() == level) {
+ if (idsList.size() <= level) {
+ for (int i = idsList.size(); i < level; i++) {
+ idsList.add(null);
+ }
+
idsList.add(new Integer(0));
} else {
Integer integer = (Integer) idsList.get(level);
- currentId = integer.intValue() + 1;
+ if (integer != null) {
+ currentId = integer.intValue() + 1;
+ } else {
+ //zero currentId is ok
+ }
}
Set exclusions = (Set) exclusionSets.get(level);
@@ -92,9 +100,7 @@
currentId++;
}
- if (currentId != 0) {
- idsList.set(level, new Integer(currentId));
- }
+ idsList.set(level, new Integer(currentId));
id = Integer.toString(currentId);
} else {
Modified: trunk/richfaces-samples/tree-demo/src/main/java/org/richfaces/Bean.java
===================================================================
--- trunk/richfaces-samples/tree-demo/src/main/java/org/richfaces/Bean.java 2007-03-07 15:48:00 UTC (rev 34)
+++ trunk/richfaces-samples/tree-demo/src/main/java/org/richfaces/Bean.java 2007-03-07 17:31:02 UTC (rev 35)
@@ -167,11 +167,13 @@
private void initData() {
selectedNodeChildren.clear();
- Iterator iter = selectedNode.getChildren();
- int i = 0;
- while (iter.hasNext()) {
- Map.Entry entry = (Map.Entry) iter.next();
- selectedNodeChildren.put(((TreeNode)entry.getValue()).getData(), Integer.toString(i++));
+ if (selectedNode != null) {
+ Iterator iter = selectedNode.getChildren();
+ int i = 0;
+ while (iter.hasNext()) {
+ Map.Entry entry = (Map.Entry) iter.next();
+ selectedNodeChildren.put(((TreeNode)entry.getValue()).getData(), Integer.toString(i++));
+ }
}
}
Modified: trunk/richfaces-samples/tree-demo/src/main/resources/org/richfaces/test.xml
===================================================================
--- trunk/richfaces-samples/tree-demo/src/main/resources/org/richfaces/test.xml 2007-03-07 15:48:00 UTC (rev 34)
+++ trunk/richfaces-samples/tree-demo/src/main/resources/org/richfaces/test.xml 2007-03-07 17:31:02 UTC (rev 35)
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<web-app version="2.4">
+<web-app version="2.4" id="webApp:id">
<description>Tree demo</description>
<display-name>tree-demo</display-name>
<context-param>
17 years, 2 months
JBoss Rich Faces SVN: r34 - trunk/richfaces/datascroller/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: d.bulahov
Date: 2007-03-07 10:48:00 -0500 (Wed, 07 Mar 2007)
New Revision: 34
Modified:
trunk/richfaces/datascroller/src/main/java/org/richfaces/component/UIDatascroller.java
Log:
Code Review
Modified: trunk/richfaces/datascroller/src/main/java/org/richfaces/component/UIDatascroller.java
===================================================================
--- trunk/richfaces/datascroller/src/main/java/org/richfaces/component/UIDatascroller.java 2007-03-07 12:50:41 UTC (rev 33)
+++ trunk/richfaces/datascroller/src/main/java/org/richfaces/component/UIDatascroller.java 2007-03-07 15:48:00 UTC (rev 34)
@@ -358,13 +358,13 @@
* @return int
*/
public int getRowCount() {
- //TODO nick -> alex - scrollable models can return -1 here
+ //xxx nick -> alex - scrollable models can return -1 here
//let's implement "dychotomic" discovery
// setPage(1)... if isPageAvailable() setPage(2) then 4, 8, etc.
// setPage() { setRowIndex(pageIdx * rows); }
// isPageAvailable() { return isRowAvailable() }
- return getUIData().getRowCount();
- //return BinarySearch(getUIData());
+ //return getUIData().getRowCount();
+ return BinarySearch(getUIData());
}
@@ -373,7 +373,7 @@
int n=1;
int k=2;
for (;;){
- Data.setRows(k-1);
+ Data.setRowIndex(k-1);
if (Data.isRowAvailable()){
n=k;
k=k*2;
@@ -384,10 +384,9 @@
}
- while (n < k) {
- //int kk = (int)Math.round((n + k)/ 2 + 0.5) - 1;
- int kk = (int)Math.round((n + k)/ 2);
- Data.setRows(kk-1);
+ while (n < k) {
+ int kk = (int)Math.round((n + k)/ 2)+1;
+ Data.setRowIndex(kk-1);
if (Data.isRowAvailable()){
n = kk;
}
@@ -397,7 +396,7 @@
}
- Data.setRows(k-1);
+ Data.setRowIndex(k-1);
if (Data.isRowAvailable()){
return k;
}
17 years, 2 months
JBoss Rich Faces SVN: r33 - trunk/richfaces/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script.
by richfaces-svn-commits@lists.jboss.org
Author: F.antonov
Date: 2007-03-07 07:50:41 -0500 (Wed, 07 Mar 2007)
New Revision: 33
Modified:
trunk/richfaces/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js
Log:
Fix for bug RFA-188.
Modified: trunk/richfaces/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js
===================================================================
--- trunk/richfaces/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js 2007-03-07 11:11:59 UTC (rev 32)
+++ trunk/richfaces/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js 2007-03-07 12:50:41 UTC (rev 33)
@@ -1,11 +1,12 @@
if(!Exadel) var Exadel = {};
Exadel.Slider = Class.create();
Exadel.Slider.prototype = {
- initialize: function(handle, track, tip, input, options) {
+ initialize: function(handle, track, tip, table, options) {
var slider = this;
this.handle = $( handle );
this.tip = $( tip );
this.track = $( track );
+ this.mainTable = $( table );
this.input = $( options.inputId ) || document.getElementsByName(options.inputId)[0];
this.options= options || {};
@@ -52,7 +53,8 @@
if(!this.options.disabled){
this.documentBodyOload = this.load.bindAsEventListener(this);
- this.eventMouseUp = this.endDrag.bindAsEventListener(this);
+ //this.eventMouseUp = this.endDrag.bindAsEventListener(this);
+ this.eventMouseUp = this.processMouseUp.bindAsEventListener(this);
this.eventMouseMove = this.update.bindAsEventListener(this);
this.eventMouseDown = this.startDrag.bindAsEventListener(this);
this.eventEditFocus = this.editFocus.bindAsEventListener(this);
@@ -206,6 +208,7 @@
window.document.onmouseup = this.eventMouseUp.bindAsEventListener(this);
window.document.onmousemove = this.eventMouseMove.bindAsEventListener(this);
this.editBlur();
+ this.prevMouseDownEvent = event;
if(Event.isLeftClick(event)) {
if(!this.disabled){
@@ -240,6 +243,11 @@
pointer -= this.offsetX + offsets[0];
this.setValue(this.translateToValue( pointer ));
},
+
+ processMouseUp: function(event) {
+ this.endDrag(event);
+ this.fireClickIfNeeded(event);
+ },
endDrag: function(event) {
window.document.onmouseup = this.prevMouseUp;
@@ -260,6 +268,22 @@
if (RichFaces.navigatorType() != "MSIE")
this.fireEditEvent("change");
},
+
+ fireClickIfNeeded: function(event){
+ if (this.prevMouseDownEvent.target != event.target &&
+ //this.prevMouseDownEvent.screenX == event.clientX &&
+ //this.prevMouseDownEvent.screenY == event.clientY &&
+ RichFaces.navigatorType() != "MSIE") {
+ if( document.createEvent ) {
+ var evObj = document.createEvent("MouseEvents");
+ evObj.initEvent( "click", true, false );
+ //evObj.initMouseEvent("click", true, false, window,
+ // event.detail, event.screenX, event.screenY, event.clientX, event.clientY,
+ // event.ctrlKey, event.altKey, event.shiftKey, event.metaKey, event.button, null);
+ this.mainTable.dispatchEvent(evObj);
+ }
+ }
+ },
isValueChanged : function(){
var ret =this.prevValue != this.value
17 years, 2 months
JBoss Rich Faces SVN: r32 - trunk/richfaces/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: a.izobov
Date: 2007-03-07 06:11:59 -0500 (Wed, 07 Mar 2007)
New Revision: 32
Modified:
trunk/richfaces/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
Log:
RFA-289 and RFA-292 fixed
Modified: trunk/richfaces/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
===================================================================
--- trunk/richfaces/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2007-03-07 10:55:45 UTC (rev 31)
+++ trunk/richfaces/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2007-03-07 11:11:59 UTC (rev 32)
@@ -4,6 +4,7 @@
};
Suggestion.Base.prototype = {
baseInitialize: function(element, update, options) {
+ this.isOpera = (RichFaces.navigatorType() =="OPERA"?true:false);
this.element = $(element);
this.update = $(update);
this.hasFocus = false;
@@ -70,15 +71,67 @@
this.onKeyPressListener = this.onKeyPress.bindAsEventListener(this);
Event.observe(this.element, "keypress", this.onKeyPressListener);
+
+ if (this.isOpera) {
+ this.onKeyUpListener = this.onKeyUp.bindAsEventListener(this);
+ Event.observe(this.element, "keyup", this.onKeyUpListener);
+ this.upDown = 0;
+ }
},
+ onBoxKeyPress: function(event) {
+ if (this.upDown == 1) {
+ this.keyEvent = true;
+ this.markPrevious();
+ this.render();
+ } else if (this.upDown == 2) {
+ this.keyEvent = true;
+ this.markNext();
+ this.render();
+ }
+ },
+
+ cancelSubmit: function(event) {
+ Event.stop(event);
+ },
+
+ disableSubmit: function() {
+ if (this.isOpera) {
+ var el = this.element;
+ while (el.parentNode && (!el.tagName || (el.tagName.toUpperCase() != 'FORM')))
+ el = el.parentNode;
+ if (el.tagName && (el.tagName.toUpperCase() == 'FORM')) {
+ this.parentForm = el;
+ this.onSubmitListener = this.cancelSubmit.bindAsEventListener(this);
+ Event.observe(el, "submit", this.onSubmitListener);
+ }
+ }
+ },
+
+ enableSubmit: function() {
+ if (this.isOpera) {
+ if (this.parentForm) {
+ Event.stopObserving(this.parentForm, "submit", this.onSubmitListener);
+ }
+ }
+ },
+
+ onKeyUp: function(event) {
+ if (this.upDown > 0) {
+ this.element.onkeypress=this.prevOnKeyPress;
+ }
+ this.upDown = 0;
+ },
+
show: function() {
if (Element.getStyle(this.update, 'display') == 'none') this.options.onShow(this.element, this.update, this.options);
+ this.disableSubmit();
},
hide: function() {
this.stopIndicator();
if (Element.getStyle(this.update, 'display') != 'none') this.options.onHide(this.element, this.update, this.options);
+ this.enableSubmit();
},
startIndicator: function() {
@@ -135,12 +188,22 @@
this.markPrevious();
this.render();
if (navigator.appVersion.indexOf('AppleWebKit') > 0) Event.stop(event);
+ if (this.isOpera) {
+ this.upDown = 1;
+ this.prevOnKeyPress = this.element.onkeypress;
+ this.element.onkeypress = this.onBoxKeyPress.bindAsEventListener(this);
+ }
return;
case Event.KEY_DOWN:
this.keyEvent = true;
this.markNext();
this.render();
if (navigator.appVersion.indexOf('AppleWebKit') > 0) Event.stop(event);
+ if (this.isOpera) {
+ this.upDown = 2;
+ this.prevOnKeyPress = this.element.onkeypress;
+ this.element.onkeypress = this.onBoxKeyPress.bindAsEventListener(this);
+ }
return;
}
else
17 years, 2 months
JBoss Rich Faces SVN: r31 - trunk/richfaces/common/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: d.bulahov
Date: 2007-03-07 05:55:45 -0500 (Wed, 07 Mar 2007)
New Revision: 31
Modified:
trunk/richfaces/common/src/main/java/org/richfaces/component/UISwitchablePanel.java
Log:
RFA-232 fixed
Modified: trunk/richfaces/common/src/main/java/org/richfaces/component/UISwitchablePanel.java
===================================================================
--- trunk/richfaces/common/src/main/java/org/richfaces/component/UISwitchablePanel.java 2007-03-07 10:47:22 UTC (rev 30)
+++ trunk/richfaces/common/src/main/java/org/richfaces/component/UISwitchablePanel.java 2007-03-07 10:55:45 UTC (rev 31)
@@ -120,7 +120,7 @@
setValue(newValue);
}
- if (AjaxRendererUtils.isAjaxRequest(facesContext)) {
+ if (AjaxRendererUtils.isAjaxRequest(facesContext) && this.getSwitchType().equals(AJAX_METHOD)) {
AjaxRendererUtils.addRegionByName(facesContext,
this,
this.getId());
17 years, 2 months
JBoss Rich Faces SVN: r30 - trunk/richfaces/simpleTogglePanel/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: d.bulahov
Date: 2007-03-07 05:47:22 -0500 (Wed, 07 Mar 2007)
New Revision: 30
Modified:
trunk/richfaces/simpleTogglePanel/src/main/java/org/richfaces/component/UISimpleTogglePanel.java
Log:
Modified: trunk/richfaces/simpleTogglePanel/src/main/java/org/richfaces/component/UISimpleTogglePanel.java
===================================================================
--- trunk/richfaces/simpleTogglePanel/src/main/java/org/richfaces/component/UISimpleTogglePanel.java 2007-03-07 10:42:02 UTC (rev 29)
+++ trunk/richfaces/simpleTogglePanel/src/main/java/org/richfaces/component/UISimpleTogglePanel.java 2007-03-07 10:47:22 UTC (rev 30)
@@ -65,7 +65,7 @@
public void broadcast(FacesEvent facesEvent) throws AbortProcessingException {
FacesContext facesContext = FacesContext.getCurrentInstance();
- if (AjaxRendererUtils.isAjaxRequest(facesContext)) {
+ if (AjaxRendererUtils.isAjaxRequest(facesContext) && this.getSwitchType().equals(AJAX_SWITCH_TYPE)) {
AjaxRendererUtils.addRegionByName(facesContext,
this,
this.getId());
17 years, 2 months
JBoss Rich Faces SVN: r29 - trunk/richfaces/togglePanel/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: d.bulahov
Date: 2007-03-07 05:42:02 -0500 (Wed, 07 Mar 2007)
New Revision: 29
Modified:
trunk/richfaces/togglePanel/src/main/java/org/richfaces/component/UIToggleControl.java
Log:
make todo
Modified: trunk/richfaces/togglePanel/src/main/java/org/richfaces/component/UIToggleControl.java
===================================================================
--- trunk/richfaces/togglePanel/src/main/java/org/richfaces/component/UIToggleControl.java 2007-03-07 10:27:57 UTC (rev 28)
+++ trunk/richfaces/togglePanel/src/main/java/org/richfaces/component/UIToggleControl.java 2007-03-07 10:42:02 UTC (rev 29)
@@ -105,15 +105,15 @@
return getPanelId();
}
- //TODO by nick - denis - what do you think about setupReRender usage?
- protected void setupReRender() {
+ //xxx by nick - denis - what do you think about setupReRender usage?
+/* protected void setupReRender() {
super.setupReRender();
FacesContext context = FacesContext.getCurrentInstance();
UITogglePanel togglePanel = getPanel();
AjaxRendererUtils.addRegionByName(context, togglePanel, togglePanel.getId());
}
-
+*/
public void setReRender(Object targetId) {
}
17 years, 2 months