public BindModel ( IModelUpdator modelUpdator ) : void | ||
modelUpdator | IModelUpdator | |
return | void |
public ActionResult InsertMacro(string macroAlias) { // Create the view model var setParamsViewModel = new SetParametersModel(); // Populate view model with default content from macro definition var macroEditorModel = GetMacroByAlias(macroAlias); BackOfficeRequestContext.Application.FrameworkContext.TypeMappers.Map <MacroEditorModel, SetParametersModel>(macroEditorModel, setParamsViewModel); // Bind the post data back to the view model setParamsViewModel.BindModel(this); // Convert model var insertMacroViewModel = BackOfficeRequestContext.Application.FrameworkContext.TypeMappers.Map <SetParametersModel, InsertMacroModel>(setParamsViewModel); return View(insertMacroViewModel); }
public ActionResult SetParametersForm(HiveId contentId, string macroAlias, bool isNew, string inlineMacroId = "") { // Create the view model var setParamsViewModel = new SetParametersModel { ContentId = contentId, IsNew = isNew, InlineMacroId = inlineMacroId }; // Populate view model with default content from macro definition var macroEditorModel = GetMacroByAlias(macroAlias); BackOfficeRequestContext.Application.FrameworkContext.TypeMappers.Map <MacroEditorModel, SetParametersModel>(macroEditorModel, setParamsViewModel); // Bind the post data back to the view model setParamsViewModel.BindModel(this); // Convert model var insertMacroViewModel = BackOfficeRequestContext.Application.FrameworkContext.TypeMappers.Map <SetParametersModel, InsertMacroModel>(setParamsViewModel); return View(EmbeddedViewPath.Create("Rebel.Cms.Web.PropertyEditors.RichTextBox.TinyMCE.Views.InsertMacro.InsertMacro.cshtml, Rebel.Cms.Web.PropertyEditors"), insertMacroViewModel); }