Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'refs/remotes/origin/master'
- Loading branch information
Showing
193 changed files
with
5,603 additions
and
4,180 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76 changes: 76 additions & 0 deletions
76
...-gui/src/main/java/com/evolveum/midpoint/web/component/search/BasicSearchFilterModel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
/* | ||
* Copyright (c) 2010-2019 Evolveum and contributors | ||
* | ||
* This work is dual-licensed under the Apache License 2.0 | ||
* and European Union Public License. See LICENSE file for details. | ||
*/ | ||
package com.evolveum.midpoint.web.component.search; | ||
|
||
import com.evolveum.midpoint.gui.api.page.PageBase; | ||
import com.evolveum.midpoint.gui.impl.factory.panel.SearchFilterTypeModel; | ||
import com.evolveum.midpoint.prism.query.ObjectFilter; | ||
import com.evolveum.midpoint.util.exception.SchemaException; | ||
import com.evolveum.midpoint.util.logging.LoggingUtils; | ||
import com.evolveum.midpoint.util.logging.Trace; | ||
import com.evolveum.midpoint.util.logging.TraceManager; | ||
import com.evolveum.midpoint.web.component.search.filter.BasicSearchFilter; | ||
import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType; | ||
import com.evolveum.prism.xml.ns._public.query_3.SearchFilterType; | ||
|
||
import org.apache.commons.lang3.StringUtils; | ||
import org.apache.wicket.model.IModel; | ||
|
||
/** | ||
* @author honchar | ||
*/ | ||
public class BasicSearchFilterModel<O extends ObjectType> implements IModel<BasicSearchFilter<O>> { | ||
|
||
private static final Trace LOGGER = TraceManager.getTrace(SearchFilterTypeModel.class); | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
private IModel<SearchFilterType> baseModel; | ||
private PageBase pageBase; | ||
private Class<O> type; | ||
private BasicSearchFilter<O> basicSearchFilter; | ||
|
||
public BasicSearchFilterModel(IModel<SearchFilterType> valueWrapper, Class<O> type, PageBase pageBase) { | ||
this.baseModel = valueWrapper; | ||
this.pageBase = pageBase; | ||
this.type = type; | ||
} | ||
|
||
@Override | ||
public void detach() { | ||
// TODO Auto-generated method stub | ||
|
||
} | ||
|
||
@Override | ||
public BasicSearchFilter<O> getObject() { | ||
if (basicSearchFilter == null){ | ||
basicSearchFilter = loadBasicSearchFilter(); | ||
} | ||
return basicSearchFilter; | ||
} | ||
|
||
private BasicSearchFilter<O> loadBasicSearchFilter(){ | ||
try { | ||
// SearchFilterType value = baseModel.getObject(); | ||
// if (value == null) { | ||
// return new BasicSearchFilter<O>(pageBase.getPrismContext(), null, type); | ||
// } | ||
|
||
ObjectFilter objectFilter = pageBase.getPrismContext().getQueryConverter().createObjectFilter(type, baseModel.getObject()); | ||
return new BasicSearchFilter<O>(pageBase.getPrismContext(), objectFilter, type); | ||
} catch (SchemaException e) { | ||
// TODO handle | ||
LoggingUtils.logUnexpectedException(LOGGER, "Cannot serialize filter", e); | ||
} | ||
return null; | ||
} | ||
|
||
@Override | ||
public void setObject(BasicSearchFilter<O> object) { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
...i/src/main/java/com/evolveum/midpoint/web/component/search/ReferenceValueSearchPanel.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<!-- | ||
~ Copyright (c) 2010-2020 Evolveum | ||
~ | ||
~ This work is dual-licensed under the Apache License 2.0 | ||
~ and European Union Public License. See LICENSE file for details. | ||
--> | ||
|
||
<!DOCTYPE html> | ||
<html xmlns:wicket="http://wicket.apache.org"> | ||
<wicket:panel> | ||
<div> | ||
<div class="col-md-10" wicket:id="referenceValueTextField"/> | ||
<div class="col-sm-1"> | ||
<a wicket:id="editReferenceButton" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown"> | ||
<i class="fa fa-edit fa-lg"/> | ||
</a> | ||
</div> | ||
</div> | ||
|
||
<div wicket:id="refPopover" class="popover bottom"> | ||
<div class="popover-content" wicket:id="refPopoverBody"> | ||
<div wicket:id="refPopoverPanel" class="input-group input-group-sm"> | ||
</div> | ||
</div> | ||
</div> | ||
</wicket:panel> | ||
</html> |
Oops, something went wrong.