public String allocateControlName(String id) { return delegate.allocateControlName(id); }
@SetupRender final void setup() { // Often, these controlName and clientId will end up as the same value. There are many // exceptions, including a form that renders inside a loop, or a form inside a component // that is used multiple times. if (formSupport == null) throw new RuntimeException(String.format("Component %s must be enclosed by a Form component.", resources.getCompleteId())); assignedClientId = allocateClientId(); String controlName = formSupport.allocateControlName(assignedClientId); formSupport.storeAndExecute(this, new Setup(controlName)); formSupport.store(this, PROCESS_SUBMISSION_ACTION); }
boolean beginRender(MarkupWriter writer) { if (formSupport == null) { throw new RuntimeException("The Hidden component must be enclosed by a Form component."); } controlName = formSupport.allocateControlName(resources.getId()); clientId = null; formSupport.store(this, new ProcessSubmission(controlName)); Object toEncode = value == null ? nulls.replaceToClient() : value; String encoded = toEncode == null ? "" : encoder.toClient(toEncode); hiddenInputElement = writer.element("input", "type", "hidden", "name", controlName, "value", encoded); resources.renderInformalParameters(writer); writer.end(); return false; }
void beginRender(MarkupWriter writer) { clientId = null; String name = formSupport.allocateControlName(resources.getId()); // Save the element, to see if an id is later requested. String type = image == null ? "submit" : "image"; element = writer.element("input", "type", type, "name", name); if (disabled) { writer.attributes("disabled", "disabled"); } if (image != null) { writer.attributes("src", image.toClientURL()); } formSupport.store(this, new ProcessSubmission(name, context)); resources.renderInformalParameters(writer); }
void beginRender(MarkupWriter writer) { clientId = javascriptSupport.allocateClientId(resources); String name = formSupport.allocateControlName(resources.getId()); // Save the element, to see if an id is later requested. String type = image == null ? "submit" : "image"; writer.element("input", "type", type, "name", name, "data-submit-mode", mode.name().toLowerCase(), "class", cssClass, "id", clientId); if (disabled) { writer.attributes("disabled", "disabled"); } if (image != null) { writer.attributes("src", image.toClientURL()); } formSupport.store(this, new ProcessSubmission(clientId, name)); resources.renderInformalParameters(writer); }
ComponentAction<RadioGroup> action = new Setup(formSupport.allocateControlName(clientId));