Hi,
>From previous royale (flex) docs. I can see that it is possible to bind ui 
>forms to as3 objects (DTO). as3 classes with public getter and setter methods.
The ORM we are using accepts and returns custom data transfer objects 
(GenericDTO). This generic dto is implemented as a hashMap of pojo's (by pojo I 
mean a java class with getter and  setter methods))
For example, 
public class GenericDTO implements Serializable {
    private static final long serialVersionUID = 1L;
    private Map<String, Attribute> attributes = null;
    private String name = null;
    public GenericDTO(String name) {
        notNull(name, "The name of the DTO cannot be null...");
        this.attributes = new HashMap<String, Attribute>();
        this.name = name;
    }
    public GenericDTO add(String name, Attribute attribute) {
        notNull(name, "Attribute name cannot be null");
        notNull(attribute, "Attribute with name: " + name + " is null!");
        this.attributes.put(name, attribute);
        return this;
    }

   // there are getter/setter method to return the HashMap of Attributes.   
   The attribute class is the base class of all data types. So we have 
StringType (for String), IntegerType (for Integer) that extend Attribute. Class 
Attribute
public Object getInputValue();
public void setInputValue(final Object object);    
ZK supports java EL expressions so it is possible for me to bind this generic 
dto with zk ui controls as follows
<label value="@load(each.attributes.account.inputValue)" /><label 
value="@load(each.attributes.fullName.inputValue)" />  Where "each" represents 
the generic dto, attributes (is a hash map with key as field name  and 
inputValue holds the field value). 
 I am assuming it is possible to create ActionScript (as3) versions of 
GenericDTO, Attribute (with subclasses StringType, IntegerType e.t.c) 
 1. Can I bind my custom DTO to royale ui controls  ? would the above be 
possible ?  2. Can BlazeDS support transfer of such objects from a royale 
client to my java back end ?  3. I am currently using the mvvm approach with 
ZK. is mvvm design pattern supported with royale ?     4. Are command (method 
bindings) supported ? can i bind a button click to an as3 method ?


Roman,



Reply via email to