Modelling an Add (or Edit) Entity Page
1. Defining an Add Page
Example: Add Category Page
.AddPage(
new Page
{
Id = AppConstants.Pages.CategoryAddPage,
Title = "Add Category",
Name = "add-category",
Area = ContainerComponent.Create(
new EntityEditComponent
{
EntityClassId = IdGen.GetEntityClassId<Category>(),
Area = PageBuilderExtensions.VerticalContainer(
PageBuilderExtensions.TextInput(
IdGen.GetPropertyId<Category>(nameof(Category.Name)),
"Name",
true
),
PageBuilderExtensions.Html(
"The only way to do great work is to love what you do. 👨💼"
)
),
AfterCancelPageId = AppConstants.Pages.CategoryListPage,
AfterUpdatePageId = AppConstants.Pages.CategoryListPage,
}
),
}
);2. Key Elements Explained
EntityEditComponent
Area Layout
3. Best Practices
Key Points
PreviousModelling Lists with Bloqs Standard UI ComponentsNextModelling Different Types of Pages with Bloqs
Last updated