use of cz.metacentrum.perun.webgui.widgets.Confirm in project perun by CESNET.
the class FillAttributes method testRemoving.
/**
* Tests the values, if the process can continue
*
* @return true/false for continue/stop
*/
private boolean testRemoving() {
boolean result = true;
String errorMsg = "";
if (this.ids.isEmpty()) {
errorMsg += "Wrong attribute type value.\n";
result = false;
}
// silent skip - used by save changes buttons on attributes pages
if (attributes == null || attributes.isEmpty()) {
result = false;
}
if (errorMsg.length() > 0) {
Confirm c = new Confirm("Error while filling attributes", new Label(errorMsg), true);
c.show();
}
return result;
}
use of cz.metacentrum.perun.webgui.widgets.Confirm in project perun by CESNET.
the class RemoveAttributes method testRemoving.
/**
* Tests the values, if the process can continue
*
* @return true/false for continue/stop
*/
private boolean testRemoving() {
boolean result = true;
String errorMsg = "";
if (this.ids.isEmpty()) {
errorMsg += "Wrong attribute type value.\n";
result = false;
}
// silent skip - used by save changes buttons on attributes pages
if (attributes == null || attributes.isEmpty()) {
result = false;
}
if (errorMsg.length() > 0) {
Confirm c = new Confirm("Error while removing attributes", new Label(errorMsg), true);
c.show();
}
return result;
}
use of cz.metacentrum.perun.webgui.widgets.Confirm in project perun by CESNET.
the class DeleteAttribute method testDeleting.
/**
* Tests the values, if the process can continue
*
* @return true/false for continue/stop
*/
private boolean testDeleting() {
boolean result = true;
String errorMsg = "";
if (attrDefId == 0) {
errorMsg += "Wrong Attribute definition ID parameter.\n";
result = false;
}
if (errorMsg.length() > 0) {
Confirm c = new Confirm("Error while deleting attribute", new Label(errorMsg), true);
c.show();
}
return result;
}
use of cz.metacentrum.perun.webgui.widgets.Confirm in project perun by CESNET.
the class SetAttribute method testSetting.
/**
* Tests the values, if the process can continue
*
* @return true/false for continue/stop
*/
private boolean testSetting() {
boolean result = true;
String errorMsg = "";
if (this.ids.isEmpty()) {
errorMsg += "Wrong attribute type value.\n";
result = false;
}
// skip attribute with empty or null value
if (attribute.getValue() == null || attribute.getValue().equalsIgnoreCase("")) {
errorMsg += "Can't save attribute with null or empty value.\n";
result = false;
}
if (errorMsg.length() > 0) {
Confirm c = new Confirm("Error while setting attribute", new Label(errorMsg), true);
c.show();
}
return result;
}
use of cz.metacentrum.perun.webgui.widgets.Confirm in project perun by CESNET.
the class JsonUtils method cantParseIntConfirm.
/**
* Provides popup notification
*
* @param origin (you can specified origin of value (name of check box)
* @param value value that can't be parsed
*/
public static final void cantParseIntConfirm(String origin, String value) {
FlexTable ft = new FlexTable();
ft.setHTML(0, 0, "Value \"" + SafeHtmlUtils.fromString(value).asString() + "\" can't be parsed as number.");
if (origin.length() > 0) {
ft.setHTML(1, 0, "Input name: " + SafeHtmlUtils.fromString(origin).asString());
}
Confirm conf = new Confirm("Can't parse value", ft, true);
conf.setNonScrollable(true);
conf.show();
}
Aggregations