/** * Assigns a default containerId of 'container' followed by the instance number. * @return the instance being operated on as part of a Fluent API */ public JQMContainer withContainerId() { setContainerId(generateContainerId()); return this; }
/** * Assigns a default containerId of 'container' followed by the instance number. * @return the instance being operated on as part of a Fluent API */ public JQMContainer withContainerId() { setContainerId(generateContainerId()); return this; }
/** * Assigns a default containerId of 'container' followed by the instance number. * @return the instance being operated on as part of a Fluent API */ public JQMContainer withContainerId() { setContainerId(generateContainerId()); return this; }
/** * Sets the containerId so it can be referenced by name. * @param containerId */ public void setContainerId(String containerId) { if (containerId == null) throw new IllegalArgumentException("id for JQMContainer cannot be null"); if (containerId.contains(" ")) throw new IllegalArgumentException("id for JQMContainer cannot contain space"); if (containerId.isEmpty()) { this.id = generateContainerId(); } else if (containerId.endsWith(AUTOINC_SUFFIX)) { this.id = containerId.substring(0, containerId.length() - AUTOINC_SUFFIX.length()) + (counter++); } else { this.id = containerId; } getElement().setId(this.id); setAttribute("data-url", this.id); }
/** * Sets the containerId so it can be referenced by name. * @param containerId */ public void setContainerId(String containerId) { if (containerId == null) throw new IllegalArgumentException("id for JQMContainer cannot be null"); if (containerId.contains(" ")) throw new IllegalArgumentException("id for JQMContainer cannot contain space"); if (containerId.isEmpty()) { this.id = generateContainerId(); } else if (containerId.endsWith(AUTOINC_SUFFIX)) { this.id = containerId.substring(0, containerId.length() - AUTOINC_SUFFIX.length()) + (counter++); } else { this.id = containerId; } getElement().setId(this.id); setAttribute("data-url", this.id); }
/** * Sets the containerId so it can be referenced by name. * @param containerId */ public void setContainerId(String containerId) { if (containerId == null) throw new IllegalArgumentException("id for JQMContainer cannot be null"); if (containerId.contains(" ")) throw new IllegalArgumentException("id for JQMContainer cannot contain space"); if (containerId.isEmpty()) { this.id = generateContainerId(); } else if (containerId.endsWith(AUTOINC_SUFFIX)) { this.id = containerId.substring(0, containerId.length() - AUTOINC_SUFFIX.length()) + (counter++); } else { this.id = containerId; } getElement().setId(this.id); setAttribute("data-url", this.id); }