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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:55:17+00:00 2026-05-26T05:55:17+00:00

I have a custom model, which internally uses HashMap<String, Object> to store the data.

  • 0

I have a custom model, which internally uses HashMap<String, Object> to store the data.

public class SearchScreenConfigModel extends DefaultDataModel implements Serializable{

private static final long serialVersionUID = 1L;

private ArrayList<DefaultGridColumnModel> defaultGridColumnModels;
private EntityTblModel entityTblModel;
private DefaultGridColumnModel defaultGridColumnModel;

public List<DefaultGridColumnModel> getDefaultGridColumnModels() {
    return get("defaultGridColumnModels");
}

public void setDefaultGridColumnModels(List<DefaultGridColumnModel> defaultGridColumnModels) {
    set("defaultGridColumnModels", defaultGridColumnModels);
}

public String getScreenName() {
    return get("screenName");
}

public void setScreenName(String value) {
    set("screenName", value);
}

public String getIcon() {
    return get("icon");
}

public void setIcon(String icon) {
    set("icon", icon);
}

public void setEntityTbl(EntityTblModel entityTbl) {
    set("entityTbl", entityTbl);
}

public EntityTblModel getEntityTbl() {
    return get("entityTbl");
}

}

public class DefaultDataModel implements DataModel, Serializable {

private static final long serialVersionUID = 1L;

private HashMap<String, Object> map;
protected boolean allowNetstedValues;

public DefaultDataModel(){

}

public DefaultDataModel(Map<String, Object> properties){
    super();
    setProperties(properties);
}


@SuppressWarnings("unchecked")
@Override
public <X> X get(String property) {
    if(map == null)
        return null;
    return (X)map.get(property);
}

@Override
public Map<String, Object> getProperties() {
    if(map != null)
        return map;
    return new HashMap<String, Object>();
}

@Override
public Collection<String> getPropertyNames() {
    Set<String> set = new HashSet<String>();
    if( map != null)
        set.addAll(map.keySet());
    return set;
}

@SuppressWarnings("unchecked")
@Override
public <X> X remove(String property) {
    if(map == null)
        return null;
    return (X) map.remove(property);
}

@SuppressWarnings("unchecked")
@Override
public <X> X set(String property, X value) {
    if(map == null)
        map = new HashMap<String, Object>();
    return (X)map.put(property, value);
}

public void setProperties(Map<String, Object> properties){
    for(String property : properties.keySet())
        set(property, properties.get(property));
}

}

I am setting the data from the server side (both primitive as well as user defined objects – serializable) and sending back to client.

Before returning from server the map has the data.

Once the model received in the client side, the hashmap is null.

Anyone please help me out.

  • 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-26T05:55:18+00:00Added an answer on May 26, 2026 at 5:55 am

    You can’t use Object: http://code.google.com/webtoolkit/doc/latest/DevGuideServerCommunication.html#DevGuideSerializableTypes. This would probably explain why you won’t get data in the client. You need to rewrite it to a type of which all subtypes can be serialized. This is also the problem with Object. GWT generates code for all subtypes for serializable objects, because at compile time it doesn’t know which subtype is used at runtime. For Object that would mean basically all classes, which would mean a huge overhead of generated code that will probably never be used.

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

Sidebar

Related Questions

i have an application which uses CoreData/.sqlite to store my data, a tab bar
I've got a custom UITableViewCell class whose model object performs an asynchronous download of
I have a controller called articles , which creates the articles model which gets
I have a ViewModel which encapsulates a datasource which is a domain object. The
I'm writing a plug-in for a 3D modeling program. I have a custom class
I have a custom query which eventually returns a list of objects. I need
I have an editor template for a custom object. Pretty basic - just has
In my model I have: validate :my_custom_validation def my_custom_validation errors.add_to_base(error message) if condition.exists? end
I have a few models that need to have custom find conditions placed on
Can I have a custom service providing the storage of the models I use

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.