system/src/sc/lang/html/Element.java
public String allocUniqueId(String name, boolean clientServerSpecific) {
      String suffix = clientServerSpecific ? "_s" : null;
      if (suffix != null)
         name = name + suffix;
      if (idSpaces == null) {
         Element rootElement = getRootTag();
         if (rootElement.idSpaces == null)
            rootElement.idSpaces = new HashMap<String,Integer>();
         idSpaces = rootElement.idSpaces;
      }
      Integer cur = idSpaces.get(name);
      if (cur == null) {
         idSpaces.put(name, cur = Integer.valueOf(1));
         return name;
      }
      else {
         idSpaces.put(name, cur + 1);
         return name + (suffix == null ? "_" : "") + cur;
      }
   }
// It uses the idSpaces map stored on the root tag.
It uses the idSpaces map stored on the root tag.
It uses the idSpaces map stored on the root tag .
public String allocUniqueId(String name, boolean clientServerSpecific) {
      String suffix = clientServerSpecific ? "_s" : null;
      if (suffix != null)
         name = name + suffix;
      if (idSpaces == null) {
         Element rootElement = getRootTag();
         if (rootElement.idSpaces == null)
            rootElement.idSpaces = new HashMap<String,Integer>();
         idSpaces = rootElement.idSpaces;
      }
      Integer cur = idSpaces.get(name);
      if (cur == null) {
         idSpaces.put(name, cur = Integer.valueOf(1));
         return name;
      }
      else {
         idSpaces.put(name, cur + 1);
         return name + (suffix == null ? "_" : "") + cur;
      }
   }
public String allocUniqueId ( String name , boolean clientServerSpecific ) { String suffix = clientServerSpecific ? "_s" : null ; if ( suffix != null ) name = name + suffix ; if ( idSpaces == null ) { Element rootElement = getRootTag ( ) ; if ( rootElement . idSpaces == null ) rootElement . idSpaces = new HashMap < String , Integer > ( ) ; idSpaces = rootElement . idSpaces ; } Integer cur = idSpaces . get ( name ) ; if ( cur == null ) { idSpaces . put ( name , cur = Integer . valueOf ( 1 ) ) ; return name ; } else { idSpaces . put ( name , cur + 1 ) ; return name + ( suffix == null ? "_" : "" ) + cur ; } }
It uses the idSpaces map stored on the root tag.
It uses the idSpaces map stored on the root tag .