List of usage examples for org.apache.wicket.model StringResourceModel StringResourceModel
public StringResourceModel(final String resourceKey, final IModel<?> model)
From source file:ar.edu.unq.dopplereffect.presentation.panel.upload.UploadPanel.java
License:Apache License
public UploadPanel(final String id, final SearchModel<T> searchModel) { super(id, new Model<String>("")); this.searchModel = searchModel; // crea el directorio si no existe uploadFolder.mkdirs();/* w w w. ja va 2s . c o m*/ FeedbackPanel uploadFeedback = new FeedbackPanel("uploadFeedback"); uploadFeedback.setOutputMarkupId(true); this.add(uploadFeedback); this.setDialogSelectedTypeToExport(new DialogSelectedTypeToExport("selectType", this)); this.getDialogSelectedTypeToExport() .setTitle(new StringResourceModel("selectType.title", new Model<String>())); this.add(this.getDialogSelectedTypeToExport()); this.addButtons(); }
From source file:au.org.theark.study.web.component.address.form.SearchForm.java
License:Open Source License
/** * /*w w w . ja v a2 s. co m*/ * @param id * @param cpmModel * @param arkCrudContainerVO * @param feedBackPanel * @param listView */ public SearchForm(String id, CompoundPropertyModel<AddressVO> cpmModel, ArkCrudContainerVO arkCrudContainerVO, FeedbackPanel feedBackPanel, PageableListView<Address> listView) { super(id, cpmModel, feedBackPanel, arkCrudContainerVO); this.arkCrudContainerVO = arkCrudContainerVO; this.feedbackPanel = feedBackPanel; this.listView = listView; Label generalTextLbl = new Label("generalLbl", new StringResourceModel("search.panel.text", new Model())); add(generalTextLbl); resetButton.setVisible(false); searchButton.setVisible(false); // initialiseSearchForm(); // addSearchComponentsToForm(); // TODO: Use Subject UID when they are not just contacts Long sessionPersonId = (Long) SecurityUtils.getSubject().getSession() .getAttribute(au.org.theark.core.Constants.PERSON_CONTEXT_ID); disableSearchForm(sessionPersonId, "There is no subject or contact in context. Please select a Subject or Contact."); }
From source file:au.org.theark.study.web.component.attachments.form.SearchForm.java
License:Open Source License
public SearchForm(String id, CompoundPropertyModel<SubjectVO> model, ArkCrudContainerVO arkCrudContainerVO, FeedbackPanel feedBackPanel, PageableListView<SubjectFile> listView) { super(id, model, feedBackPanel, arkCrudContainerVO); this.cpmModel = model; this.pageableListView = listView; this.arkCrudContainerVO = arkCrudContainerVO; Label generalTextLbl = new Label("generalLbl", new StringResourceModel("search.panel.text", new Model<String>())); add(generalTextLbl);//from w w w. ja va2 s .c o m resetButton.setVisible(false); searchButton.setVisible(false); Long sessionPersonId = (Long) SecurityUtils.getSubject().getSession() .getAttribute(au.org.theark.core.Constants.PERSON_CONTEXT_ID); disableSearchForm(sessionPersonId, au.org.theark.core.Constants.MESSAGE_NO_SUBJECT_IN_CONTEXT); }
From source file:au.org.theark.study.web.component.consent.form.SearchForm.java
License:Open Source License
public SearchForm(String id, PageableListView<Consent> listView, FeedbackPanel feedBackPanel, CompoundPropertyModel<ConsentVO> model, ArkCrudContainerVO arkCrudContainerVO) { super(id, model, feedBackPanel, arkCrudContainerVO); this.cpmModel = model; this.pageableListView = listView; // initialiseSearchForm(); // addSearchComponentsToForm(); Label generalTextLbl = new Label("generalLbl", new StringResourceModel("search.panel.text", new Model<String>())); add(generalTextLbl);//from w w w .j a v a 2 s. c o m resetButton.setVisible(false); searchButton.setVisible(false); Long sessionPersonId = (Long) SecurityUtils.getSubject().getSession() .getAttribute(au.org.theark.core.Constants.PERSON_CONTEXT_ID); disableSearchForm(sessionPersonId, au.org.theark.core.Constants.MESSAGE_NO_SUBJECT_IN_CONTEXT); }
From source file:au.org.theark.study.web.component.correspondence.form.SearchForm.java
License:Open Source License
public SearchForm(String id, CompoundPropertyModel<CorrespondenceVO> model, PageableListView<Correspondences> listView, FeedbackPanel feedBackPanel, ArkCrudContainerVO arkCrudContainerVO) { super(id, model, feedBackPanel, arkCrudContainerVO); this.pageableListView = listView; Label generalTextLbl = new Label("generalLbl", new StringResourceModel("search.panel.text", new Model())); add(generalTextLbl);/*from www . ja v a 2s.co m*/ // initialiseSearchForm();// See Ark-374, if in future we need it uncomment this and uncomment a section of code in the markup resetButton.setVisible(false); searchButton.setVisible(false); Long sessionPersonId = (Long) SecurityUtils.getSubject().getSession() .getAttribute(au.org.theark.core.Constants.PERSON_CONTEXT_ID); disableSearchForm(sessionPersonId, au.org.theark.core.Constants.MESSAGE_NO_SUBJECT_IN_CONTEXT); }
From source file:au.org.theark.study.web.component.phone.form.SearchForm.java
License:Open Source License
public SearchForm(String id, CompoundPropertyModel<PhoneVO> cpmModel, ArkCrudContainerVO arkCrudContainerVO, FeedbackPanel feedBackPanel, PageableListView<Phone> listView) { super(id, cpmModel, feedBackPanel, arkCrudContainerVO); this.arkCrudContainerVO = arkCrudContainerVO; this.feedbackPanel = feedBackPanel; Label generalTextLbl = new Label("generalLbl", new StringResourceModel("search.panel.text", new Model())); add(generalTextLbl);//from w ww . ja va 2s.c o m resetButton.setVisible(false); searchButton.setVisible(false); // initialiseSearchForm(); Long sessionPersonId = (Long) SecurityUtils.getSubject().getSession() .getAttribute(au.org.theark.core.Constants.PERSON_CONTEXT_ID); disableSearchForm(sessionPersonId, "There is no subject or contact in context. Please select a Subject or Contact."); }
From source file:au.org.theark.study.web.component.subject.form.DetailForm.java
License:Open Source License
private void setPreferredEmailContainer() { PersonContactMethod personContactMethod = containerForm.getModelObject().getLinkSubjectStudy().getPerson() .getPersonContactMethod();/* w ww. j ava 2s.com*/ if (personContactMethod != null) { String personContactMethodName = personContactMethod.getName(); if (personContactMethodName.equalsIgnoreCase("EMAIL")) { preferredEmailTxtFld.setRequired(true) .setLabel(new StringResourceModel("subject.preferredEmail.required", null)); } else { preferredEmailTxtFld.setRequired(false); } } }
From source file:com.evolveum.midpoint.gui.api.component.BasePanel.java
License:Apache License
public StringResourceModel createStringResource(String resourceKey, Object... objects) { return new StringResourceModel(resourceKey, this).setModel(null).setDefaultValue(resourceKey) .setParameters(objects);// w w w . j av a2s .c o m // return StringResourceModelMigration.of(resourceKey, this, null, resourceKey, objects); }
From source file:com.evolveum.midpoint.gui.api.page.PageBase.java
License:Apache License
public StringResourceModel createStringResource(String resourceKey, Object... objects) { return new StringResourceModel(resourceKey, this).setModel(new Model<String>()).setDefaultValue(resourceKey) .setParameters(objects);//w ww . j ava 2 s .com }
From source file:com.evolveum.midpoint.gui.api.page.PageBase.java
License:Apache License
@NotNull public static StringResourceModel createStringResourceStatic(Component component, String resourceKey, Object... objects) {/*from w w w. j a va2 s . co m*/ return new StringResourceModel(resourceKey, component).setModel(new Model<String>()) .setDefaultValue(resourceKey).setParameters(objects); }