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 659155
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T23:00:47+00:00 2026-05-13T23:00:47+00:00

My Application currently serves requests for data, and can order the data to the

  • 0

My Application currently serves requests for data, and can order the data to the users requirements, using RequestParams

@RequestParam(value = "orderBy", required = false, defaultValue = "severity") String orderBy,
@RequestParam(value = "order", required = false, defaultValue = "desc") String order,

You get the idea.

However, I want to implement multi sorting, (ordering by severity, then matching severities are ordered by date). Code wise, this is easy (google-collections to the rescue), but how would I expose this to the user calling the service?

Ideally, I wouldn’t want multiple orderBy @RequestParams (orderBy2, orderBy3, orderBy4) , as that’s just plain ugly.

Thoughts?

Cheers

  • 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-13T23:00:47+00:00Added an answer on May 13, 2026 at 11:00 pm

    Usually you should be able to just turn your request param into an array like:

    @RequestParam(value = "orderBy", required = false, defaultValue = "severity") String[] orderBy,
    @RequestParam(value = "order", required = false, defaultValue = "desc") String[] order,
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

An application currently in development has the requirements for using MS Word to perform
We're currently using IIS 6 and Windows Server 2003 for our web and application
Where currently working on an C# application that requires data to be stored in
I am using Rails as my server of an iOS application. Currently, from the
I have an application that is currently running against a 32-bit SQL Server 2005
I currently have heavily multi-threaded server application, and I'm shopping around for a good
I'm currently developing a web application in ASP.Net with SQL Server and I would
I am currently putting together a rails-based web application which will only serve and
I wrote an application that currently runs against a local instance of MySql. I
I'm currently implementing a REST web service using CouchDB and RESTlet. The RESTlet layer

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.