/** * Ad a new row with header name and header value fields. Header name is supported by GWT's * suggestion mechanism. Header values may have additional support while filling up the form. * * @see {@link HeadersFormRow} form more details. * @param name * @param value */ private void addRow(String name, String value) { HeadersFormRow row = new HeadersFormRow(suggestOracle, name, value); headersFormPanel.add(row.asWidget()); row.addChangeHandler(this); row.addRemoveHandler(removeHeaderRowHandler); row.addBlurHandler(headerBlurHandler); rows.add(row); }
@Override public void onHeaderRemove(HeaderRemoveEvent event) { HeadersFormRow row = (HeadersFormRow) event.getSource(); int index = rows.indexOf(row); if (index == -1) return; rows.remove(index); row.removeFromParent(); updateRaw(); }