Search in sources :

Example 1 with SearchPanel

use of com.evolveum.midpoint.web.component.search.SearchPanel in project midpoint by Evolveum.

the class MultipleAssignmentSelector method initSearchPanel.

private void initSearchPanel() {
    final Form searchForm = new Form(ID_SEARCH_FORM);
    add(searchForm);
    searchForm.setOutputMarkupId(true);
    SearchPanel search = new SearchPanel(ID_SEARCH, (IModel) searchModel, false) {

        @Override
        public void searchPerformed(ObjectQuery query, AjaxRequestTarget target) {
            MultipleAssignmentSelector.this.searchPerformed(query, target);
        }
    };
    searchForm.add(search);
}
Also used : AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) Form(org.apache.wicket.markup.html.form.Form) SearchPanel(com.evolveum.midpoint.web.component.search.SearchPanel)

Example 2 with SearchPanel

use of com.evolveum.midpoint.web.component.search.SearchPanel in project midpoint by Evolveum.

the class AssignmentCatalogPanel method initSearchPanel.

private void initSearchPanel(WebMarkupContainer headerPanel) {
    final Form searchForm = new Form(ID_SEARCH_FORM);
    headerPanel.add(searchForm);
    searchForm.add(new VisibleEnableBehaviour() {

        public boolean isVisible() {
            return !isCatalogOidEmpty() && !AssignmentViewType.USER_TYPE.equals(getRoleCatalogStorage().getViewType());
        }
    });
    searchForm.setOutputMarkupId(true);
    SearchPanel search = new SearchPanel(ID_SEARCH, (IModel) searchModel, false) {

        private static final long serialVersionUID = 1L;

        @Override
        public void searchPerformed(ObjectQuery query, AjaxRequestTarget target) {
            AssignmentCatalogPanel.this.searchPerformed(query, target);
        }
    };
    searchForm.add(search);
}
Also used : AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) Form(org.apache.wicket.markup.html.form.Form) SearchPanel(com.evolveum.midpoint.web.component.search.SearchPanel) VisibleEnableBehaviour(com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour)

Example 3 with SearchPanel

use of com.evolveum.midpoint.web.component.search.SearchPanel in project midpoint by Evolveum.

the class AbstractShoppingCartTabPanel method initSearchPanel.

private void initSearchPanel(WebMarkupContainer shoppingCartContainer) {
    final Form searchForm = new MidpointForm(ID_SEARCH_FORM);
    searchForm.setOutputMarkupId(true);
    IModel<Search> searchModel = Model.of(getRoleCatalogStorage().getSearch() != null ? getRoleCatalogStorage().getSearch() : createSearch());
    SearchPanel search = new SearchPanel(ID_SEARCH, searchModel, false) {

        private static final long serialVersionUID = 1L;

        @Override
        public void searchPerformed(AjaxRequestTarget target) {
            AbstractShoppingCartTabPanel.this.searchPerformed(target);
        }
    };
    getRoleCatalogStorage().setSearch(searchModel.getObject());
    searchForm.add(search);
    shoppingCartContainer.add(searchForm);
}
Also used : AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) Form(org.apache.wicket.markup.html.form.Form) MidpointForm(com.evolveum.midpoint.web.component.form.MidpointForm) SearchPanel(com.evolveum.midpoint.web.component.search.SearchPanel) Search(com.evolveum.midpoint.web.component.search.Search) MidpointForm(com.evolveum.midpoint.web.component.form.MidpointForm)

Aggregations

SearchPanel (com.evolveum.midpoint.web.component.search.SearchPanel)3 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)3 Form (org.apache.wicket.markup.html.form.Form)3 MidpointForm (com.evolveum.midpoint.web.component.form.MidpointForm)1 Search (com.evolveum.midpoint.web.component.search.Search)1 VisibleEnableBehaviour (com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour)1