List of usage examples for org.apache.wicket.util.string StringValue isNull
public boolean isNull()
From source file:cz.zcu.kiv.eegdatabase.wui.ui.experiments.ListExperimentsPage.java
License:Apache License
private String parseParameters(PageParameters parameters) { StringValue value = parameters.get(BasePage.DEFAULT_PARAM_ID); if (value.isNull() || value.isEmpty()) throw new RestartResponseAtInterceptPageException(EEGDataBaseApplication.get().getHomePage()); return value.toString(); }
From source file:cz.zcu.kiv.eegdatabase.wui.ui.experiments.metadata.MetadataFormPage.java
License:Apache License
public MetadataFormPage(final PageParameters parameters) { setPageTitle(ResourceUtils.getModel("pageTitle.metadata.new")); add(new ButtonPageMenu("leftMenu", ExperimentsPageLeftMenu.values())); StringValue value = parameters.get(DEFAULT_PARAM_ID); if (value.isEmpty() || value.isNull()) { throw new RestartResponseAtInterceptPageException(ListTemplatePage.class); }/*from w ww. j a v a 2 s .co m*/ int experimentId = value.toInt(); Experiment exp = expFacade.getExperimentForDetail(experimentId); add(new MetadataForm("metadata-form", new Model<Section>(exp.getElasticExperiment().getMetadata()), experimentId)); getFeedback().setFilter(new ComponentFeedbackMessageFilter(this)); }
From source file:cz.zcu.kiv.eegdatabase.wui.ui.experiments.metadata.template.TemplateFormPage.java
License:Apache License
public TemplateFormPage(PageParameters parameters) { IModel<String> title = ResourceUtils.getModel("pageTitle.template.edit"); setPageTitle(title);/* w w w .ja v a 2s.c o m*/ add(new Label("title", title)); add(new ButtonPageMenu("leftMenu", ExperimentsPageLeftMenu.values())); StringValue value = parameters.get(DEFAULT_PARAM_ID); if (value.isEmpty() || value.isNull()) { throw new RestartResponseAtInterceptPageException(ListTemplatePage.class); } int templateId = value.toInt(); Template template = facade.read(templateId); Reader reader = new Reader(); try { Section section = reader .load(new ByteInputStream(template.getTemplate(), template.getTemplate().length)); section.setName(template.getName()); add(new TemplateForm("template-panel", new Model<Section>(section), templateId)); } catch (Exception e) { log.error(e.getMessage(), e); throw new RestartResponseAtInterceptPageException(ListTemplatePage.class); } }
From source file:cz.zcu.kiv.eegdatabase.wui.ui.groups.form.AddMemberToGroupPage.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(ListResearchGroupsPage.class); return value; }
From source file:cz.zcu.kiv.eegdatabase.wui.ui.history.HistoryPage.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(HistoryPage.class); return value; }
From source file:cz.zcu.kiv.eegdatabase.wui.ui.licenses.LicenseDetailPage.java
License:Open Source License
public LicenseDetailPage(PageParameters parameters) { StringValue licenseId = parameters.get(DEFAULT_PARAM_ID); if (licenseId.isNull() || licenseId.isEmpty()) throw new RestartResponseAtInterceptPageException(AdminManageLicensesPage.class); setupPageComponents(licenseId.toInteger()); }
From source file:cz.zcu.kiv.eegdatabase.wui.ui.lists.form.ArtifactFormPage.java
License:Apache License
public ArtifactFormPage(PageParameters parameters) { StringValue groupParam = parameters.get(PageParametersUtils.GROUP_PARAM); StringValue artifactParam = parameters.get(DEFAULT_PARAM_ID); if (groupParam.isNull() || groupParam.isEmpty()) throw new RestartResponseAtInterceptPageException(ListArtifactDefinitionsPage.class); add(new ButtonPageMenu("leftMenu", ListsLeftPageMenu.values())); if (artifactParam.isNull() || artifactParam.isEmpty()) setupAddComponents(groupParam.toInt()); else//from w w w . ja v a 2 s .c o m setupEditComponents(groupParam.toInt(), artifactParam.toInt()); }
From source file:cz.zcu.kiv.eegdatabase.wui.ui.lists.form.ExperimentOptParamFormPage.java
License:Apache License
public ExperimentOptParamFormPage(PageParameters parameters) { StringValue groupParam = parameters.get(PageParametersUtils.GROUP_PARAM); StringValue experimentParam = parameters.get(DEFAULT_PARAM_ID); if (groupParam.isNull() || groupParam.isEmpty()) throw new RestartResponseAtInterceptPageException(ListExperimentOptParamPage.class); add(new ButtonPageMenu("leftMenu", ListsLeftPageMenu.values())); if (experimentParam.isNull() || experimentParam.isEmpty()) setupAddComponents(groupParam.toInt()); else//from ww w. j a v a 2 s .com setupEditComponents(groupParam.toInt(), experimentParam.toInt()); }
From source file:cz.zcu.kiv.eegdatabase.wui.ui.lists.form.FileMetadataFormPage.java
License:Apache License
public FileMetadataFormPage(PageParameters parameters) { StringValue groupParam = parameters.get(PageParametersUtils.GROUP_PARAM); StringValue fileMetadataParam = parameters.get(DEFAULT_PARAM_ID); if (groupParam.isNull() || groupParam.isEmpty()) throw new RestartResponseAtInterceptPageException(ListFileMetadataPage.class); add(new ButtonPageMenu("leftMenu", ListsLeftPageMenu.values())); if (fileMetadataParam.isNull() || fileMetadataParam.isEmpty()) setupAddComponents(groupParam.toInt()); else//w w w . j av a2 s . co m setupEditComponents(groupParam.toInt(), fileMetadataParam.toInt()); }
From source file:cz.zcu.kiv.eegdatabase.wui.ui.lists.form.HardwareFormPage.java
License:Apache License
public HardwareFormPage(PageParameters parameters) { StringValue groupParam = parameters.get(PageParametersUtils.GROUP_PARAM); StringValue hardwareParam = parameters.get(DEFAULT_PARAM_ID); if (groupParam.isNull() || groupParam.isEmpty()) throw new RestartResponseAtInterceptPageException(ListHardwareDefinitionsPage.class); add(new ButtonPageMenu("leftMenu", ListsLeftPageMenu.values())); if (hardwareParam.isNull() || hardwareParam.isEmpty()) setupAddComponents(groupParam.toInt()); else// w w w . ja v a 2 s. c o m setupEditComponents(groupParam.toInt(), hardwareParam.toInt()); }