[CLOSED] Problem in textfield when has indicator and validator

Page 1 of 2 12 LastLast
  1. #1

    [CLOSED] Problem in textfield when has indicator and validator

    Last edited by Daniil; Oct 22, 2013 at 2:40 PM. Reason: [CLOSED]
  2. #2
    Hello!

    You should use clearIndicator method:

    txtCPF.clearIndicator();
  3. #3
  4. #4
    Hi,

    There is the showIndicator method for that.

    The Indicator stuff appeared in Ext.NET, not in ExtJS. You could look at the sources.
    trunk\Ext.Net\Build\Ext.Net\extnet\src\form\BaseField.js
    Sorry, no docs for that, but there is an example:
    https://examples2.ext.net/#/Form/Fie...ator/Overview/

    There is the "Show/Hide" button as well.
  5. #5
  6. #6
    Please try with the hideIndicator method instead of the clearIndicator one.
  7. #7
  8. #8
    Sorry, I overlooked it. I will review tomorrow in details. If @Baidaly doesn't outrun me:)
  9. #9
    When you clear indicator, it clears text, tip and other parameters of indicator.

    To save indicator parameters you should use saveIndicator method. which saves it by default to the _indicators.default object of the TextField so you can have as many indicator config as you wish. You can use the saved value when you want to show the indicator.

    var btn = mainContainer.add({
                    itemId: 'btn',
                    xtype: 'button',
                    x: 10,
                    y: 20,
                    width: 150,
                    text: 'clear Indicator',
                    listeners: {
                        click: {
                            fn: function (item) {
                                var me = this;
                                txtCPF.saveIndicator();
                                txtCPF.clearIndicator();
                            }
                        }
                    }
                });
    
                var btn = mainContainer.add({
                    itemId: 'btn',
                    xtype: 'button',
                    x: 10,
                    y: 80,
                    width: 150,
                    text: 'show Indicator',
                    listeners: {
                        click: {
                            fn: function (item) {
                                var me = this;
                                txtCPF.showIndicator(txtCPF._indicators.default);
                            }
                        }
                    }
                });
  10. #10
Page 1 of 2 12 LastLast

Similar Threads

  1. [0.8.2] "Validator" property vs. AllowBlank
    By Thinjon100 in forum Bugs
    Replies: 1
    Last Post: Oct 30, 2015, 7:23 AM
  2. Crazy validator
    By CarWise in forum Bugs
    Replies: 1
    Last Post: Jan 10, 2011, 10:41 AM
  3. Replies: 32
    Last Post: Nov 17, 2010, 12:08 PM
  4. [CLOSED] textarea with validator
    By jeremyl in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: May 27, 2010, 10:09 AM
  5. Compare Validator
    By Rod in forum 1.x Help
    Replies: 0
    Last Post: Oct 30, 2008, 9:50 AM

Posting Permissions