1. #21
    Ext GWT Premium Member gslender's Avatar
    Join Date
    Mar 2008
    Location
    Brisbane, Australia
    Posts
    1,572
    Vote Rating
    3
    gslender is on a distinguished road

      0  

    Default


    Ok, I guess you are calling isValid on the form or the field and its doing the right thing, which is to validate. So what you really want is a never validate option - which doesn't exist.

    I was only fixing the validate on blur problem when isValid wasn't being called (ie even when not calling validate, it would validate).

    Have I summerized it correctly?

    If so, I'll proceed and update it right now and add a setAllowScoreFail(boolean) which, when set to true, should do what you need and allow the pwd fld to never invalidate even if the pwd scores below the allowed values...

    Sounds good ?

  2. #22
    Ext User
    Join Date
    Sep 2008
    Posts
    17
    Vote Rating
    0
    dcampos is on a distinguished road

      0  

    Default


    Hmmm, thinking in what you say I see that its true that my app have a bad code that is the call of validate on this passwordField (while it should only validate the confirmPassword).

    I'll change this option and see what its happening.

    About the setAllowScoreFail(boolean) I don't know if is an option needed for other ones. Maybe is usefull thinking in that if someone adds a "informative" PasswordField into a FormPanel and then uses the method FormPanel.isValid() the PasswordField isValid will be called.

  3. #23
    Ext User
    Join Date
    Oct 2008
    Location
    Warsaw(PL)/Cottbus(GER)
    Posts
    215
    Vote Rating
    0
    EagleEye666666 is on a distinguished road

      0  

    Default


    I guess what u guess are talking about a confirm field. connected to the password field.

    I am using your nice widget already.

    Some additional feature would be to extend this field with and extra field to let the user retype the password set via a flag attribute and builtin validator. Just some idea.

    Code:
    final TextField<String> retype = new TextField<String>();
    retype.setFieldLabel("Retype");
    retype.setAllowBlank(false);
    retype.setPassword(true);
    retype.setValidator(new Validator<String, Field<String>>(){
    	public String validate(Field<String> field, String value) {
    		if(pwdfld.getValue().equals(value)) // pwdfld = your Password Textfield
    			return null;
    		else 
    			return "Value do not match the password!"; // I know bad english :D
    	}
    });
    I do know it is more than jut one field and than there can be problems to customize the layout of this 2 fields.

    It just came to my mind and iam using such field extra.

  4. #24
    Ext User
    Join Date
    Oct 2008
    Location
    Warsaw(PL)/Cottbus(GER)
    Posts
    215
    Vote Rating
    0
    EagleEye666666 is on a distinguished road

      0  

    Default


    I have problem with the PasswordField you should also overwrite the setValue() and getValue() methods...

    Cuz the FormBinding is not working...
    The field is not getting updated.

    Code of the Formbinding method:
    Code:
    /**
       * Updates the field's value with the model value.
       */
      public void updateField() {
        Object val = model.get(property);
        if (convertor != null) {
          val = convertor.convertModelValue(val);
        }
        field.setValue(val);
      }
    EDIT: i have overwritten these setValue/getValue.
    It is still not working the binding to that field. Iam trying to find out why.

    EDIT2: ok thinking about it, problems were this set/get for the Value... but also for the binding the getName/setName which is used to bind the property. I overwrote them as well... BUT the real problem (i think) is the EventListener of the FormBinding i will have to manually bind it... and use your getInputField() method right? This listener listen on the Change event of the field.

    Code:
    /**
       * Creates a new binding instance.
       * 
       * @param field the bound field for the binding
       */
      public FieldBinding(Field field, String property) {
        this.field = field;
        this.property = property;
    
        changeListener = new Listener<FieldEvent>() {
          public void handleEvent(FieldEvent be) {
            onFieldChange(be);
          }
        };
    
        modelListener = new ChangeListener() {
          public void modelChanged(ChangeEvent event) {
            if (event.type == ChangeEventSource.Update) onModelChange((PropertyChangeEvent) event);
          }
        };
      }
    But the big problem is the change event the Change Event of the PasswordField Component will never happen... so the FormBinding does not work.

    Edit3: ok solved, i had to add costum binding and use this inputfield method

    Code:
    binding = new FormBinding(form,true);
    binding.setStore(form.getStore());
    binding.addFieldBinding(new FieldBinding(form.getPassword().getInputField(),"password"));
    binding.bind(form.getStore().getAt(0));
    than the overwriting of the set/getValue and set/getName arent not necessary.



    Sorry for confusing

  5. #25
    Ext User
    Join Date
    Nov 2008
    Posts
    19
    Vote Rating
    0
    shermdog01 is on a distinguished road

      0  

    Default Regex problem

    Regex problem


    Hi gslender,

    I was having an issue with the regex in this in GXT 1.2.1 and GWT 1.5.3 so I changed it to Javascript compatible regex.

    Not sure if anyone else is or will have issues, but this is what worked for me:


    Code:
            boolean lowletters = false;
            // LETTERS
            if (value.matches("^.*[a-z].*$")) { // at least one lower case
                // letter
                score += 2;
                lowletters = true;
            }
            boolean upletters = false;
            if (value.matches("^.*[A-Z].*$")) { // at least one upper case
                // letter
                score += 5;
                upletters = true;
            }
    
            boolean numbers = false;
            // NUMBERS
            if (value.matches("^.*[0-9].*$")) { // at least one number
                score += 5;
                numbers = true;
            }
    
            boolean specials = false;
            // SPECIAL CHAR
            if (value.matches("^.*[-!\\\"#$%&'()*+,./:;<=>?@\\[\\]\\^_`{|\\\\}~].*$")) { // at least one of
                // -!"#$%&'()*+,./:;<=>?@[]^_`{|\}~
                score += 5;
                specials = true;
            }

  6. #26
    Ext GWT Premium Member gslender's Avatar
    Join Date
    Mar 2008
    Location
    Brisbane, Australia
    Posts
    1,572
    Vote Rating
    3
    gslender is on a distinguished road

      0  

    Default


    Mmm, so I wonder which Regex is supposed to work?

    It seems odd that Java regex is not the same outcome in GWT.. I know its target is Javascript, but I would have thought Google would have handled the Regex differences - does anyone know for sure what is supposed to happen in Java vs GWT etc...

  7. #27
    Ext User
    Join Date
    Nov 2008
    Posts
    19
    Vote Rating
    0
    shermdog01 is on a distinguished road

      0  

    Default


    Some of the reading I did to pinpoint this stated
    Since your java
    source is churned into javascript by gwt, a regex string literal in
    your source code will become a regex string literal -in javascript-.
    I didn't dig much further into it after that...

    http://groups.google.com/group/Googl...e36fd627341165

  8. #28
    Ext GWT Premium Member gslender's Avatar
    Join Date
    Mar 2008
    Location
    Brisbane, Australia
    Posts
    1,572
    Vote Rating
    3
    gslender is on a distinguished road

      0  

    Default


    true - but did you also read this... !!
    ...and the GWTShell executes your *Java* code, so the regexps have to
    be Java-regexp-compatible for your app to work in Hosted Mode.

    In a few words:
    - if you use JavaScript-only regexp constructs, your app will fail in
    Hosted Mode, so developping and debugging will become a pain
    - if you use Java-only regexp constructs, your app will run in Hosted
    Mode but will fail in "web mode"

    So you should base your developments on the JavaScript regexp syntax;
    and if it fails in Hosted Mode, then find an alternate that's still
    JavaScript-compaible and happens to also be Java-compatible. If you
    base your devs on the Java regexp syntax, you'll only notice the
    incompatibilities when testing in web mode, which generally happen
    late in the development process...
    So not really the simplest solution isn't it?

  9. #29
    Ext User
    Join Date
    Dec 2008
    Location
    Netherlands
    Posts
    16
    Vote Rating
    -1
    Angelgab82 is an unknown quantity at this point

      0  

    Default


    bad class file: C:\Program Files\Google Web Toolkit\PasswordField\PasswordField.jar(ext/ux/pwd/client/PasswordField.class)
    class file has wrong version 50.0, should be 49.0
    Please remove or make sure it appears in the correct subdirectory of the classpath.
    import ext.ux.pwd.client.PasswordField;
    1 error

    I'm using Netbeans and gxt1.2.1 with gwt1.5.3

    I added the <inherits name='ext.ux.pwd.PasswordField'/>

    and the lib! I'm a bit lost can someone help please?

  10. #30
    Ext GWT Premium Member gslender's Avatar
    Join Date
    Mar 2008
    Location
    Brisbane, Australia
    Posts
    1,572
    Vote Rating
    3
    gslender is on a distinguished road

      0  

    Default


    this might be due to the version of the JVM/JDK - you are using v5.x and the lib was built using v6.x

    I'll try and rebuild for v5.x and repost

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