bug fixed and related to the submitQuery. If the field query is empty and the ok button is clicked and disabled then the ok button is enabled after the message box is displayed.

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/databases-manager-portlet@100179 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Loredana Liccardo 2014-09-24 10:05:57 +00:00
parent 341caee51f
commit f99822d5b4
1 changed files with 10 additions and 2 deletions

View File

@ -27,6 +27,7 @@ import com.extjs.gxt.ui.client.Style.ButtonScale;
import com.extjs.gxt.ui.client.event.ButtonEvent;
import com.extjs.gxt.ui.client.event.Events;
import com.extjs.gxt.ui.client.event.Listener;
import com.extjs.gxt.ui.client.event.MessageBoxEvent;
import com.extjs.gxt.ui.client.event.SelectionListener;
import com.extjs.gxt.ui.client.event.WindowEvent;
import com.extjs.gxt.ui.client.widget.Dialog;
@ -519,15 +520,22 @@ public class GxtToolbarFunctionality {
}
private void setInfoOnSubmitQuery(GxtFormSubmitQuery form,
Dialog SubmtQueryDialog, int dialogID) {
final Dialog SubmtQueryDialog, int dialogID) {
SubmitQueryData data = form.getSubmitQueryData();
// data = form.getSubmitQueryData();
String query = data.getQuery();
Listener<MessageBoxEvent> l = new
Listener<MessageBoxEvent>() {
public void handleEvent(MessageBoxEvent ce) {
SubmtQueryDialog.getButtonById(Dialog.OK).enable();
}
};
if ((query == null) || (query.equals(""))) {
MessageBox.alert("Warning", "Query field null", null);
MessageBox.alert("Warning", "Query field null", l);
} else {
dialogList.put(new Integer(dialogID), SubmtQueryDialog);
submitQueryDataList.put(new Integer(dialogID), data);