Changeset 6456 for vlo/branches/vlo-3.3-oeaw/vlo-web-app/src/main/java/eu/clarin/cmdi/vlo/wicket/panels/search/FacetPanel.java
- Timestamp:
- 08/14/15 12:04:16 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vlo/branches/vlo-3.3-oeaw/vlo-web-app/src/main/java/eu/clarin/cmdi/vlo/wicket/panels/search/FacetPanel.java
r6431 r6456 81 81 82 82 final boolean valuesSelected = !getModelObject().getFacetValues().isEmpty(); 83 //show both for multi values 84 facetValuesPanel.setVisible(!valuesSelected); 83 facetValuesPanel.setVisible(true); 85 84 selectedFacetPanel.setVisible(valuesSelected); 86 85 … … 105 104 public void onValuesSelected(String facet, FacetSelection value, AjaxRequestTarget target) { 106 105 // A value has been selected on this facet's panel, update the model! 107 FacetPanel.this.getModelObject().getSelection().selectValues(facet, value); 106 FacetPanel.this.getModelObject().getSelection().addNewFacetValue(facet, value); 107 //FacetPanel.this.getModelObject().getSelection().selectValues(facet, value); 108 108 if (target != null) { 109 109 // reload entire page for now … … 121 121 122 122 // Values have been removed, calculate remainder 123 123 124 final FacetSelection facetSelection = selection.getSelectionValues(facet); 124 final Collection<String> currentSelection = facetSelection.getValues();125 final Collection<String> newSelection = new HashSet<String>(currentSelection);126 newSelection.removeAll(valuesRemoved);125 // final Collection<String> currentSelection = facetSelection.getValues(); 126 // final Collection<String> newSelection = new HashSet<String>(currentSelection); 127 // newSelection.removeAll(valuesRemoved); 127 128 128 129 // Update model (keep selection type) 129 selection.selectValues(facet, new FacetSelection(facetSelection.getSelectionType(), newSelection)); 130 // selection.selectValues(facet, new FacetSelection(facetSelection.getSelectionType(), newSelection)); 131 132 FacetSelection fSelToRemove = new FacetSelection(facetSelection.getSelectionType(), valuesRemoved); 133 selection.removeFacetValue(facet, fSelToRemove); 130 134 131 135 // collapse after removal
Note: See TracChangeset
for help on using the changeset viewer.