public override ViewPage GetPage(RequestQueryString reqQuery) { int entityItemId = reqQuery.EntityId.Code; View.PageType = AppPageType.AppStudio; View.CurrentQuery = reqQuery.ToQueryString(); var formContext = new DetailFormContext(_appContext, EntityCode.EntityMaster, new RequestQueryString() { EntityId = EntityCode.EntityMaster, ItemId = entityItemId }); formContext.Build(); formContext.CreateDataModel(); var entityMasterModel = formContext.EntityModel; View.PageTitle = new DynamicObj(); View.PageTitle.Add("Title", entityMasterModel.GetValue <string>("text", "")); AddHeaderActions(reqQuery, entityItemId); AddFieldListField(formContext); AddLayoutListField(formContext); AddListListField(formContext); AddEntityActionsListField(formContext); return(this.View); }
public ViewPage CreateDetailPage(DetailFormContext context) { if (!context.Context.UserInfo.HasAccess(context.Entity.EntityId, AccessType.Read)) { throw new AuthException("Operation not allowed."); } context.CreateDataModel(); var lConext = new LayoutContext(context.Context, context.ItemTypeId, context.Entity.EntityId); lConext.Build(); context.LayoutContext = lConext; var renderer = new DetailFormRenderer(context); renderer.Generate(lConext); return(renderer.GetViewPage()); }