Ticket #5229 (new enhancement)

Opened 8 months ago

Last modified 5 months ago

Support for alternate URL argument formatting

Reported by: guest Owned by: anonymous
Priority: normal Milestone: 1.3
Component: General Version: 1.0
Severity: normal Keywords:
Cc: mbowie@…

Description

Currently, the content object passed to xhr[Get|Post] is formatted using ?'s, &'s and ='s, which is generally groovy.

However, in the case of a site which implements MVC style URL's, this isn't very friendly.

Rather than "?param1=value1&param2=value2", it would be useful to be able to have /'s used for each separator, ala "/param1/value1/param2/value2".

My particular case revolves around the use of dojox.data.QueryReadStore, but I think that providing the solution at that level is really only a short-term solution.

I'm surprised this hasn't come up before... but I guess the fact that it hasn't may mean I'm a genuine minority. I do realize that this functionality can be implemented by simply eliminating the content argument and generating the full URL by hand, but I can't help but feel that that is a hackish solution.

Change History

  Changed 5 months ago by dylan

  • milestone set to 1.3

follow-up: ↓ 3   Changed 5 months ago by wolfram

What you are mentioning here is actually pretty easy to do by extending the QueryReadStore?-class and customizing the URL to be used. See http://archive.dojotoolkit.org/nightly/dojotoolkit/dojox/data/demos/demo_QueryReadStore.js and the examples http://archive.dojotoolkit.org/nightly/dojotoolkit/dojox/data/demos/demo_QueryReadStore*.html you should see that extending the class "DojoDataSortable?" and customizing the store's URL instead of passing the query/serverQuery parameters in requestRow() would do this task.

in reply to: ↑ 2   Changed 5 months ago by guest

Replying to wolfram: Yeah, that is in fact what I did... I created a customized class for the QueryReadStore requests.

It just seems to me that it could be really easily done further up the tree, within the scope of the toolkit itself... I may well be mistaken, but that was certainly my thinking at the time.

Thanks for the suggestion.

  Changed 5 months ago by wolfram

In my opinion the customization of the url can be very extensive that I would see it as a separate thing. Though I would be interested in seeing what you built, if you can show it. May be there could be some kind of dojox.RequestBuilder? or alike, which could take care of something like that ... or may the RequestBuilder? is a stupid idea :-)

I would like to know other people's opinions.

wolfram

Note: See TracTickets for help on using tickets.