PDA

View Full Version : ConfirmMessageBox documentation



Francy
26 Sep 2016, 7:33 AM
Hi all,
I have the following statment:


if(confirmMessageBox.getHideButton()== confirmMessageBox.getButtonById(PredefinedButton.YES.name())){

And that is wrong, because i have to use equals instead of the operator ==.
(confirmMessageBox.getHideButton() is an object not a primitive).

I'm using sencha GXT 3.0.1, but the help on eclipse tell me to use.

com (https://www.sencha.com/forum/%E2%98%82=opin/C:%5C/Users%5C/francesco%5C/.m2%5C/repository%5C/com%5C/sencha%5C/gxt%5C/gxt%5C/3.0.1%5C/gxt-3.0.1.jar%3Ccom).sencha (https://www.sencha.com/forum/%E2%98%82=opin/C:%5C/Users%5C/francesco%5C/.m2%5C/repository%5C/com%5C/sencha%5C/gxt%5C/gxt%5C/3.0.1%5C/gxt-3.0.1.jar%3Ccom.sencha).gxt (https://www.sencha.com/forum/%E2%98%82=opin/C:%5C/Users%5C/francesco%5C/.m2%5C/repository%5C/com%5C/sencha%5C/gxt%5C/gxt%5C/3.0.1%5C/gxt-3.0.1.jar%3Ccom.sencha.gxt).widget (https://www.sencha.com/forum/%E2%98%82=opin/C:%5C/Users%5C/francesco%5C/.m2%5C/repository%5C/com%5C/sencha%5C/gxt%5C/gxt%5C/3.0.1%5C/gxt-3.0.1.jar%3Ccom.sencha.gxt.widget).core (https://www.sencha.com/forum/%E2%98%82=opin/C:%5C/Users%5C/francesco%5C/.m2%5C/repository%5C/com%5C/sencha%5C/gxt%5C/gxt%5C/3.0.1%5C/gxt-3.0.1.jar%3Ccom.sencha.gxt.widget.core).client (https://www.sencha.com/forum/%E2%98%82=opin/C:%5C/Users%5C/francesco%5C/.m2%5C/repository%5C/com%5C/sencha%5C/gxt%5C/gxt%5C/3.0.1%5C/gxt-3.0.1.jar%3Ccom.sencha.gxt.widget.core.client).box (https://www.sencha.com/forum/%E2%98%82=opin/C:%5C/Users%5C/francesco%5C/.m2%5C/repository%5C/com%5C/sencha%5C/gxt%5C/gxt%5C/3.0.1%5C/gxt-3.0.1.jar%3Ccom.sencha.gxt.widget.core.client.box).ConfirmMessageBox




A message box that prompts for confirmation with YES and NO buttons.
Code snippet:
final ConfirmMessageBox mb = new ConfirmMessageBox("Confirmation Required", "Are you ready?");
mb.addHideHandler(new HideHandler() {
public void onHide(HideEvent event) {
if (mb.getHideButton() == mb.getButtonById(PredefinedButton.YES.name())) {
// perform YES action
} else if (mb.getHideButton() == mb.getButtonById(PredefinedButton.NO.name())){
// perform NO action
}
}
});
mb.setWidth(300);
mb.show();


some one is able to explain me why, and also in the page:
https://docs.sencha.com/gxt/3.x/javadoc/index.html?overview-summary.html

there is no
getHideButton() method? is a bug? or not?

Thanks
Francesco
Italy