In this task you will understand the purpose of the <default mode="Hidden"/> property and how it affect the objectUI dialog boxes. In this example we choose the Edit workstate dialog box in the EdAdmin4 application, defined in the EdAdmin4_Config.xml configuration file. |
You will be able to perform this task only if: •You already opened the edadmin4_config.xml file as explained in TASK: Open for editing one or more files with objectUI elements and ordered the view as explained in TASK: Display an ordered view of objectUI elements. If not so, return to those tasks and perform them first, and then return here. |
1.Locate in the code the lines: <objectUI name="editWorkstate" > <default mode="Hidden"/> 2.Now, instead to delete the entire <default mode="Hidden"/> line, we will teach you how to deactivate it still keeping it in the code. Therefore, highlight the entire <default mode="Hidden"/> line and then on the Edit menu, point to Advanced, and then click Comment Selection. 3.The line looks like now green as on the following screenshot; it is commented out and not executed anymore. 4.Save changes and import them in database as explained in TASK: Save changes and import them in database. 5.CLose and run again EdAdmin4 and reopen the Edit workstate dialog box as explained in TASK: Get to know the Workstate entry dialog and recognize its fields. 6.Find the changes in the dialog box (on the left, the dialog with your changes made in this task; on the right, the dialog box as after the TASK: Understand useAttributesOrder property): As you can clearly see, after you commented out the <default mode="Hidden"/> statement, and reloaded the configuration file in the database, the number of the fields in the dialog is not anymore the same as in the related section of the EdAdmin4_COnfig.XML. Now, the number of fields is the same as the number of attributes of the workstate object defined in the schema. Conclusions You learned that the <default mode="Hidden"/> property forces the dialog box to show only the attributes as specified in the configuration file. If you remove the property, of put it as <default mode="Normal"/> the number of fields cannot be controlled anymore by the configuration file, but all the attributes of an objects will be shown. Important to remember: •The changes of a configuration file are applied on the database only after you perform the reimporting as explained previously. •The changes of a configuration are visible in a GN4 application typically only after its restart. |