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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T22:43:36+00:00 2026-06-01T22:43:36+00:00

This seems like a simple task, but somewhere in searching the docs- I’ve missed

  • 0

This seems like a simple task, but somewhere in searching the docs- I’ve missed the connection.

I have a menu stored in GAE and can return the results of a query:

public String[] getMeals() throws NotLoggedInException {
    checkLoggedIn();
    PersistenceManager pm = getPersistenceManager();
    List<String> meals = new ArrayList<String>();

    try {
        Query q = pm.newQuery(Meal.class, "user == u");
        q.declareParameters("com.google.appengine.api.users.User u");
        q.setOrdering("createDate");
        List<Meal> myMeals = (List<Meal>) q.execute(getUser());

        for (Meal myMeal : myMeals) {
            meals.add(myMeal.getMealID());
        }
    } finally {
        pm.close();
    }
    return (String[]) meals.toArray(new String[0]);
}

With those results, I’d like to bind it to a FlexTable. Using the stockwatcher sample, I’ve managed to get my ID bound to the FlexTable, but am missing the concept of how I tie the other fields in my result set to it. (The fields I have in the GAE are mealID, mealType and mealDate)

From above, we can see that I’m tossing mealID into a List.
I also know that my other fields must exist in the query because I haven’t done anything to filter them. As a matter of fact, if I change my code to:

meals.Add(myMeal.getMealID(), myMeal.getMealType(), myMeal.getMealDate());

it returns all the data, but the flex table treats each item as a new row instead of the three fields on one row.

So my question is: how should I be capturing my records and sending them to my FlexTable so that I can bind the FlexTable to the resultset?

For reference, client side code:

private void loadMeals() {
    // load meals from server service MealService
    mealService.getMeals(new AsyncCallback<String[]>() {
        public void onFailure(Throwable error) {
            handleError(error);
        }
        public void onSuccess(String[] meals) {
            displayMeals(meals);
        }
    });

}

private void displayMeals(String[] meals) {
    for (String meal : meals) {
        displayMenu(meal, meal, meal);
    }
}

The flextable gets populated like this:

mealID | mealType | mealDate
1 | 1 | 1
2 | 2 | 2
3 | 3 | 3

I want it to populate like this:

mealID | mealType | mealDate
1 | Breakfast | 12/22/2012
2 | Lunch | 12/22/2012
3 | Snack | 12/23/2012

Thanks in advance for your input!

  • 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-01T22:43:37+00:00Added an answer on June 1, 2026 at 10:43 pm

    This question is a duplicate of Problems passing class objects through GWT RPC

    Following the details in that link, and little hired help from oDesk got me going.
    Main oversight was needing the entrypoint class in {appname}.gwt.xml and placing the model classes in shared packages.

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

Sidebar

Related Questions

This seems like such a simple task, but I'm having a hard time finding
This seems like a simple and common task, but we cannot get it to
This seems like it should be a simple task, but I'm a noob as
Seems like a simple task. I have a webapp which requires a database connection.
This situation seems like it should be a simple task but I can't come
Apologies in advance. This seems like a simple task, but hours later on Google
This seems like a simple task but there may be an easier way. I
This seems like a simple task or a repeat, but bear with me-- I've
This seems like a simple question, but I can't find it with the Stack
This seems like a simple question, but it is difficult to search for. I

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.