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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T10:50:08+00:00 2026-05-11T10:50:08+00:00

DWR handles lists of primitives quite straight forward. I could not find whether array

  • 0

DWR handles lists of primitives quite straight forward. I could not find whether array of objects returned by a DWR method call represent a JSON object. Any clues? Or do I have to return a JSON string representing the array of objects back to the browser?

  • 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. 2026-05-11T10:50:09+00:00Added an answer on May 11, 2026 at 10:50 am

    This answer is a little late, but here goes 🙂

    Good news: DWR also handles Java arrays and Collections in a really straight-forward way. Just return them and on client side you’ll get JavaScript Array objects. (In typical cases like primitives or Strings inside your array or Collection, that is. If the contents is something more exotic, you may need to define converters; more below.)

    Here’s a quote from DWR documentation (emphasis mine):

    By default all of the following are converted for you without further declaration:

    • All primitive types, boolean, int, double, etc.
    • The Class based versions of the these Boolean, Integer, etc.
    • java.lang.String
    • java.util.Date and the 3 SQL derivatives
    • arrays of the above
    • Collections (Lists, Sets, Maps, Iterators, etc) of the above
    • DOM objects (like Element and Document) from DOM, XOM, JDOM and DOM4J

    So you definitely won’t need JSON strings for these (although that may be a good option for more complicated data structures).

    You can actually return many more kinds of objects without doing a lot of manual work because DWR comes with ‘converters‘ for lots of typical uses. For example, to make your custom ‘bean’ style Java objects work in client-side JS, all you need to say in dwr.xml is that you want to use the bean converter:

    <convert converter='bean' match='com.company.YourBean' /> 

    Even if your method returns a List (or array) of those bean objects…

    public static List<YourBean> getData(){ ... } 

    … the above configuration suffices, which is pretty nice.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 73k
  • Answers 73k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer Elegant? Define elegant. I think some people are going to… May 11, 2026 at 1:57 pm
  • added an answer I don't know if this is still the recommended thing… May 11, 2026 at 1:57 pm
  • added an answer Im need to go see the eye doctor. I over… May 11, 2026 at 1:57 pm

Related Questions

I've been playing with DWR and converters for a while and I really wanted
I have done a bit of testing on this myself (During the server side
We need some input on what is a good design pattern on using AJAX
I want DWR to transparently batch all remote calls that are done in the
I'm using dwr and spring and I get this error: java.lang.IllegalArgumentException: Javascript name *

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.