def myOkClick(self): if 'disabled' not in self.okButton.getStyleName(): Popup.myOkClick(self) if self.okClick is not None: if self.title == 'Abrir': files = getattr(self.field.getElement(), 'files') file = JS("@{{files}}[0]") if file: JS("""var reader = new FileReader(); reader.onload = function(e) {@{{self}}.okClick(e.target.result);} reader.readAsBinaryString(@{{file}});""") #self.okClick(str) else: self.okClick(self.textBox.getText())
def myOkClick(self): if 'disabled' not in self.okButton.getStyleName(): Popup.myOkClick(self) self.okClick(self.textBox.getText(), self.choose.selectedType)