code: public static String getClientWindowId(FacesContext context) {
  		String result = null;
  		final String clientWindowIdCounterKey = "com.sun.faces.util.ClientWindowCounterKey";
  		Map<Object, Object> contextAttrs = context.getAttributes();
  		Integer counter = (Integer) contextAttrs.get(clientWindowIdCounterKey);
  		if (null == counter) {
  			counter = Integer.valueOf(0);
  		}
  
  		char sep = UINamingContainer.getSeparatorChar(context);
  		result = context.getViewRoot().getContainerClientId(context) + sep + ResponseStateManager.CLIENT_WINDOW_PARAM
  				+ sep + counter;
  		contextAttrs.put(clientWindowIdCounterKey, ++counter);
  
  		return result;
  	}
docs: Copied from com.sun.faces.util.Util, Mojarra 2.2.7