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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:31:37+00:00 2026-05-23T08:31:37+00:00

I was the Google Codeing Basics (http://code.google.com/intl/de-DE/webtoolkit/doc/latest/DevGuideCodingBasicsOverlay.html#example-collections) and thought: hey this could be way

  • 0

I was the Google Codeing Basics (http://code.google.com/intl/de-DE/webtoolkit/doc/latest/DevGuideCodingBasicsOverlay.html#example-collections) and thought: hey this could be way faster and easier to use than pharsing my JSON object by hand.

So I played with the example and noticed that it worked fine when the JsArray was defined in the HTML file but I couldn’t find a solution to pass a String or Url into the function and it returns me an Overlay Type.

So what I want to do is:

I have this function

    private native Customer getFirstCustomer(/*TYPE (preferd String)*/ name) /*-{
    return (CASTVALUE TO ???) name; 
}-*/;

To which I pass

{"FirstName": "Jimmy"}

as String, and It returns me a Java Object like this:

    import com.google.gwt.core.client.JavaScriptObject;
    class Customer extends JavaScriptObject {
      protected Customer() { }
      public final native String getFirstName() /*-{ return this.FirstName; }-*/;
    }

Is this possible?

Best regards,
Stefan

  • 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-23T08:31:38+00:00Added an answer on May 23, 2026 at 8:31 am

    Please, do not, by any mean, eval() things blindly! (security 101)

    Use GWT’s JsonUtils instead: it’ll use native JSON support in browsers that support it (faster and safer than eval()) and will validate the JSON before eval()ing it in others (that is, IE6, IE7 and old Safaris –pre 4.0.3–, all other browser versions without native JSON are dead by now):

    Customer customer = JsonUtils.safeEval(jsonString);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

http://coding.pressbin.com/18/Display-a-Google-Map-when-you-hover-over-location-text/ I am following this tutorial on how to display google map over a
I've been searching google for a while to determine the most coder-friendly example boxes.
Google Analytics reads like a seismic chart lately
Google is not being my friend - it's been a long time since my
Google maps in some region can serve traffic information showing the blocked roads and
Google's not coming to my rescue, here, and I just know this is the
Google results on this one are a bit thin, but suggest that it is
Google chrome doesn't behave the same as other browsers when encountering this nugget: <?php
Google is failing me on this one. Let's say I have some ECMA script
Google/MyBrain are failing me. Without using a framework (which I'll never get past my

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.