Opened 14 years ago

Closed 13 years ago

Last modified 12 years ago

#552 closed defect (fixed)

TreeRPCController doCreateChild serializes too little

Reported by: henrik@… Owned by: ilia
Priority: high Milestone:
Component: Widgets Version: 0.2
Keywords: Cc:
Blocked By: Blocking:

Description

Svn version 3354

All remote calling methods of TreeRPCController send one parameter, the local params object serialized in json. However doCreateChild (by accident?) only serializes the data member of the params object, so four parameters get sent. For example the tree and parent parameter are currently seen by the server as the meaningless string [object Object]

Changes are below

Kind regards, Henrik Hjelte

diff:

hunk ./src/widget/TreeRPCController.js 140
-                               data: dojo.json.serialize(output)
+                               data: output
hunk ./src/widget/TreeRPCController.js 153
-                                       content: params
+                                       content: {data: dojo.json.serialize(params) }
+

New code:

	doCreateChild: function(parent, index, output, callFunc, callObj) {

			var params = {
				tree: this.getInfo(parent.tree),
				parent: this.getInfo(parent),
				index: index,
				data: output
			}

			dojo.io.bind({
					url: this.getRPCUrl('createChild'),
					/* I hitch to get this.loadOkHandler */
					load: dojo.lang.hitch(this, function(type, response) {
						// data is dead, new data is used
						this.doCreateChildProcessResponse(type, response, parent, index, callFunc, callObj) }
					),
					error: this.RPCErrorHandler,
					mimetype: "text/json",
					preventCache: true,
					content: {data: dojo.json.serialize(params) }

			});

	},

Change History (4)

comment:1 Changed 13 years ago by ilia

Status: newassigned

Applied, thanks

comment:2 Changed 13 years ago by ilia

Resolution: fixed
Status: assignedclosed

comment:3 Changed 13 years ago by anonymous

Milestone: 0.3release
Summary: TreeRPCController doCreateChild serializes to littleTreeRPCController doCreateChild serializes too little

comment:4 Changed 12 years ago by (none)

Milestone: 0.3release

Milestone 0.3release deleted

Note: See TracTickets for help on using tickets.