List of usage examples for org.apache.wicket.util.string StringValue isNull
public boolean isNull()
From source file:cz.zcu.kiv.eegdatabase.wui.ui.account.ChangePasswordPage.java
License:Apache License
public ChangePasswordPage(PageParameters parameters) { StringValue value = parameters.get(PARAM_ID); if (!value.isNull() && !value.isEmpty() && value.toString().equals(PARAM_ID)) { add(new Label("headTitle", ResourceUtils.getModel("pageTitle.changesWereMade"))); setupComponents(false);// w w w. j a v a2s. c o m } else throw new RestartResponseAtInterceptPageException(AccountOverViewPage.class); }
From source file:cz.zcu.kiv.eegdatabase.wui.ui.account.ListOfMembershipPlansPersonPage.java
License:Apache License
private StringValue parseParameters(PageParameters parameters) { StringValue value = parameters.get(BasePage.DEFAULT_PARAM_ID); if (value.isNull() || value.isEmpty()) throw new RestartResponseAtInterceptPageException(EEGDataBaseApplication.get().getHomePage()); return value; }
From source file:cz.zcu.kiv.eegdatabase.wui.ui.administration.forms.LicenseManageFormPage.java
License:Open Source License
public LicenseManageFormPage(PageParameters parameters) { StringValue licenseId = parameters.get(DEFAULT_PARAM_ID); if (licenseId.isNull() || licenseId.isEmpty()) throw new RestartResponseAtInterceptPageException(AdminManageLicensesPage.class); License license = licenseFacade.read(licenseId.toInteger()); add(new Label("headTitle", ResourceUtils.getModel("pageTitle.editLicenseTemplate"))); add(new ButtonPageMenu("leftMenu", AdministrationPageLeftMenu.values())); add(new LicenseForm("form", new Model<License>(license), licenseFacade, getFeedback())); }
From source file:cz.zcu.kiv.eegdatabase.wui.ui.articles.ArticleCommentFormPage.java
License:Apache License
public ArticleCommentFormPage(PageParameters parameters) { setPageTitle(ResourceUtils.getModel("label.addComment")); add(new ButtonPageMenu("leftMenu", ArticlesPageLeftMenu.values())); StringValue articleParam = parameters.get(PageParametersUtils.ARTICLE); StringValue commentParam = parameters.get(PageParametersUtils.COMMENT); if (articleParam.isNull() || articleParam.isEmpty() || commentParam.isEmpty() || commentParam.isNull()) { throw new RestartResponseAtInterceptPageException(ArticlesPage.class); }/*w w w. j ava 2 s. c o m*/ int articleId = articleParam.toInt(); int commentId = commentParam.toInt(); Article article = facade.read(articleId); boolean isPublicArticle = article.getResearchGroup() == null; testUserCanAddArticleComment(isPublicArticle); ArticleComment parentComment = facade.readComment(commentId); Person person = EEGDataBaseSession.get().getLoggedUser(); ArticleComment newComment = new ArticleComment(); newComment.setArticle(article); newComment.setPerson(person); newComment.setParent(parentComment); add(new ArticleCommentFormPanel("addCommentFormPanel", new Model<ArticleComment>(newComment), getFeedback())); }
From source file:cz.zcu.kiv.eegdatabase.wui.ui.articles.ArticleFormPage.java
License:Apache License
public ArticleFormPage(PageParameters parameters) { testUserCanAddArticle();/*from www . j a v a 2 s. com*/ setPageTitle(ResourceUtils.getModel("pageTitle.editArticle")); add(new Label("title", ResourceUtils.getModel("pageTitle.editArticle"))); StringValue param = parameters.get(DEFAULT_PARAM_ID); if (param.isNull() || param.isEmpty()) { throw new RestartResponseAtInterceptPageException(ArticlesPage.class); } int articleId = param.toInt(); Article article = articleFacade.getArticleDetail(articleId, EEGDataBaseSession.get().getLoggedUser()); setupComponents(new Model<Article>(article)); }
From source file:cz.zcu.kiv.eegdatabase.wui.ui.articles.ViewArticlePage.java
License:Apache License
public ViewArticlePage(PageParameters parameters) { StringValue param = parameters.get(DEFAULT_PARAM_ID); if (param.isNull() || param.isEmpty()) { throw new RestartResponseAtInterceptPageException(ArticlesPage.class); }/*from w ww .ja v a2 s . c o m*/ int articleId = param.toInt(); setupComponents(articleId); }
From source file:cz.zcu.kiv.eegdatabase.wui.ui.data.AddDataFilePage.java
License:Apache License
public AddDataFilePage(PageParameters parameters) { StringValue stringValue = parameters.get(DEFAULT_PARAM_ID); if (stringValue.isNull() || stringValue.isEmpty()) { throw new RestartResponseAtInterceptPageException(ListExperimentsPage.class); }//from ww w. j av a 2s .c o m int experimentId = stringValue.toInt(); setPageTitle(ResourceUtils.getModel("pageTitle.addDataFile")); add(new ButtonPageMenu("leftMenu", ExperimentsPageLeftMenu.values())); setupComponents(experimentId); }
From source file:cz.zcu.kiv.eegdatabase.wui.ui.data.DataFileDetailPage.java
License:Apache License
private int parseParameters(PageParameters parameters) { StringValue value = parameters.get(BasePage.DEFAULT_PARAM_ID); if (value.isNull() || value.isEmpty()) throw new RestartResponseAtInterceptPageException(EEGDataBaseApplication.get().getHomePage()); return value.toInt(); }
From source file:cz.zcu.kiv.eegdatabase.wui.ui.experiments.ExperimentFormPage.java
License:Apache License
private int parseParameters(PageParameters parameters) { StringValue value = parameters.get(BasePage.DEFAULT_PARAM_ID); if (value.isNull() || value.isEmpty()) throw new RestartResponseAtInterceptPageException(EEGDataBaseApplication.get().getHomePage()); return value.toInt(); }
From source file:cz.zcu.kiv.eegdatabase.wui.ui.experiments.ExperimentsPackageDownloadPage.java
License:Apache License
public ExperimentsPackageDownloadPage(PageParameters parameters) { StringValue packageIdValue = parameters.get(DEFAULT_PARAM_ID); if (packageIdValue.isNull() || packageIdValue.isEmpty()) throw new RestartResponseAtInterceptPageException(ListExperimentsByPackagePage.class); else//from w w w. jav a 2s . co m setupComponents(packageIdValue.toInt()); }