Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6971151
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:48:10+00:00 2026-05-27T16:48:10+00:00

So I’ve got a webapp that uses Dojo and Spring. I’ve got some grids

  • 0

So I’ve got a webapp that uses Dojo and Spring. I’ve got some grids in the app that are loaded using Json dojo stores. Things seem alright, but I’m now trying to implement sorting. According to this link dojo does not sort grids from Stores, instead it leaves that up to the server. Ok, I assume I can work with that, however I’m running into problems actually doing it.

To get data into my grids, I have them call a path which is caught by my controller. For example, to load my Job grid, dojo creats the store and calls /job/data. Here is my controller code for that:

@RequestMapping(value="/job/data", method=RequestMethod.GET,
        headers="Accept=application/json")
public @ResponseBody List<Job> getData() {
    return jobService.getAll();
}

I’m using the Jackson Json processor so this works well for returning the data formatted in Json. Dojo gets the data and displays it with no problems. When a user clicks on a column header to sort though, Dojo appends onto the path that is called creating something like this (when sorting on column programName for instance): /job/data?sort(+programName)

My problem is that while this code still calls the above method, I’m not sure how to gain access to this tacked on part. I tried using the @RequestParam parameter but that doesn’t work and infact stops the method from working altogether. Here is what I tried:

@RequestMapping(value="/job/data", method=RequestMethod.GET,
        headers="Accept=application/json")
public @ResponseBody List<Job> getData(@RequestParam("sort") String sort) {
    log.info("Not getting here anymore");
}

Anyone have any ideas? I’m wondering if part of the problem is that the tacked on part is not following the normal syntax of ?sort=something. Either way, as I said, adding @RequestParam doesn’t work anyway with this method. By that I mean that even if the method is just called as /job/data again with no tacked on parameters, I get an error. Please let me know if you need anyting more from me as this problem is for work and I could really use some insight. Thanks.

UPDATE

I did find a link after tons of searching that almost addresses this issue. But of course the Spring guy himself encounters my problem and his code doesn’t fix it. He does mention:

JsonStore sends its “sort” parameter in the form of “sort(+fieldName1,+fieldName2,-fieldName3,…)”, thus the entire thing becomes the parameter key. This is inconvenient to handle in Spring MVC as it requires dropping down to HttpServletRequest and iterating through parameter keys to find the one beginning with “sort”, as opposed to being able to use the @RequestParam handler argument annotation.

So would someone perhaps know how I would do that?

UPDATE 2

Anyone? I’m just asking if someone can point me in the right direction of how to implement the solution I already found. How do I access the HttpServletRequest object from a spring controller method so that I can gain access to the screwed up sort parameter that Dojo sends?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T16:48:10+00:00Added an answer on May 27, 2026 at 4:48 pm

    If you include HttpServletRequest request to the controller method (it gets automatically injected by spring MVC), you can access the different parameters in the following way:

    Set parameters = request.getParameterMap().keySet();
    for(Object param : parameters){
      //Here you can process the params to retrieve the names and ordering direction
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I've got a string that has curly quotes in it. I'd like to replace
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I am using Paperclip to handle profile photo uploads in my app. They upload
I have just tried to save a simple *.rtf file with some websites and
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a French site that I want to parse, but am running into
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.