View Full Version : buttons order

08-06-2010, 05:26 AM
Hi all,

How can I change the order of the dialog's buttons? for example, in the login dialog, the cancel button is on the left and login button on the right. I modified the MantleLoginDialog.java file and now buttons appear in my correct order, but its behavior is changed, cancel button logs and login button cancels.

where can I change the function of the buttons?


08-26-2010, 06:59 AM

I think that for dialogs, pentaho uses GWT, a google tool, and this tool has a configuration that I can't modify.... That's all I've got... :(

09-13-2010, 10:46 AM
From your description, I think that you have only changed the following code in MantleLoginDialog:

super(Messages.getString("login"), Messages.getString("login"), Messages.getString("cancel"), false, true);

The OK and Cancel buttons are defined in MantleLoginDialog's super class, PromptDialogBox. If you want to change the button order on the Login dialog, then I assume that you would want to change the order on all prompt dialogs for consistency. The current architeture is designed this way by way of the supper class PromptDialogBox, where the buttons are added in the order in which they will appear.

So, instead of modifying the MantleLoginDialog, you may want to modify the PromptDialogBox. There are a couple of ways to do what you want, but you could just modify the constructor body to add the cancel button first.


Brian Hagan
Pentaho Lead Support Engineer, North America