/** * Generate a specialized name based on the callers name. This is typically * used in situations where two namespaces are being merged together so that * each namespace is prepended with the current scope's name. * * @param name * A locally unique name that distinguished this element from * among it's siblings. */ public String generateName(String name) { return combine(componentName, name); }
/** * Generate a unique id with a sub name. Like the other form of generateID * this will append another sub-name. This is typically used for when * duplicate names are used but further identification is needed for * globally unique names. * * @param application * The application of this element, typically this is the element * type that is being identified. Such as p, div, table, field, * etc... * @param name * A locally unique name that distinguished this element from * among its siblings. * @param subName * An additional name to the original name to further identify it * in cases when just the name alone does not accomplish this. * @return */ public String generateID(String application, String name, String subName) { return combine(componentName, application, name, subName); }
/** * Generate a unique id based upon the locally unique name and the * application. * * The format of the unique id typically is: * * <componentName> dot <application> dot <unique name> * * typically the componentName is the Java class path of the Wing component. * * @param application * The application of this element, typically this is the element * type that is being identified. Such as p, div, table, field, * etc... * @param name * A locally unique name that distinguished this element from * among its siblings. * @return A globally unique identifier. */ public String generateID(String application, String name) { return combine(componentName, application, name); }