1. #11
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,087
    Vote Rating
    113
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    In regard to overriding the implementation and adding these things as you wish...
    http://www.sencha.com/forum/showthre...ting-Build-298
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  2. #12
    Sencha Premium Member
    Join Date
    May 2010
    Location
    Guatemala, Central America
    Posts
    1,261
    Vote Rating
    79
    ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough

      0  

    Default


    BUMP:

    Allow to enter text in controller action name for user defined events (triggerclick for example):

    x1+.png

    Event function can be generated with no arguments, developer must use arguments array to get them, for example:

    PHP Code:
    onTriggerClick: function() {
        var 
    field arguments [0];
        ...

    Of course would be nice if Designer can detect non-standard or "unregistered" event and allow the addition of parameters but at first this way could be easy to implement.

    For now I have no idea on how capture events from use trigger field or derivates.

    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!

  3. #13
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,087
    Vote Rating
    113
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    It's on our radar.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  4. #14
    Sencha Premium Member
    Join Date
    May 2010
    Location
    Guatemala, Central America
    Posts
    1,261
    Vote Rating
    79
    ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough

      0  

    Default


    BUMP: I need trigger field...

    Quote Originally Posted by ssamayoa View Post

    Allow to enter text in controller action name for user defined events (triggerclick for example):

    Attachment 32530

    Event function can be generated with no arguments, developer must use arguments array to get them, for example:

    PHP Code:
    onTriggerClick: function() {
        var 
    field arguments [0];
        ...

    Of course would be nice if Designer can detect non-standard or "unregistered" event and allow the addition of parameters but at first this way could be easy to implement.

    For now I have no idea on how capture events from use trigger field or derivates.

    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!

  5. #15
    Sencha User
    Join Date
    Jan 2012
    Posts
    6
    Vote Rating
    0
    datosula is on a distinguished road

      0  

    Default adding triggerNCls and triggerNclick in Sencha Designer

    adding triggerNCls and triggerNclick in Sencha Designer


    Hi All,

    I needed to have additional "clear" trigger to combobox and found solution. I exported standard combobox to file. This option is available if combobox, or any other component is toplevel i.e. is located in Views section. You just need to right click and select export to file. The exported file is xds file which is recognized by SD. I made some modifications in the file externally and added some custom code. Afterwards I used import from file which is available by right click on any component in components toolbar. After that you can use this new Custom Component just as an ordinary one, i.e. you may dragndrop, assign values and etc. Here is content of CliearableCombo.xds file:

    Code:
    {
        "xdsVersion": "2.0.0",
        "frameworkVersion": "ext40",
        "internals": {
            "type": "combobox",
            "reference": {
                "name": "items",
                "type": "array"
            },
            "codeClass": null,
            "userConfig": {
                "designer|userClassName": "ClearableCombo",
                "designer|userAlias": "clearablecombo",
                "trigger2Cls": "x-form-clear-trigger",    
                "onTrigger2Click":function()
                {
                    var me=this;
                    me.clearValue();
                },
            },
            "customConfigs": [
                {
                    "group": "(Custom Properties)",
                    "name": "trigger2Cls",
                    "type": "object"
                },
                {
                    "group": "(Custom Properties)",
                    "name": "onTrigger2Click",
                    "type": "function"
                }
            ],
            "expanded": true
        },
        "linkedNodes": {},
        "boundStores": {},
        "id": "ucmpClearableCombo",
        "name": "ClearableCombo",
        "category": {
            "id": "xdcForm Fields",
            "name": "Form Fields"
        }
    }
    The above code is solution for some problems in this thread, but I have a question:

    We are using source sharing and system and I want to know there this custom component is stored, i.e. what files should be shared to make tshi custom component available to other developers. I was unable to find where it is stored.

    Thanks ahead.
    David.

  6. #16
    Sencha Premium Member
    Join Date
    May 2010
    Location
    Guatemala, Central America
    Posts
    1,261
    Vote Rating
    79
    ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough

      0  

    Default


    We are using source sharing...
    Put your modified xsd files under version control so each developer can check-out them and import in their own SD installation.

    BTW, what I need is the ability to declare controller action for "triggerclick" or any user defined event.

    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!

  7. #17
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,087
    Vote Rating
    113
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Quote Originally Posted by datosula View Post
    We are using source sharing and system and I want to know there this custom component is stored, i.e. what files should be shared to make tshi custom component available to other developers. I was unable to find where it is stored.
    Thanks for sharing your solution with the community. Custom components which have been imported into your designer are stored in the app data's localstorage file.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  8. #18
    Sencha User
    Join Date
    Jan 2012
    Posts
    6
    Vote Rating
    0
    datosula is on a distinguished road

      0  

    Default


    Hi and Thanks for reply,

    The solution does not work well cause after save the data in initComponent function is not saved by SD. So I found workaround and exported xds file should look like this:

    Code:
    {
        "xdsVersion": "2.0.0",
        "frameworkVersion": "ext40",
        "internals": {
            "type": "combobox",
            "reference": {
                "name": "items",
                "type": "array"
            },
            "codeClass": null,
            "userConfig": {
                "fieldLabel": "Field Label",
                "designer|userClassName": "ClearableCombo",
                "designer|userAlias": "clearablecombo",
                "trigger2Cls": "x-form-clear-trigger"
            },
            "customConfigs": [
                {
                    "group": "(Custom Properties)",
                    "name": "trigger2Cls",
                    "type": "string"
                },
                {
                    "group": "(Custom Properties)",
                    "name": "onTrigger2Click",
                    "type": "function"
                }
            ],
            "expanded": true,
            "cn": [
                {
                    "type": "fixedfunction",
                    "reference": {
                        "name": "items",
                        "type": "array"
                    },
                    "codeClass": null,
                    "userConfig": {
                        "fn": "onTrigger2Click",
                        "implHandler": "var me = this;\nme.clearValue();",
                        "designer|userClassName": "onTrigger2Click"
                    },
                    "customConfigs": [],
                    "expanded": true
                }
            ]
        },
        "linkedNodes": {},
        "boundStores": {},
        "id": "ucmpClearableCombo",
        "name": "ClearableCombo",
        "category": {
            "id": "xdcForm Fields",
            "name": "Form Fields"
        }
    }

  9. #19
    Sencha Premium Member
    Join Date
    May 2010
    Location
    Guatemala, Central America
    Posts
    1,261
    Vote Rating
    79
    ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough

      0  

    Default


    Overrides aren't stored in XSD nor local storage, just in the app/view/override so you should copy that/those files also and put in version control.

    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!