Using the [%TABLES%] Expander
The [%TABLES%] allows you to select (on the fly) tables for which you want to generate forms, views, or pages.
This is normally used by the creator of your stencil during the stencil's construction, but nothing stops you from implementing its use so long as you know the specific node that creates the page(s) or forms(s0) for your project.
In the DevExpress Web App Stencil, this is the node that generates the Blazor pages:
- This is the node that creates the Blazor pages.
- This is the code responsible for code generation.
- This shows the output from the code generation. It has gone through all the tables currently in the Schema Dictionary.
What if we want to regenerate pages only for Partners and EventRegistrations? This is where the {%TABLES%] expander comes into play.
- Clone/Duplicate the node - We need to make a copy of this node and copy the code. Right-click on the node and select "Duplicate Node":
- Rename The Node - Right-click and select "Rename Node" The name you use here is important. Just repeat the name of the copied node and replace the expander within the name with "[%TABLES%]. For example, [%CS_TABLE_LISTS%].razor becomes [%TABLES%].razor.
Because the [%TABLES%] expander is a special expander, the node label automatically becomes bold, and the node icon changes to a table. - Edit the Node—Right-click on the node or double-click to Edit. This brings up the Edit Node Form. In the Flags/Trigger/Comments section, we need to specify the same expander initially in the node we copied from.
- Flags/Triggers/Comments - Right-click to select the appropriate/matching expander to the node we cloned. In this case, it is [%CS_TABLE_LISTS%].
Whatever you select here will be reflected in the names and labels generated in the code for the selected tables. - Save - Click OK to save your changes.
When ready to generate these specific tables, Right-Click on the [%TABLES%].razor node. You will get the form that allows you to pick the specific table(s) for which you want to generate code.
Select (Check) the table(s) and click on "Continue". Code will be generated only for those tables.