code: public void removeTaggedComponent(final String tag) {
  		TemplateModel model = getOrCreateComponentModel();
  		if (model.taggedComponents != null) {
  			WComponent component = model.taggedComponents.remove(tag);
  			if (model.taggedComponents.isEmpty()) {
  				model.taggedComponents = null;
  			}
  			if (component != null) {
  				remove(component);
  			}
  		}
  	}
docs: Remove a tagged component by its tag.
  
  @param tag the tag of the component to remove