Help Center/ Huawei Cloud Astro Zero/ Best Practices/ Objects/ Adding, Deleting, and Modifying Object Data in Frontend Tables
Updated on 2025-08-14 GMT+08:00

Adding, Deleting, and Modifying Object Data in Frontend Tables

Expected Results

Add a toolbar to add, delete, and modify object data on the frontend page. The background object data associated with the page will change accordingly.

Implementation effect: Double-click the data bar in demoName column to edit the data. After editing, click the save button. The data in the table is updated and the background object is also updated. Select data and click the delete button. After the data is deleted, the data in the background object is also deleted.
Figure 1 Updating data on the page
Figure 2 Object data being updated accordingly
Figure 3 Deleting data
Figure 4 Page data being deleted
Figure 5 Object data being deleted

Implementation Methods

  1. Create a low-code application.

    1. Apply for a free trial or purchase a commercial instance by referring to Authorization of Users for Huawei Cloud Astro Zero Usage and Instance Purchases.
    2. After the instance is purchased, click Access Homepage on Homepage. The application development page is displayed.
    3. In the navigation pane, choose Applications. On the displayed page, click Low-Code or .

      When you create an application for the first time, create a namespace as prompted. Once it is created, you cannot change or delete it, so check the details carefully. Use your company or team's abbreviation for the namespace.

    4. In the displayed dialog box, choose Standard Applications and click Confirm.
    5. Enter a label and name of the application, and click the confirm button. The application designer is displayed.
      Figure 6 Creating a blank application
      Table 1 Parameters for creating a blank application

      Parameter

      Description

      Example

      Label

      The label for the new application; Max. 80 characters. A label uniquely identifies an application in the system and cannot be modified after creation.

      My first application

      Name

      Name of the new application. After you enter the label value and click the text box of this parameter, the system automatically generates an application name and adds Namespace__ before the name. Naming rules:

      • Max. characters: 31, including the prefix namespace.

        To prevent duplicate data names among different tenants, each tenant must define a unique namespace when first creating an application. A tenant can only create one namespace, and once it is created, it cannot be modified.

      • Start with a letter and use only letters, digits, and underscores (_). Do not end with an underscore (_).

      A

  2. Create an object named demoData and add fields and data to the object.

    1. In the navigation pane, choose Data, and click + next to Object.
    2. Set Object Name and Unique ID to demoData and click the confirm button.
      Figure 7 Creating object demoData
    Table 2 Parameters for the created object demoData

    Parameter

    Description

    Example

    Object Name

    Name of the new object, which can be changed after the object is created.

    Value: 1–80 characters.

    demoData

    Unique ID

    ID of a new object in the system, which cannot be modified after being created. Naming rules:

    • Max. 63 characters, including the prefix namespace.

      The content that is blurred in front of the ID is a namespace. To prevent duplicate data names among different tenants, each tenant must define a unique namespace when first creating an application. A tenant can only create one namespace, and once it is created, it cannot be modified.

    • Start with a letter and use only letters, digits, and underscores (_). Do not end with an underscore (_).

    demoData

    1. Click to go to the object details page.
      Figure 8 Clicking the edit button
    2. On the Fields tab page, click Add and add the demoName field for the object.
      Figure 9 Adding the demoName field
      Table 3 Parameters for adding the demoName field

      Parameter

      Description

      Example

      Display Name

      Name of the new field, which can be changed after the field is created.

      Value: 1–63 characters.

      demoName

      Unique ID

      ID of a new field in the system. The value cannot be changed after the field is created. Naming rules:

      • Max. 63 characters, including the prefix namespace.
      • Start with a letter and use only letters, digits, and an underscore (_). Do not end with an underscore (_).

      demoName

      Field Type

      Click . On the page that is displayed, select the type of the new field based on the parameter description.

      Text

    3. On the Fields tab, click Add again to add the demoId field.
      Figure 10 Adding the demoId field
    4. On the Data tab, click Add to add data to the object.
      Figure 11 Adding data to an object

  3. Create an object model.

    1. In the navigation pane, choose Page, and click + next to Standard Page.
    2. Enter a label and name and click Add to create a standard page.
      Figure 12 Creating a standard page
      Table 4 Parameters for creating a standard page

      Parameter

      Description

      Example

      Label

      Label name of a standard page, which can be changed after being created.

      Value: 1–64 characters.

      page01

      Name

      Name of the standard page. The name is the unique identifier of the standard page in the system and cannot be changed after being created. Naming rules:

      • Max. 64 characters, including the prefix namespace.
      • Start with a letter and use only letters, digits, and an underscore (_). Do not end with an underscore (_).

      page01

    3. At the bottom of the standard page, click Model View.
      Figure 13 Clicking Model View
    4. On the displayed page, click New. On the displayed page, specify Model Name (for example, demo), set Source to Objects, and click Next.
      Figure 14 Creating a model
    5. Select the object created and the fields added in 3, and click Next.
      Figure 15 Selecting objects and fields
    6. Click OK.

  4. Return to the Designer View page and create a table to bind the model.

    1. At the bottom of the standard page, click Designer View.
    2. Drag a table widget to the standard page.
      Figure 16 Dragging a table widget
    3. Select the table widget, choose Properties > Data Binding and click next to Value Binding.
    4. Select the model created in 3 and click the confirm button.
      Figure 17 Selecting the model

  5. Add a toolbar.

    1. Select the table widget, choose Properties > Table Block, and click Add next to Toolbar to add a toolbar.
      Figure 18 Adding a toolbar
    2. Expand Extended Property to enable Editable.
      Figure 19 Enabling Editable
    3. Set the demoName and demoId columns to be editable.
      Click next to the demoName column to make it editable. Repeat the preceding operations to set the demoId column to be editable.
      Figure 20 Setting the demoName column to be editable

  6. Click in the upper part of the page to save the page settings.
  7. After the configuration is saved, click in the upper part of the page to view the configuration effect.