[TurboGears] Re: CheckBoxList widget and RemoteForm together doesn't work

2007-01-27 Thread Marco Mariani

Wei-Ren Chen wrote:
 Then I trace ajax.js and MochiKit.js, and discover that formContents()
 in MochiKit.js dose not support MultiSelectField. In MochiKit
 document ( http://mochikit.com/doc/html/MochiKit/index.html ) It is
 said
 v1.4 MochiKit.DOM.formContents now supports SELECT multiple tags ,
 unfortunately it is v1.3.1 in TurboGears.

[...]
 The modified ajax.js and MochiKit.js:
 http://orz.hopto.org/moin/BookShop?action=AttachFiledo=gettarget=MochiKit.js

 http://orz.hopto.org/moin/BookShop?action=AttachFiledo=gettarget=ajax.js
Indeed it works now, I was having the same problem.
The links above do not work at the moment, by the way.

I had already switched to MochiKit SVN, but ajax.js still needed to be fixed
And of course, a minor release should not depend on an unreleased
MochiKit so we would have a patched 1.3.1...

Yattom said maybe other changes are needed to RPC?

(the handling of form contents by mochikit was introduced in
http://trac.turbogears.org/changeset/1738)


/me goes to trac it



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
TurboGears group.
To post to this group, send email to turbogears@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~--~~~~--~~--~--~---



[TurboGears] Re: CheckBoxList widget and RemoteForm together doesn't work

2007-01-05 Thread Wei-Ren Chen



Yattom wrote:
The problem is in remoteFormRequest() in ajax.js.  The query string is
built by first,
ajax.js:
2var query = Array();
3var contents = formContents(form);
4for (var j=0; jcontents[0].length; j++)
5query[contents[0][j]] = contents[1][j];

Then use queryString(query) to create a query string.  On line 4 and
5, parameters with same name are overridden by the last (checked)
value.  I suspect MultipleSelectField won't work also.



I encounter the MultipleSelectField problem you speak of,
and the problem is still there after I apply your patch.

Then I trace ajax.js and MochiKit.js, and discover that formContents()
in MochiKit.js  dose not support MultiSelectField. In MochiKit
document ( http://mochikit.com/doc/html/MochiKit/index.html ) It is
said
v1.4 MochiKit.DOM.formContents now supports SELECT multiple tags ,
unfortunately it is v1.3.1 in TurboGears.

By copy formContents() in MochiKit.js v1.4 to v1.3.1 and modify
ajax.js,
MultipleSelectField works correctly in RemoteForm.

Finally, thanks to Yattom for show me the right direction of solving
the problem. ^_^

The modified ajax.js and MochiKit.js:
http://orz.hopto.org/moin/BookShop?action=AttachFiledo=gettarget=MochiKit.js
http://orz.hopto.org/moin/BookShop?action=AttachFiledo=gettarget=ajax.js


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
TurboGears group.
To post to this group, send email to turbogears@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~--~~~~--~~--~--~---