Results 1 to 4 of 4

Thread: Newbie question: find triggered routine for tagfield

  1. #1
    Sencha User
    Join Date
    Jun 2013
    Posts
    13
    Answers
    2

    Default Newbie question: find triggered routine for tagfield

    I have a form with several tagfields. One possible value for the "status" tagfield is "Completed".
    If the user adds "Completed" to "status", I want to also add "Completed" to tagfield "orgAssignmentStatus". If I knew which routine was being triggered by each choice I might have a shot, but the dynamically-generated nature of the code has me confused. Should I use the "validateOnChange" option? Would that allow me to write my own specialized code? If so, what would the result look like?
    I'm just including the code for the controlling "status" tagfield.
    Code:
    {
        xtype: 'tagfield',
        anchor: '100%',
        cls: 'abcd-list-search-filter',
        itemId: 'status',
        margin: '15 0 0 0',
        fieldLabel: 'Request Status',
        labelAlign: 'top',
        labelSeparator: ' ',
        name: 'status',
        validateOnChange: false,
        value: [
            'Open',
            'On Hold'
        ],
        validateOnBlur: false,
        anyMatch: true,
        autoLoadOnValue: true,
        displayField: 'lovValue',
        minChars: 1,
        queryMode: 'local',
        valueField: 'lovValue',
        bind: {
            store: '{RequestStatuses}'
        },
        listeners: {
            specialkey: 'onStatusSpecialkey'
        }
    },

  2. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

    Default

    Can you listen for the select event in the first tagfield to trigger the desired actions?

  3. #3
    Sencha User
    Join Date
    Jun 2013
    Posts
    13
    Answers
    2

    Default

    How would I do that? (Sorry, completely new to Sencha Architect.) In "plain" JS, where I write the code, I could put an "onChange" function, but using SA, I'm not sure how to do that.

  4. #4
    Sencha User
    Join Date
    Mar 2016
    Posts
    8
    Answers
    2

    Default

    Or would it be a better idea to add this to the Submit routine? I was thinking in there I could test if the first field contained "Completed", then add "Completed" to the second field's value before submitting the query. If that seems like a way to go, how would I do that? The code for the searchButton is:
    Code:
    {
        xtype: 'button',
        reference: 'searchButton',
        height: 60,
        itemId: 'search',
        margin: '0 0 0 10',
        width: 75,
        glyph: '[email protected]',
        iconAlign: 'top',
        scale: 'medium',
        text: 'SEARCH',
        listeners: {
            click: 'onSearchClick'
        }
    }

Similar Threads

  1. A tagfield question
    By gj.gauravjain in forum Ext JS 6.x Q&A
    Replies: 1
    Last Post: 7 Mar 2016, 7:12 AM
  2. Replies: 10
    Last Post: 3 Feb 2012, 9:28 AM
  3. newbie: can't find ext-base.js
    By lcurrens in forum Ext: Q&A
    Replies: 3
    Last Post: 30 Aug 2011, 11:21 PM
  4. newbie ComponentQuery question: how do I find a class?
    By end-user in forum Ext: Discussion
    Replies: 4
    Last Post: 12 Aug 2011, 1:02 PM
  5. Replies: 0
    Last Post: 9 Mar 2011, 3:37 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •