}
}
@Override
public void saveFormItem(FormItemRepresentation formItem, String formItemName) {
Resource resource = new Resource(URLBuilder.saveFormItemURL(this.contextPath, this.packageName, formItemName));
try {
String xml = helper.asXml(formItemName, formItem);
resource.post().xml(XMLParser.parse(xml)).send(new SimpleTextCallback(i18n.CouldntSaveFormItem()) {
@Override
public void onSuccess(Method method, String response) {
int code = method.getResponse().getStatusCode();
if (code == Response.SC_CONFLICT) {
bus.fireEvent(new NotificationEvent(Level.WARN, i18n.FormItemAlreadyUpdated()));