code: void registerInContext() {
  		if (!ConfigurationProperties.getCheckDuplicateIds()) {
  			return;
  		}
  
  		// Register Component if it has an ID name set
  		if (getIdName() != null) {
  			// Find parent context
  			NamingContextable context = WebUtilities.getParentNamingContext(this);
  
  			if (context == null) {
  				// If this is the top context, then register itself
  				if (WebUtilities.isActiveNamingContext(this)) {
  					this.registerId(this);
  				} else {
  					LOG.warn("Component with id name [" + getIdName()
  							+ "] is not in a naming context and cannot be verified for duplicate id.");
  				}
  				return;
  			}
  			// Assume context is AbstractWComponent
  			((AbstractWComponent) context).registerId(this);
  		}
  	}
docs: Register this component's ID in its naming context.