(function(){var e="display";var r,t,i,n;page.onLoad=function(){t=this.url.get("successAction")||"FireEvent;1";i=this.url.get("failureAction")||"FireEvent;2";a(o)};function a(e){var r=page.url.getInfoAreaId();u8.using({schema:[r]},e)}function o(){var e=u8.services.crud.buildRequestFromUri(page.url);if(u8.isValidRecordUid(e.uid)){u8.services.crud.update(e,r)}else{u8.services.crud.create(e,r)}function r(r,t){n=t.error?{error:t.error,uid:e.uid}:t.response||t.businessObject;if(n&&n.error){u()}else{s()}}}function u(){var e=i.split(";");switch(e[0]){case"FireEvent":if(e.length>1){var r=parseInt(e[1]),t={command:"Event"+r,commandArguments:{ErrorText:n.error.text,ErrorInfoarea:n.uid.infoAreaId}};u8.services.notification.error(n.error.text);page.proceed(t)}break;case"Form":if(e.length>1){c(e[1])}break;default:break}}function s(){var e=t.split(";");switch(e[0]){case"FireEvent":if(e.length>1){var r=parseInt(e[1]);page.proceed({command:"Event"+r,commandArguments:n.uid,uid:n.uid})}break;case"Form":if(e.length>1){c(e[1])}break;default:break}}function c(t){this.commandBindings=$.extend(page.commandBindings,{"Button/*":d});var i=n.uid;var a={formName:t,parent:page,context:new u8.Base.Model({properties:{uid:i}})};r=new u8.Base.Widgets.Form($el(e),a)}function d(e){var t=r.validationManager.getStatus();if(t!="success"){u8.services.notification.error($t("TXT_net_formcontrol_text_1"));return}var i=e.__eventNr;if(typeof i!="undefined"){var a=r.getComponent("queryStringData");var o=!n.error&&n.uid;if(!o){o=a&&a.getProperties()}var u={command:"Event"+i,commandArguments:o};if(!n.error){u.uid=n.uid}page.proceed(u)}}})();