Package org.apache.wicket.markup.html.form

Examples of org.apache.wicket.markup.html.form.Form.error()


            protected void onSubmit(AjaxRequestTarget target, Form form) {
                try {
                    DataStoreInfo dataStore = (DataStoreInfo) form.getModelObject();
                    onSaveDataStore(dataStore, target);
                } catch (IllegalArgumentException e) {
                    paramsForm.error(e.getMessage());
                    target.addComponent(paramsForm);
                }
            }
        });
View Full Code Here


                        }
                    }
                    try {
                        new ItemRefId(refId);
                    } catch(InvalidRefIdException e) {
                        form.error(localize("item_search_form.error.refId.invalid"));
                        return;
                    }
                    Item item = getJtrac().loadItemByRefId(refId);
                    if(item == null) {
                        form.error(localize("item_search_form.error.refId.notFound"));
View Full Code Here

                        form.error(localize("item_search_form.error.refId.invalid"));
                        return;
                    }
                    Item item = getJtrac().loadItemByRefId(refId);
                    if(item == null) {
                        form.error(localize("item_search_form.error.refId.notFound"));
                        return;
                    }                                     
                    JtracSession.get().setItemSearch(itemSearch);
                    setResponsePage(ItemViewPage.class, new PageParameters("0=" + item.getRefId()));
                    return;
View Full Code Here

                    return;
                }
                String searchText = itemSearch.getSearchText();
                if(searchText != null) {
                    if(!getJtrac().validateTextSearchQuery(searchText)) {
                        form.error(localize("item_search_form.error.summary.invalid"));
                        return;
                    }
                }               
                setResponsePage(ItemListPage.class, itemSearch.getAsQueryString());
            }
View Full Code Here

                String chosenQuotaStr = String.valueOf(configQuotaValueModel.getObject());
                Double chosenQuota;
                try {
                    chosenQuota = Double.valueOf(chosenQuotaStr);
                } catch (NumberFormatException e) {
                    form.error(chosenQuotaStr + " is not a valid floating point number");// TODO:
                                                                                         // localize
                    return;
                }
                if (chosenQuota.doubleValue() <= 0D) {
                    form.error("Quota has to be > 0");
View Full Code Here

                    form.error(chosenQuotaStr + " is not a valid floating point number");// TODO:
                                                                                         // localize
                    return;
                }
                if (chosenQuota.doubleValue() <= 0D) {
                    form.error("Quota has to be > 0");
                    return;
                }
                gwc.getGlobalQuota().setValue(chosenQuota.doubleValue(), chosenUnit);
                gwc.saveDiskQuotaConfig();
View Full Code Here

            protected void onSubmit(AjaxRequestTarget target, Form form) {
                try {
                    DataStoreInfo dataStore = (DataStoreInfo) form.getModelObject();
                    onSaveDataStore(dataStore, target);
                } catch (IllegalArgumentException e) {
                    paramsForm.error(e.getMessage());
                    target.addComponent(paramsForm);
                }
            }
        });
View Full Code Here

            protected void onSubmit(AjaxRequestTarget target, Form form) {
                try {
                    DataStoreInfo dataStore = (DataStoreInfo) form.getModelObject();
                    onSaveDataStore(dataStore, target);
                } catch (IllegalArgumentException e) {
                    paramsForm.error(e.getMessage());
                    target.addComponent(paramsForm);
                }
            }
        });
View Full Code Here

                target.addComponent(startLink);
                target.addComponent(progress);
                try {
                    startCopy(target, form);
                } catch (Exception e) {
                    form.error(e.getMessage());
                    target.addComponent(form);
                } finally {
                    startLink.setVisible(true);
                    target.addComponent(startLink);
                    target.addComponent(progress);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.