import <%= base_package %>.models.<%= model.camelcase %>; <% end -%> import <%= base_package %>.models.presentation.<%= class_name.pluralize %>Model; <% for attribute in attributes -%> <% if attribute.model_type -%> import <%= base_package %>.models.<%= attribute.flex_name.capitalize_without_downcasing %>; <% end -%> <% end -%> import <%= base_package %>.views.component.<%= class_name %>Presenter; /** This is the presentation model object for this view, it is injected by the application controller when view is created. */ [Bindable] public var model:<%= class_name.pluralize %>Model; private var <%= class_name.pluralize.dcfirst %>Presenter:<%= class_name.pluralize %>Presenter(); private function creationComplete(event:Event):void { model = new <%= class_name.pluralize %>Model; <%= class_name.pluralize.dcfirst %>Presenter = new <%= class_name.pluralize %>Presenter(this); } ]]> <% for attribute in attributes -%><% unless attribute.name == "with_user" %> <% if attribute.type == :boolean -%> <% elsif attribute.type == :string -%> = <%= attribute.flex_name %>TextInput.text"/> <% elsif attribute.type == :text -%> <% elsif attribute.type == :datetime || attribute.type == :time -%> <% elsif attribute.type == :date -%> <% else -%> <% end -%> <% end -%> <% end -%> <% for model in belongs_tos -%> <% end -%> <% for attribute in attributes -%><% unless attribute.name == "with_user" %><% if attribute.type == "boolean" -%> <% elsif attribute.model_type -%> <% else -%> <% end -%><% end -%> <% end -%>