Results 1 to 2 of 2

Thread: [1.2.3] BeanModel getProperties returns empty map

  1. #1
    Ext GWT Premium Member
    Join Date
    Mar 2009
    Vote Rating

    Default [1.2.3] BeanModel getProperties returns empty map

    BeanModel getProperties() returns an empty map while getPropertyNames() returns a collection of the properties.

    Debugging shows that the map field is null - even after an explicit set is called.

    I propose that getProperties should override the getProperties in BaseModelData and return the beanProperties (much like the getPropertyNames method does).

    Currently it means that to set one BeanModel from another I have to do this:

    Collection<String> props = source.getPropertyNames();
    for (String prop : props)
         target.set(prop, source.get(prop));
    where I'd like to do this:


  2. #2
    Ext User
    Join Date
    Jan 2009
    Vote Rating


    Sadly, I reported this problem a while back when the bug existed in 1.2.2 and no one replied or did anything.

    The bug unfortunately still didn't get fixed in 1.2.3.

    The main reason behind the problem is that BeanModel generator doesn't generate a corresponding getProperties() method to override the ModelData's base getProperties() method. What this means is that when you call getProperties(), you're actually getting the properties in the BaseModelData's hashmap properties, which BeanModel doesn't use.

    Currently, I'm doing the same thing you are when it comes to dealing with this. However, there are many dependencies on this getProperties() method in the GXT library, ie. DataViewBinder. So basically, ANY component that uses getProperties() will fail horribly when you use a BeanModel.

    Please fix this, GXT team. It'd be greatly appreciated!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts