anchor.diff:    {
       final <%= struct.imit.jso_name %> entity = com.google.gwt.core.client.JavaScriptObject.createObject().cast();
   <% struct.fields.each do |field|
  +    converted_value = Proc.new do |var|
  +      case
  +        when field.struct? then "(#{field.referenced_struct.imit.jso_name})#{var}"
  +        when field.date? then "#{var}.toString()"
  +        when field.enumeration? then "#{var}.name()"
  +        else "#{var}"
  +      end
  +    end
        if :none == field.collection_type
  -%>    entity.set<%= field.name %>( <%= field.name %> );
  +%>    entity.set<%= field.name %>( <%= converted_value.call(field.name) %> );
   <%     else
       gwt_type =
         case
  
positive.code:   }-*/;
  
    private final native void set<%= field.name %>( com.google.gwt.core.client.JsArray<%= gwt_type_suffix %> value ) /*-{
      this.<%= field.json.name %> = value;
    }-*/;
  <%
  
negative.code:         when field.struct? then "ObjectArray"
          else (raise "Unsupported field type #{field.name}")
        end
  %>
      final <%= gwt_type %> $<%= field.name %> = newNative<%= gwt_creator %>();
      for ( final <%= field.imit.java_component_type %> v : <%= field.name %> )
      {
        $<%= field.name %>.push( <%= converted_value.call("v") %> );
      }
  
      entity.set<%= field.name %>( $<%= field.name %> );
  