/** * Creates a new form panel. */ public FormPanel() { frameName = "gxt.formpanel-" + (++formId); setTarget(frameName); }
@Override protected void onRender(Element target, int index) { super.onRender(target, index); body.setStyleAttribute("background", "none"); form = new El(DOM.createForm()); form.setStyleAttribute("overflow", "hidden"); body.appendChild(form.dom); setMethod(method); setTarget(this.target); if (encoding != null) { setEncoding(encoding); } if (action != null) { setAction(action); } getLayoutTarget().setStyleAttribute("padding", padding + "px"); if (getLayout() == null) { FormLayout layout = new FormLayout(); layout.setDefaultWidth(fieldWidth); layout.setLabelWidth(labelWidth); layout.setLabelAlign(labelAlign); layout.setLabelSeparator(labelSeparator); layout.setHideLabels(hideLabels); setLayout(layout); } form.addEventsSunk(Event.ONLOAD); setAriaRole("region"); }