Trace:
Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
visionx:data_modeling_and_representation [2020/06/08 12:13] cduncan [Define the writeback table] |
visionx:data_modeling_and_representation [2020/06/08 12:18] cduncan [Filters] |
||
---|---|---|---|
Line 461: | Line 461: | ||
{{:visionx:data_modeling_and_representation:views_storages_step7.png?nolink|Storage as data source: Desktop app Assets}} | {{:visionx:data_modeling_and_representation:views_storages_step7.png?nolink|Storage as data source: Desktop app Assets}} | ||
- | However, I do not want all that information to be editable in this screen. Let's set some of the data as readonly. | + | However, I do not want all that information to be editable in this screen. Let's set some of the data as read-only. |
- | ===== Set data read-only ===== | + | ===== Set Data as Read-Only ===== |
- | Select the assets screen in designer mode and press the "Customize" button (1) at the top left corner. In the lower part of the popup, VisionX suggest some of the events provided by the currently selected control. We want that the data is set read-only in this screen immediately after the screen is created, let's therefore click on "Create On Load" (2). | + | Select the assets screen in designer mode and press the "Customize" button (1) at the top left corner. In the lower part of the popup, VisionX will suggest some of the events provided by the currently selected control. We want that the data is set to read-only in this screen immediately after the screen is created. let's. therefore. click on "Create On Load" (2). |
{{:visionx:data_modeling_and_representation:views_storages_step5.png?nolink|Set data read-only: On Load}} | {{:visionx:data_modeling_and_representation:views_storages_step5.png?nolink|Set data read-only: On Load}} | ||
- | The "Edit Action" window opens. The text in the tab page "Description" will be copied to the documentation of the source code. Let's select the tab page "Action" (1) to specify what shall be done whenever the screen is loaded. Press the drop down list button (2) to see all predefined commands. To avoid scrolling through the list I filter the list by entering "disable" in the editor (3) and press the drop down list button again. Select "Disable Edit in table" (3). | + | The "Edit Action" window opens. The text in the tab page "Description" will be copied to the documentation of the source code. Let's select the tab page "Action" (1) to specify what shall be done whenever the screen is loaded. Press the dropdown list button (2) to see all predefined commands. To avoid scrolling through the list, I filter the list by entering "disable" in the editor (3) and press the drop down list button again. Select "Disable Edit in table" (3). |
> **See**: For detailed information on all available VisionX Actions and how to use them, check out the [[:visionx:actions|documentation]]. | > **See**: For detailed information on all available VisionX Actions and how to use them, check out the [[:visionx:actions|documentation]]. | ||
Line 475: | Line 475: | ||
{{:visionx:data_modeling_and_representation:views_storages_step6.png?nolink|Set data read-only: Select command}} | {{:visionx:data_modeling_and_representation:views_storages_step6.png?nolink|Set data read-only: Select command}} | ||
- | Next we have to specify the data object, that shall not be editable; we choose "[Table: Departments]". To add another action for the same event, drag and drop a command from the right pane to the action table. Let's select "Disable Edit in table" again, this time for "[Table: Employees]". | + | Next, we have to specify the data object that shall not be editable; we choose "[Table: Departments]". To add another action for the same event, drag and drop a command from the right pane to the action table. Let's select "Disable Edit in table" again, this time for "[Table: Employees]". |
- | I still want to be able to change the employee, that is the current holder of the asset. Therefore I bind the editor "Last Name" to the column "Last Name" of the "Localized Assets" storage (which is editable). In designer mode, select the editor and press the "Customize" icon (1). Open the Binding drop-down list (2) and choose "[Localized Assets.Last Name]" (3) as binding for that editor. | + | I still want to be able to change the employee that is the current holder of the asset. Therefore, I bind the editor "Last Name" to the column "Last Name" of the "Localized Assets" storage (which is editable). In designer mode, select the editor and press the "Customize" icon (1). Open the Binding dropdown list (2) and choose "[Localized Assets.Last Name]" (3) as binding for that editor. |
{{:visionx:data_modeling_and_representation:views_storages_step8.png?nolink|Set data read-only: Change editor binding}} | {{:visionx:data_modeling_and_representation:views_storages_step8.png?nolink|Set data read-only: Change editor binding}} | ||
- | Done! My asset screen is ready to use, without writing even one line of Java code: | + | Done! My asset screen is ready to use without writing even one line of Java code: |
{{:visionx:data_modeling_and_representation:views_storages_step9.png?nolink|Set data read-only: result web}} | {{:visionx:data_modeling_and_representation:views_storages_step9.png?nolink|Set data read-only: result web}} | ||
Line 487: | Line 487: | ||
====== Filters ====== | ====== Filters ====== | ||
- | To be honest, showing the location table in the departments screen is dispensable. As my use-case is to show all available assets by their locations, I could have done easier by creating a filter editor for the asset's location. Let's give a try: | + | To be honest, showing the location table in the departments screen is dispensable. As my use-case is to show all available assets by their locations, I could have done so more easily by creating a filter editor for the asset's location. Let's give that a try: |
Open the "Assets with Filter" screen in designer view and drag and drop the "Search" editor (1) to the screen (2). | Open the "Assets with Filter" screen in designer view and drag and drop the "Search" editor (1) to the screen (2). | ||
Line 493: | Line 493: | ||
{{:visionx:data_modeling_and_representation:filters_step1.png?nolink|Filters: add filter}} | {{:visionx:data_modeling_and_representation:filters_step1.png?nolink|Filters: add filter}} | ||
- | Select the editor, press the "Customize" icon (1) and specify the Search Mode in the lower part of the popup. Let's select "Like" as search mode (2) and "[Localized Assets.Location]" as column (3) to search in. | + | Select the editor, press the "Customize" icon (1), and specify the search mode in the lower part of the popup. Let's select "Like" as search mode (2) and "[Localized Assets.Location]" as column (3) to search in. |
{{:visionx:data_modeling_and_representation:filters_step2.png?nolink|Filters: specify filter}} | {{:visionx:data_modeling_and_representation:filters_step2.png?nolink|Filters: specify filter}} | ||
- | VisionX automatically creates a drop-down list for the location filter editor due to the Automatic Link Reference between the storage [Localized Assets.Location] and the table LOCATIONS. But the "Like" filter does more than simple text matching. You can use the wildcard character ? as placeholder for any single character and * or % as placeholders for any number of characters. | + | VisionX automatically creates a dropdown list for the location filter editor due to the automatic link reference between the storage [Localized Assets.Location] and the table LOCATIONS. But the "Like" filter does more than simple text matching. You can use the wildcard character ? as placeholder for any single character and * or % as placeholders for any number of characters. |
For example, you may want to filter for assets at locations starting with "South" (such as **South**lake, **South** San Francisco or **South** Brunswick) by entering "South*" (or "South%") into the location filter editor. Or you enter "*en*" (or "%en%") to get all assets at locations containing "en" (such as "UK C**en**tral" or "V**en**ice"). | For example, you may want to filter for assets at locations starting with "South" (such as **South**lake, **South** San Francisco or **South** Brunswick) by entering "South*" (or "South%") into the location filter editor. Or you enter "*en*" (or "%en%") to get all assets at locations containing "en" (such as "UK C**en**tral" or "V**en**ice"). |