List of usage examples for org.apache.wicket.util.string StringValue isNull
public boolean isNull()
From source file:cz.zcu.kiv.eegdatabase.wui.ui.lists.form.PersonOptParamFormPage.java
License:Apache License
public PersonOptParamFormPage(PageParameters parameters) { StringValue groupParam = parameters.get(PageParametersUtils.GROUP_PARAM); StringValue personParam = parameters.get(DEFAULT_PARAM_ID); if (groupParam.isNull() || groupParam.isEmpty()) throw new RestartResponseAtInterceptPageException(ListPersonOptParamPage.class); add(new ButtonPageMenu("leftMenu", ListsLeftPageMenu.values())); if (personParam.isNull() || personParam.isEmpty()) setupAddComponents(groupParam.toInt()); else// w w w . ja v a2s .c o m setupEditComponents(groupParam.toInt(), personParam.toInt()); }
From source file:cz.zcu.kiv.eegdatabase.wui.ui.lists.form.SoftwareFormPage.java
License:Apache License
public SoftwareFormPage(PageParameters parameters) { StringValue groupParam = parameters.get(PageParametersUtils.GROUP_PARAM); StringValue softwareParam = parameters.get(DEFAULT_PARAM_ID); if (groupParam.isNull() || groupParam.isEmpty()) throw new RestartResponseAtInterceptPageException(ListSoftwareDefinitionsPage.class); add(new ButtonPageMenu("leftMenu", ListsLeftPageMenu.values())); if (softwareParam.isNull() || softwareParam.isEmpty()) setupAddComponents(groupParam.toInt()); else//w ww .j a v a 2 s . c o m setupEditComponents(groupParam.toInt(), softwareParam.toInt()); }
From source file:cz.zcu.kiv.eegdatabase.wui.ui.lists.form.WeatherFormPage.java
License:Apache License
public WeatherFormPage(PageParameters parameters) { StringValue groupParam = parameters.get(PageParametersUtils.GROUP_PARAM); StringValue weatherParam = parameters.get(DEFAULT_PARAM_ID); if (groupParam.isNull() || groupParam.isEmpty()) throw new RestartResponseAtInterceptPageException(ListWeatherDefinitiosPage.class); add(new ButtonPageMenu("leftMenu", ListsLeftPageMenu.values())); if (weatherParam.isNull() || weatherParam.isEmpty()) setupAddComponents(groupParam.toInt()); else//w w w. j ava 2 s. co m setupEditComponents(groupParam.toInt(), weatherParam.toInt()); }
From source file:cz.zcu.kiv.eegdatabase.wui.ui.order.ListOrderPage.java
License:Apache License
public ListOrderPage(PageParameters parameters) { StringValue personIdParam = parameters.get(DEFAULT_PARAM_ID); if (personIdParam.isEmpty() || personIdParam.isNull()) { throw new RestartResponseAtInterceptPageException(HomePage.class); } else {/*from ww w . j a va2s . co m*/ int personId = personIdParam.toInt(); setupComponents(personId, false); } }
From source file:cz.zcu.kiv.eegdatabase.wui.ui.order.OrderDetailPage.java
License:Apache License
public OrderDetailPage(PageParameters parameters) { StringValue orderIdParam = parameters.get(DEFAULT_PARAM_ID); if (orderIdParam.isEmpty() || orderIdParam.isNull()) { throw new RestartResponseAtInterceptPageException(HomePage.class); } else {//from w w w .ja v a 2s. c o m int orderId = orderIdParam.toInt(); setupComponents(orderId); } }
From source file:cz.zcu.kiv.eegdatabase.wui.ui.people.form.PersonAddParamFormPage.java
License:Apache License
public PersonAddParamFormPage(PageParameters parameters) { StringValue paramId = parameters.get(DEFAULT_PARAM_ID); if (paramId.isNull() || paramId.isEmpty()) throw new RestartResponseAtInterceptPageException(ListPersonPage.class); setPageTitle(ResourceUtils.getModel("pageTitle.addPersonOptionalParameter")); add(new ButtonPageMenu("leftMenu", PersonPageLeftMenu.values())); PersonOptParamVal param = new PersonOptParamVal(); param.setPerson(personFacade.getPersonForDetail(paramId.toInt())); add(new PersonAddParamForm("form", new Model<PersonOptParamVal>(param), facade, getFeedback())); }
From source file:cz.zcu.kiv.eegdatabase.wui.ui.people.form.PersonFormPage.java
License:Apache License
public PersonFormPage(PageParameters parameters) throws IOException { StringValue paramId = parameters.get(DEFAULT_PARAM_ID); if (paramId.isNull() || paramId.isEmpty()) throw new RestartResponseAtInterceptPageException(ListPersonPage.class); setPageTitle(ResourceUtils.getModel("pageTitle.editPerson")); add(new Label("title", ResourceUtils.getModel("pageTitle.editPerson"))); add(new ButtonPageMenu("leftMenu", PersonPageLeftMenu.values())); Person person = facade.getPersonForDetail(paramId.toInt()); if (!securityFacade.userCanEditPerson(person.getPersonId())) throw new RestartResponseAtInterceptPageException(PersonDetailPage.class, PageParametersUtils.getDefaultPageParameters(person.getPersonId())); add(new PersonForm("form", new Model<Person>(person), educationFacade, facade, getFeedback())); }
From source file:cz.zcu.kiv.eegdatabase.wui.ui.scenarios.ListScenariosPage.java
License:Apache License
public ListScenariosPage(PageParameters parameters) { StringValue paramValue = parameters.get(MY_SCENARIOS_PARAM); if (paramValue.isNull() || paramValue.isEmpty()) { throw new RestartResponseAtInterceptPageException(ListScenariosPage.class); } else {/*from w w w . ja v a 2 s . com*/ setPageTitle(ResourceUtils.getModel("menuItem.myScenarios")); add(new Label("title", ResourceUtils.getModel("menuItem.myScenarios"))); setupComponents(new MyScenarioDataProvider(scenariosFacade)); } }
From source file:cz.zcu.kiv.eegdatabase.wui.ui.scenarios.ScenarioDetailPage.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()); }/*from w w w . j a v a 2 s . c o m*/ return value.toInt(); }
From source file:cz.zcu.kiv.eegdatabase.wui.ui.search.SearchPage.java
License:Apache License
public SearchPage(PageParameters params) { setPageTitle(ResourceUtils.getModel("title.page.search")); StringValue searchString = params.get("searchString"); if (searchString.isEmpty() || searchString.isNull()) { isSearchStringEmpty = true;//from www. j a v a2 s .c o m } ResultCategory category = ResultCategory.getCategory(params.get("category").toString()); SearchPanel searchPanel = new PageSearchPanel("searchPanel", searchString); SearchResultPanel searchResultPanel = new SearchResultPanel("resultPanel", searchString, category) { @Override public boolean isVisible() { return !isSearchStringEmpty; } }; add(searchPanel); add(searchResultPanel); add(new FeedbackPanel("feedback")); }