Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha User
    Join Date
    May 2008
    Posts
    13
    Vote Rating
    0
    mheijink is on a distinguished road

      0  

    Default Unanswered: setBlankText

    Unanswered: setBlankText


    Hi,

    In gxt2.x on Fields there was a method ....getMessages().setBlankText()

    How to change the default text in gxt3?

    Marcel

  2. #2
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Answers
    60
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    You are probably looking for setEmptyText.

  3. #3
    Sencha User
    Join Date
    May 2008
    Posts
    13
    Vote Rating
    0
    mheijink is on a distinguished road

      0  

    Default


    No. That is the text thats displayed in the field it self.
    I want to change the text which is displayed when you validated the field.
    Now it will display 'This field is required'

  4. #4
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Answers
    60
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    That is comming from the EmptyValidator. Instead of setting setAllowBlank on the field, initiate the EmptyValidator directly with the EmptyMessages implementation of your needs

  5. #5
    Sencha User
    Join Date
    May 2008
    Posts
    13
    Vote Rating
    0
    mheijink is on a distinguished road

      0  

    Default


    Could you please give me a sample how to use it?

  6. #6
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Answers
    60
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Code:
    EmptyValidator<String> myValidator = new EmptyValidator<String>();
    myValidator.setMessages(new EmptyMessages() {
    @Override
        public String blankText() {
          return "your text";
        }
    });
    myField.addValidator(myValidator);

  7. #7
    Sencha User
    Join Date
    May 2008
    Posts
    13
    Vote Rating
    0
    mheijink is on a distinguished road

      0  

    Default


    I tried it on a combobox, but it doesn't work, still get the messagae 'This field is required'.

    ComboBox<Provider> combo = new ComboBox<Provider>(providerList, props.display());

    EmptyValidator<Provider> myValidator = new EmptyValidator<Provider>();
    myValidator.setMessages(new EmptyMessages() {
    @Override
    public String blankText() {
    return "your text";
    }
    });
    combo.addValidator(myValidator);

  8. #8
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Answers
    60
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Did you enable allowblank on the field?

  9. #9
    Sencha User
    Join Date
    May 2008
    Posts
    13
    Vote Rating
    0
    mheijink is on a distinguished road

      0  

    Default


    if I do that it works.

    But I don't want to allow blank, its contradictory.
    In gxt2 I used setAllowBlank(false)....

  10. #10
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Answers
    60
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Have you looked at the code what setAllowBlank is actually doing? It just sets up the validator (which you are doing manually now) and sets the same property on the cell (which you are missing right now, but should only be relevant for a ComboBox).

    You are not allowing blank, that is why you are setting the validator.

Thread Participants: 2

Tags for this Thread