The attached image shows an error that's occuring with my form
validation.  I think it might be a bug.
When you tab out of the field the first time, it has "0644" in the
text box, which matches the regular expression and everything looks
good.
Then you go back to the text box and change the contents to "033" and
tab out of the field. Now the field is highlighted in red as it should
be but the hover popup shows "0644 doesn't fit....".

The hover popup doesn't reflect the current value of the text field
like it should.

Am I doing something wrong or is this really a bug?

Thanks!
Scott


qx.Class.define("kiosk_portal.TabUploadFile",
{
  extend : qx.ui.tabview.Page,
  members :
  {
    host_id : null,
    __blur_handler: function() {
        console.log("blur handler");
        this.valid = this.__manager.validate();
        console.log(this.valid);
        if (this.valid) {
            this.__uploadButton.setEnabled(true);
        } else {
            this.__uploadButton.setEnabled(false);
        }
    }
  },
  construct : function()
    {
      this.base(arguments, 'UPLOAD');
      this.setLayout(new qx.ui.layout.VBox().set({spacing: 4}));

      this.__uploadForm = new
kiosk_portal.uploadwidget.UploadForm('uploadFrm','/file_upload');
      this.__uploadForm.setPadding(8);

      this.__uploadForm.setLayout(new qx.ui.layout.VBox(10));

      this.__uploadButton = new qx.ui.form.Button("Upload");
      this.__uploadButton.set({ marginTop : 10, allowGrowX : false,
enabled: false });
      this.__uploadForm.add(this.__uploadButton);

      this.__uploadButton.addListener('execute', function(e) {
        console.log("executing");
      }, this);

      this.__form = new qx.ui.form.Form();

      this.__file_permissions = new qx.ui.form.TextField().set({width:
50, value: '0644'});
      this.__file_permissions.setRequired(true);

      this.__manager = new qx.ui.form.validation.Manager();
      this.__manager.add(this.__file_permissions,
qx.util.Validate.regExp(new RegExp("^\\d\\d\\d\\d$")));
      this.__form.add(this.__file_permissions, "Permission", null,
"permission");
      this.__file_permissions.addListener( "blur", this.__blur_handler, this);

      this.__controller = new qx.data.controller.Form(null, this.__form);
      this.__model = this.__controller.createModel();

      this.__renderer = new qx.ui.form.renderer.Single(this.__form);
      this.__renderer.setAllowGrowX(false);
      this.add(this.__renderer);

      this.add(this.__uploadForm);

      this.setShowCloseButton(true);
    }
});

<<attachment: error_shot.jpg>>

------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to