1. #1
    Sencha Premium Member
    Join Date
    Aug 2008
    Posts
    51
    Vote Rating
    7
    TonySteele is on a distinguished road

      0  

    Default Can't use your own vtypes on form fields.

    Can't use your own vtypes on form fields.


    On form fields the VType drop down should allow you specify your own Ext.form.field.VTypes.

    Since there is no method to set the VType (I think its only configurable) I have to create the whole form field and add it to the form in the render event.

  2. #2
    Sencha Premium Member
    Join Date
    May 2010
    Location
    Guatemala, Central America
    Posts
    1,305
    Vote Rating
    106
    ssamayoa is just really nice ssamayoa is just really nice ssamayoa is just really nice ssamayoa is just really nice

      0  

    Default


    You can add your edit field as top level view, create an override to set your custom vtype then use that component in your other views:

    Code:
    Ext.define('MyApp.view.override.MyTextField', {
        requires: 'MyApp.view.MyTextField'
    }, function() {
        Ext.override(MyApp.view.MyTextField, {
            vtype : "your-vtype"
        });
    });

    Regards.
    UI: Sencha Architect 3.x / ExtJS 4 & 5
    Server side: JEE / EJB 3.x / CDI / JPA 2.x/ JAX-RS / JasperReports
    Application Server: Glassfish / WildFly
    Databases: Oracle / DB2 / MySQL / Firebird

    If you like my answer please vote!

Thread Participants: 1