internal method to find all selections from subItems and sub sub items so we can save those inside our savedInstanceState

@param item       the parent item
@param selections the ArrayList which will be stored in the savedInstanceState
971546
public static <Item extends IItem> void findSubItemSelections(Item item, List<String> selections) {
        if (item instanceof IExpandable && !((IExpandable) item).isExpanded() && ((IExpandable) item).getSubItems() != null) {
            List<Item> subItems = (List<Item>) ((IExpandable<Item, ?>) item).getSubItems();
            for (int i = 0, size = subItems.size(); i < size; i++) {
                Item subItem = subItems.get(i);
                String id = String.valueOf(subItem.getIdentifier());
                if (subItem.isSelected()) {
                    selections.add(id);
                }
                findSubItemSelections(subItem, selections);
            }
        }
    }
1186895
public void setItems(java.util.Collection<Api> items) {
        if (items == null) {
            this.items = null;
            return;
        }

        this.items = new java.util.ArrayList<Api>(items);
    }
978402
protected void openPopup(final A_CmsContextMenuItem item) {

        m_popup.add(item.getSubMenu());
        m_popup.addAutoHidePartner(item.getElement());
        m_popup.setModal(false);
        m_popup.show();

        setSubMenuPosition(item);

        if (m_isFixed) {
            m_popup.setPositionFixed();
        }
    }
733825
private void findSelections(final Request request, final MenuSelectContainer selectContainer,
			final List<MenuItemSelectable> selections) {

		// Don't bother checking disabled or invisible containers
		if (!selectContainer.isVisible()
				|| (selectContainer instanceof Disableable && ((Disableable) selectContainer).isDisabled())) {
			return;
		}

		// Get any selectable children of this container
		List<MenuItemSelectable> selectableItems = getSelectableItems(selectContainer);

		// Now add the selections (if in the request)
		for (MenuItemSelectable selectableItem : selectableItems) {
			// Check if the item is on the request
			if (request.getParameter(selectableItem.getId() + ".selected") != null) {
				selections.add(selectableItem);
				if (SelectionMode.SINGLE.equals(selectContainer.getSelectionMode())) {
					// Only select the first item at this level.
					// We still need to check other levels of the menu for selection.
					break;
				}
			}
		}

		// We need to recurse through and check for other selectable containers
		for (MenuItem item : selectContainer.getMenuItems()) {
			if (item instanceof MenuItemGroup) {
				for (MenuItem groupItem : ((MenuItemGroup) item).getMenuItems()) {
					if (groupItem instanceof MenuSelectContainer) {
						findSelections(request, (MenuSelectContainer) groupItem, selections);
					}
				}
			} else if (item instanceof MenuSelectContainer) {
				findSelections(request, (MenuSelectContainer) item, selections);
			}
		}
	}
791850
public final void set(final int index, @NonNull final AbstractItem item) {
        Condition.INSTANCE.ensureNotNull(item, "The item may not be null");
        AbstractItem replacedItem = items.set(index, item);

        if (replacedItem instanceof Item && ((Item) replacedItem).getIcon() != null) {
            iconCount--;
        } else if (replacedItem instanceof Divider) {
            dividerCount--;
        }

        if (item instanceof Item && ((Item) item).getIcon() != null) {
            iconCount++;
        } else if (item instanceof Divider) {
            dividerCount++;
        }

        rawItems = null;
        notifyOnDataSetChanged();
    }
221963
public void visChanged(VisualizationItem item) {
    for(int i = vlistenerList.size(); --i >= 0;) {
      final VisualizationListener listener = vlistenerList.get(i);
      if(listener != null) {
        listener.visualizationChanged(item);
      }
    }
  }
569074
public void setItem(java.util.Collection<EndpointBatchItem> item) {
        if (item == null) {
            this.item = null;
            return;
        }

        this.item = new java.util.ArrayList<EndpointBatchItem>(item);
    }
592406
private void formatNavDrawerItem(DrawerItem item, boolean selected) {
        if (item instanceof SeperatorDrawerItem || item instanceof SwitchDrawerItem) {
            // not applicable
            return;
        }

        // Get the associated view
        View view = mNavDrawerItemViews.get(item.getId());

        ImageView iconView = (ImageView) view.findViewById(R.id.icon);
        TextView titleView = (TextView) view.findViewById(R.id.title);

        // configure its appearance according to whether or not it's selected
        titleView.setTextColor(selected ?
                mConfig.getItemHighlightColor(mActivity) :
                UIUtils.getColorAttr(mActivity, android.R.attr.textColorPrimary));

        iconView.setColorFilter(selected ?
                mConfig.getItemHighlightColor(mActivity) :
                getResources().getColor(R.color.navdrawer_icon_tint), PorterDuff.Mode.SRC_ATOP);
    }
282980
@Override
    public void itemCacheSetManagedReference(AbstractItem item)
    {
        // Defect 601995
        if (item != null)
        {
            _itemCacheManagedReference = item;
        }
        else
        {
            // If our cache reference is being set to null then 
            // use the new named class instead.
            _itemCacheManagedReference = NULL_CACHE_REF;
        }
    }
285314
public void openWithParents(CmsTreeItem item) {

        if (item != null) {
            item.setOpen(true);
            openWithParents(item.getParentItem());
        }
    }
625083
private SelectItemAndComponent determineSelectedItem(FacesContext context, SelectOneMenu menu, List<SelectItemAndComponent> items, Converter converter) {
		Object submittedValue = menu.getSubmittedValue();
		Object selectedOption;
		if (submittedValue != null) {
			selectedOption = submittedValue;
		} else {
			selectedOption = menu.getValue();
		}

		for (int index = 0; index < items.size(); index++) {
			SelectItemAndComponent option = items.get(index);
			if (option.getSelectItem().isNoSelectionOption()) continue;
			
			Object itemValue = option.getSelectItem().getValue();
			String itemValueAsString = getOptionAsString(context, menu, itemValue, converter);

			Object optionValue;
			if (submittedValue != null) {
				optionValue = itemValueAsString;
			} else {
				optionValue = itemValue;
			}

			if (itemValue != null) {
				if (isSelected(context, menu, selectedOption, optionValue, converter)) {
					return option;
				}
			} 
		}
		return null;
	}
1232647
@When("^I de-select every item on the element on index '(\\d+?)'$")
    public void elementDeSelect(Integer index) {
        Select sel = null;
        sel = new Select(commonspec.getPreviousWebElements().getPreviousWebElements().get(index));

        if (sel.isMultiple()) {
            sel.deselectAll();
        }
    }
1144163
public void setItems(java.util.Collection<Resource> items) {
        if (items == null) {
            this.items = null;
            return;
        }

        this.items = new java.util.ArrayList<Resource>(items);
    }
1238887
private boolean isSelectable(final MenuItem item, final SelectionMode selectionMode) {

		if (!(item instanceof MenuItemSelectable) || !item.isVisible()
				|| (item instanceof Disableable && ((Disableable) item).isDisabled())) {
			return false;
		}

		// SubMenus are only selectable in a column menu type
		if (item instanceof WSubMenu && !MenuType.COLUMN.equals(getType())) {
			return false;
		}

		// Item is specificially set to selectable/unselectable
		Boolean itemSelectable = ((MenuItemSelectable) item).getSelectability();
		if (itemSelectable != null) {
			return itemSelectable;
		}

		// Container has selection turned on
		return SelectionMode.SINGLE.equals(selectionMode) || SelectionMode.MULTIPLE.equals(selectionMode);

	}
988747
public void setItem(java.util.Collection<ActivityResponse> item) {
        if (item == null) {
            this.item = null;
            return;
        }

        this.item = new java.util.ArrayList<ActivityResponse>(item);
    }
1287113
public void addItem (int index, T item)
    {
        if (_items == null) {
            return;
        }
        _items.add(index, item);
    }
101499
public void itemStateChanged(ItemEvent e) {

        ItemSelectable item = e.getItemSelectable();

        if (item == lTable) {
            if (iSelectionStep == SELECT_SOURCE_TABLES) {
                String table    = lTable.getSelectedItem();
                int    selected = ((Integer) e.getItem()).intValue();

                for (int i = 0; i < tTable.size(); i++) {
                    TransferTable t = (TransferTable) tTable.elementAt(i);

                    if (t == null) {
                        continue;
                    }

                    if (i == selected) {
                        saveTable();
                        displayTable(t);
                        updateEnabled(true);
                    }
                }
            }
        } else {

            // it must be a checkbox
            saveTable();
            updateEnabled(true);
        }
    }