In this task you will learn how to create a brand new dialog box. We will create the simple dialog box named editArticleSummary to display the summary field of an article. The example affects the ted4_config.xml. |
You will be able to perform this task only if: •You are able to run Ted4 and load an article. |
1.In Visual Studio, open ted4_config.xml and then search for the </objectUIs>. 2.Make one or more empty lines above the found line and then type this code, exactly as it appears below: <objectUI name="EditArticleSummary" useAttributesOrder="true"> <default mode="Hidden"/> </objectUI> 3.As you already learned, the purpose of the useAttributesOrder="true" is to display the attributes in the same order as you define them here, while the <default mode="Hidden"/> ensures that all other, undefined attributes do not appear in the dialog box. 4.The above doesn't specify any field, so it is incomplete. Let's add the name and the summary field, so the complete objectUI code looks like: <objectUI name="editArticleSummary" useAttributesOrder="true"> <default mode="Hidden"/> <attribute name="name" > <ui mode="ReadOnly" label="Name:"/> </attribute> <attribute name="summary"> <ui mode="Normal"/> </attribute> </objectUI> Note: the name field serves to display the name of the article you're editing summary for - without it, it wouldn't be clear. As you don't want this dialog box to rename articles, the field is set as ReadOnly instead of Normal. 5.Save changes and import them in database as explained in TASK: Save changes and import them in database. 6.Now you are ready to test the dialog box, but you need a script loader for it. Go to the TASK: Create a loader for the new dialog box. |