ItEr37S13CUAsignacionMateriaisAPedidoItEr36S15: Unselect categories in search shows all materials

This commit is contained in:
Diego Pino Garcia 2009-12-08 13:34:16 +01:00 committed by Javier Moran Rua
parent 5c9a0963f0
commit d0ce2f5d35
2 changed files with 15 additions and 4 deletions

View file

@ -290,11 +290,21 @@ public class AssignedMaterialsToOrderElementController extends
return result;
}
public void clearSelection(Tree tree) {
tree.clearSelection();
public void clearSelectionCategoriesTree() {
categoriesTree.clearSelection();
Util.reloadBindings(gridMaterials);
}
public void clearSelectionAllCategoriesTree() {
allCategoriesTree.clearSelection();
retrieveAllMaterials();
Util.reloadBindings(lbFoundMaterials);
}
private void retrieveAllMaterials() {
assignedMaterialsToOrderElementModel.searchMaterials("", null);
}
public MaterialCategoryRenderer getMaterialCategoryRenderer() {
return new MaterialCategoryRenderer();
}

View file

@ -41,7 +41,7 @@
<panel title="${i18n:_('Categories')}" border="normal">
<panelchildren>
<toolbarbutton style="text-decoration: none" label="${i18n:_('Unselect')}"
onClick="assignedMaterialsController.clearSelection(categoriesTree)" />
onClick="assignedMaterialsController.clearSelectionCategoriesTree()" />
<tree id="categoriesTree"
fixedLayout="false"
width="280px" rows="10" vflex="true" multiple="false"
@ -120,7 +120,8 @@
<vbox>
<panel title="${i18n:_('Categories')}" border="normal">
<panelchildren>
<toolbarbutton style="text-decoration: none" label="${i18n:_('Unselect')}" onClick="allCategoriesTree.clearSelection()" />
<toolbarbutton style="text-decoration: none" label="${i18n:_('Unselect')}"
onClick="assignedMaterialsController.clearSelectionAllCategoriesTree()" />
<tree id="allCategoriesTree"
width="280px" rows="10" vflex="true" multiple="false">
<treecols>