Polymer edit component set default values for input fields


I am a new to Cuba Studio and Polymer. I’ve been tasked to create the Polymer part of an application developed in Cuba. I’ve created the input components. My question is : How do I set the default field values when adding a new record with the edit component ?


Martin Oosthuizen

Currently you can override _handleEntityIdChange function of CubaEntityEditViewBehavior to return an object with some pre-defined fields.

      is: 'myapp-entity-edit',
      behaviors: [CubaLocalizeBehavior, CubaEntityEditViewBehavior],
      _handleEntityIdChange: function(newValue) {
        this.entity = {
          attr1: '123'