Bor*_*ich 5 gwt requestfactory gwt-editors
为简单起见:
public class Person
{
String name;
Set<Address> addresses;
}
public class Address
{
String city;
String street;
}
Run Code Online (Sandbox Code Playgroud)
与匹配
public interface PersonProxy extends EntityProxy
{
public String getName();
public Set<AdressProxy> getAddresses();
}
Run Code Online (Sandbox Code Playgroud)
和
public interface AdressProxy extends EntityProxy
{
public String getCity();
public String getStreet();
}
Run Code Online (Sandbox Code Playgroud)
我得到了UiBuinder类来编辑AddressProxy,如果我有List但是数据是在Person类中设置的,我如何使用ListEditor来清楚我如何使用ListEditor?如何使用Editor Framework来编辑它们?或者可能是当它变成PersonProxy时如何将Set转换为List?
我尝试了一种可以实现的适配器编辑器类
LeafValueEditor<Set<AddressProxy>>
Run Code Online (Sandbox Code Playgroud)
然后在LeafValueEditor.setValue()内部移动到List并在单独的Editor层次结构上启动一个新的driver.edit(),该层次结构负责List编辑但现在运气好了.
你应该创建一个CompositeEditor<Set<AddressProxy>, AddressProxy, AddressEditor>,类似于a ListEditor但处理a Set而不是a List.我想你可以以某种方式委托给ListEditor我,但我真的不确定.