Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    DataSource.setProperties with custom setter method

    I'm trying to use DataSource.setProperties and I noticed that my lists were not getting set. Upon further investigation, I see that there are no setter methods in a class from a library we're using. Is there a way to specify a custom setter function?

    For example, here is an example Bean class. The field, list, is accessed only with getList(). The desired custom setter function would clear the list and add the instances from the values map.

    Code:
    class Bean {
      List<String> list = new ArrayList<String>();
      
      List<String> getList() { return list; }
    
      // notice: no setList() method
    }
    SmartGWT 4.0p 20140115, GWT 2.5.1, FF 26

    #2
    valueXPath could be used if the function just has the wrong name. Something like you describe could not be done declaratively and would have to be something you do before or after a call to setProperties().

    Comment

    Working...
    X