1. #1
    Sencha Premium Member
    Join Date
    Mar 2013
    Posts
    39
    Vote Rating
    1
    cassinisolutions is on a distinguished road

      0  

    Default Process Config in Sensha Touch

    Process Config in Sensha Touch


    Hello,

    I'm using the "Process Config" in Architect 2.2, on each component, when I use the ExtJS Framework.

    However, when I use the Sencha Touch Framework (2.2 for example), I don't see this "Process Config".

    I don't know where I've missed something

    Thanks for your help

  2. #2
    Sencha - Architect Dev Team
    Join Date
    Jan 2009
    Location
    Frederick, Maryland
    Posts
    817
    Vote Rating
    31
    jminnick has a spectacular aura about jminnick has a spectacular aura about

      0  

    Default


    In Touch you'll want to use 'initialize'
    Jason Minnick
    Sencha Architect Development Team

  3. #3
    Sencha Premium Member
    Join Date
    Mar 2013
    Posts
    39
    Vote Rating
    1
    cassinisolutions is on a distinguished road

      0  

    Default


    I've tried this already, but with no success.

    I have indeed a NavigationView that contains a FormPanel that contains a FieldSet with a default title.

    I want to change this title before it appears (as I would do with a Process Config with ExtJS framework),
    so, as you've suggested, I've put an initialize function (in the NavigationView) that does something like this (just to make a test):

    Code:
    console.log(this.config.items[0].items[1].title);
    this.config.items[0].items[1].title = 'some new title';
    The console log shows me the FieldSet title I want to process
    I then write something new in it

    But when the gui appears, I can see the default title stored in the config {} section of the NavigationView

    I've missed something ?

    And last thing, I guess the technic would be to put a recursive function in initialize that looks all items, and nested items in the config {}, if I want to change all the title / label, and so on. Is that correct ?

    Thanks

  4. #4
    Sencha - Architect Dev Team
    Join Date
    Jan 2009
    Location
    Frederick, Maryland
    Posts
    817
    Vote Rating
    31
    jminnick has a spectacular aura about jminnick has a spectacular aura about

      0  

    Default


    I think you will find more success using component query along with the convenience methods the components provide.
    Attached Images
    Jason Minnick
    Sencha Architect Development Team

  5. #5
    Sencha Premium Member
    Join Date
    Mar 2013
    Posts
    39
    Vote Rating
    1
    cassinisolutions is on a distinguished road

      0  

    Default


    Ok thanks

    Indeed, I need to fetch recursively all elements, so I've used Ext.ComponentQuery.query
    And as I need to fetch all of them in all the GUI, I've put the function in the launch() function of the app, and it's ok

    I guess I'll find a getter for each component in order to fetch its label (like getLabel, getText or getTitle, etc.), right ?

    However, for a Ext.form.Panel for example, I can set a title in Architect, however I encounter a problem with the getTitle(), it doesn't seem to exist, according to API

    => Could you tell me which function it is to get/set the title of an Ext.form.Panel ?

    Thanks for your help!!

  6. #6
    Sencha - Architect Dev Team
    Join Date
    Jan 2009
    Location
    Frederick, Maryland
    Posts
    817
    Vote Rating
    31
    jminnick has a spectacular aura about jminnick has a spectacular aura about

      0  

    Default


    Quote Originally Posted by cassinisolutions View Post
    Ok thanks

    Indeed, I need to fetch recursively all elements, so I've used Ext.ComponentQuery.query
    And as I need to fetch all of them in all the GUI, I've put the function in the launch() function of the app, and it's ok

    I guess I'll find a getter for each component in order to fetch its label (like getLabel, getText or getTitle, etc.), right ?

    However, for a Ext.form.Panel for example, I can set a title in Architect, however I encounter a problem with the getTitle(), it doesn't seem to exist, according to API

    => Could you tell me which function it is to get/set the title of an Ext.form.Panel ?

    Thanks for your help!!
    there isn't a getter for form.Panel but there is a setter, setTitle();
    Jason Minnick
    Sencha Architect Development Team

  7. #7
    Sencha Premium Member
    Join Date
    Mar 2013
    Posts
    39
    Vote Rating
    1
    cassinisolutions is on a distinguished road

      0  

    Default


    Ok, but I need to process the title of the Panel by an i18n() function, that will take this title as a key, in order to return the translated value according to the locale of the session

    That's why I've found the Process Config in Architect quite handy. It would be very nice to have it also when using the Touch framework

    And it would also be nice also to have a getter for the panel, in order to fetch the title

    Maybe both features will be in the pipe ?

    Thanks

  8. #8
    Sencha User
    Join Date
    Mar 2013
    Posts
    33
    Vote Rating
    1
    cdt is on a distinguished road

      0  

    Default


    +1

    However, although processConfig is unavailable, in initialize() function, we can still manage to do that, eg.
    Code:
    this.config.title = 'my title';
    this.config.iconCls = 'info';
    this.callParent();

Thread Participants: 2