1. #1
    Sencha User
    Join Date
    Aug 2011
    Posts
    11
    Vote Rating
    0
    Blessed Geek is on a distinguished road

      0  

    Default How to bind buttons to fields in FieldSet?

    How to bind buttons to fields in FieldSet?


    My form has a few FieldSets.

    Is the formbinding capable of binding fields in those FieldSets to a button?

    Is the formbinding capable of binding fields of a certain FieldSet to a button?

    Would like to know how. Thx.

  2. #2
    Sencha User
    Join Date
    Aug 2011
    Posts
    11
    Vote Rating
    0
    Blessed Geek is on a distinguished road

      0  

    Default


    This is how I solved the deficiency. I am using gxt 2.2.5.

    Code:
    class FieldSetFriendlyFormPanel extends FormPanel
    {
      /**
       * isValid is called by FormButtonBinding
       * to dis/enable the fields in a form
       * based on the validation of member fields
       */
      @Override
      public boolean isValid(boolean preventMark) {
        boolean valid = true;
        for (Field<?> f : getFields()) {
          if (!f.isValid(preventMark)) {
            valid = false;
          }
        }
        
        for(Component c : getItems()) {
          if (c instanceof FieldSet) {
            validateFieldSet((FieldSet)c, preventMark, valid);
          }
        }
        
        return valid;
      }
    
    
      protected boolean validateFieldSet(FieldSet fieldset, boolean preventMark, boolean valid) {
        for(Component c : fieldset.getItems()) {
          if (c instanceof Field) {
            if (((Field)c).isValid(preventMark))
              valid = false;
          }
        }
        
        return valid;
      }
    }

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi