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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T04:29:40+00:00 2026-06-07T04:29:40+00:00

Trying to get it to work without any detail knowledge of JQuery. I am

  • 0

Trying to get it to work without any detail knowledge of JQuery. I am really having a hard time finding an comprehensible example of how i would create an unnumbered list out of some json that i am passing to the front inside a String object.

I am using the Play! Framework. My Application has a method that returns a string holding an json array of items.

GET     /items                       controllers.Application.items()

the method looks like this:

public static Result items() {      
    return ok(Json.toJson(Item.all()));
}

How would you process this data in order to have your template present it as an unnumbered list?

the data, example:

@Entity
public class Item {

@Id
@GeneratedValue(strategy=GenerationType.AUTO)
public int id;
public String title;

public String type;
public int quantity;
public BigDecimal unitPrice;

public Item() {}

public static List<Item> all() {
    EntityManagerFactory entityManagerFactory = Persistence.createEntityManagerFactory("defaultPersistenceUnit");
    EntityManager entityManager = entityManagerFactory.createEntityManager();

    TypedQuery<Item> query = entityManager.createQuery("SELECT i FROM Item i", Item.class);
    return query.getResultList();
}
  • 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-06-07T04:29:41+00:00Added an answer on June 7, 2026 at 4:29 am

    You need to call the items() action with a javascript ajax request. Then you can use javascript and jQuery to create your list.

    something like this:

    <script type="text/javascript">
        $(function(){
            $.getJSON('/items', function(items){
                var ul = $('<ul>');
                $.each(items, function(item){
                    var li = $('<li>').text(item.title);
                    ul.append(li);
                });
    
                $('body').append(ul);
            });
        });    
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying to get this jsfiddle to work. So far without luck.
I'm trying to get a completely custom Dialog or PopupWindow, without any of the
I'm having a little trouble trying to get WarpPointer to work out appropriately for
I'm currently trying to get the contents of an iframe's body without any mangling
I am a noob Perl user trying to get my work done ASAP so
I have a simple Class Hierarchy that I am trying to get to work
Trying to get this to work, with no luck: [DataMember] public Type ParameterType {
Just trying to get diff to work better for certain kinds of documents. With
I'm trying to get Spatialite to work with my django app, however, I've hit
I'm trying to get MGTwitterEngine to work for the iPhone SDK. I've followed the

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.