Wiki source code of Features
Last modified by Lucas Charpentier (Sereza7) on 2023/12/07 15:46
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | {{toc start="2"/}} | ||
2 | |||
3 | == Application Wizard == | ||
4 | |||
5 | Start by clicking on "More applications" from the [["Applications" panel>>Extension.Panels Application||anchor="HApplicationPanel"]] and then on "Create your own!". This will take you to the App Within Minutes home page. | ||
6 | |||
7 | {{image reference="applications-panel.png"/}} | ||
8 | |||
9 | There you can see listed the existing applications. Click on the "Create Application" button to start the wizard. | ||
10 | |||
11 | {{image reference="AppWithinMinutes-Step0.png"/}} | ||
12 | |||
13 | === Application Location === | ||
14 | |||
15 | In the first step you have to provide the application name and location, which will determine the application home page URL. The application code will be generated as nested pages inside the specified location. | ||
16 | |||
17 | {{image reference="AppWithinMinutes-Step1.png"/}} | ||
18 | |||
19 | === Application Structure === | ||
20 | |||
21 | In the second step you define the application structure, i.e. the type of data the application will handle. At the end of this step the wizard will create for you: | ||
22 | |||
23 | * a page to hold the application structure | ||
24 | * a template page to store the default field values and to be used ("copied") when creating new application entries | ||
25 | * a sheet that will be used to display and edit the application entries | ||
26 | * a translation page to help localize the application | ||
27 | |||
28 | {{image reference="AppWithinMinutes-Step2.png"/}} | ||
29 | |||
30 | ==== Field Palette ==== | ||
31 | |||
32 | The second step of the App Within Minutes wizard helps you define the type of data your application will handle. The field palette lists the available field types. Most of these field types are mapped directly to XClass property types: | ||
33 | |||
34 | (% class="row" %) | ||
35 | ((( | ||
36 | (% class="col-sm-4" %) | ||
37 | ((( | ||
38 | {{image reference="AppWithinMinutes-FieldPalette.png"/}} | ||
39 | ))) | ||
40 | |||
41 | (% class="col-sm-8" %) | ||
42 | ((( | ||
43 | |=Field Type|=XClass Property Type | ||
44 | |Short Text|String | ||
45 | |Long Text|TextArea | ||
46 | |Number|Number | ||
47 | |Boolean|Boolean | ||
48 | |Static List|Static List | ||
49 | |Page|Page | ||
50 | |Date|Date | ||
51 | |User|List of Users | ||
52 | |Group|List of Groups | ||
53 | |Database List|Database List | ||
54 | ))) | ||
55 | ))) | ||
56 | |||
57 | See the [[XWiki Data Model documentation>>xwiki:Documentation.DevGuide.DataModel.WebHome]] to understand what an XClass is and what are all the available property types. The consequence of this mapping is that most of your application structured data will be stored in objects (XClass instances) attached to your application entries (documents). In fact, in this step the App Within Minutes wizard creates an XClass for your application. | ||
58 | |||
59 | Some field types, such as Title and Content are not mapped to an XClass property type but to a document field instead. Visually there's no difference between a Short Text field and the Title field. The difference comes from how the value is stored. In the case of the Title field the value will be stored in the title of an application entry (document). Same with the Content field: the value will be store in the content of the application entry (what you can edit in Wiki edit mode). This has a limitation though: you can use at most one Title/Content field per application. | ||
60 | |||
61 | === Application Entries === | ||
62 | |||
63 | In the third step you can configure the location where the application entries will be created. The information you enter here will be used in the [[Create Page dialog>>xwiki:Documentation.UserGuide.Features.DocumentLifecycle||anchor="HByusingtheAddPageaction"]]. | ||
64 | |||
65 | {{image reference="AppWithinMinutes-Step3.png"/}} | ||
66 | |||
67 | === Application Presentation === | ||
68 | |||
69 | In the last step you can customize the way the home page of your application will look like. You can specify: | ||
70 | |||
71 | * the application title and description | ||
72 | * the columns to display in the entries live table | ||
73 | * the icon to be used on the [[Applications panel>>Extension.Panels Application||anchor="HApplicationPanel"]] (since XWiki 4.2) | ||
74 | |||
75 | {{image reference="AppWithinMinutes-Step4.png"/}} | ||
76 | |||
77 | == Home Page == | ||
78 | |||
79 | At the end the wizard takes you to the home page of your application, which is the place from where you can manage the application data: edit the application structure, add new entries, edit or delete existing ones. | ||
80 | |||
81 | {{image reference="AppWithinMinutes-HomePage.png"/}} | ||
82 | |||
83 | == Entry Pages == | ||
84 | |||
85 | With the application in place you can now start creating application entries, either using the "Add new entry" link from the application home page or by using the standard {{velocity}}$services.icon.render('add'){{/velocity}} Create button and selecting the application entry template that has been generated for you by the application wizard. Each application entry you create is saved as a separate wiki page. The fields of an application entry can be edited in place (since XWiki 12.3). | ||
86 | |||
87 | {{image reference="AppWithinMinutes-EntryPage.png"/}} | ||
88 | |||
89 | == Applications Panel Entry == | ||
90 | |||
91 | Starting with XWiki 4.2 your application is listed in the [[Applications panel>>Extension.Panels Application||anchor="HApplicationPanel"]], with the icon you've chosen: | ||
92 | |||
93 | {{image reference="AppWithinMinutes-PanelEntry.png"/}} | ||
94 | |||
95 | == Create Page Template == | ||
96 | |||
97 | Since XWiki 8.4 you can create application entries not only from the application home page ("Add new entry") but also from the [[Create Page dialog>>xwiki:Documentation.UserGuide.Features.DocumentLifecycle||anchor="HByusingtheAddPageaction"]] (like you would create a normal wiki page). | ||
98 | |||
99 | {{image reference="AppWithinMinutes-CreatePage.png"/}} | ||
100 | |||
101 | == Rename Application == | ||
102 | |||
103 | Starting with XWiki 11.1 you can rename/move an application by [[renaming/moving its home page>>xwiki:Documentation.UserGuide.Features.DocumentLifecycle.WebHome||anchor="HMove2FRename"]]. Note that you can change the application title without renaming the application just by editing the application home page. Be aware that the application code is going to be regenerated if you rename the application, in order to work with the new application location. Code customizations will be overwritten as a consequence, but you can rollback the changes afterwards. | ||
104 | |||
105 | Renaming AppWithinMinutes applications that have been published and installed as XWiki extensions through the Extension Manager is prevented because they usually have custom code that cannot be updated automatically on rename and also because upgrading such a renamed application will lead to many merge conflicts. | ||
106 | |||
107 | {{velocity}} | ||
108 | {{html clean="false"}} | ||
109 | <video controls muted width="780" src="$doc.getAttachmentURL('awm-rename.webm')" | ||
110 | poster="$doc.getAttachmentURL('awm-rename.png')" /> | ||
111 | Sorry, your browser doesn't support embedded videos. | ||
112 | </video> | ||
113 | {{/html}} | ||
114 | {{/velocity}} | ||
115 | |||
116 | Also note that the application code is not updated automatically if the application location changes as a result of renaming or moving one of the parent pages of the application. For instance, if the application is located in ##Path / To / Books## and you rename the "Path" parent page to "New Path" preserving children then you'll get the following warning when visiting the application home page: | ||
117 | |||
118 | {{image reference="awm-rename-parent.png"/}} | ||
119 | |||
120 | In order to fix the application code you need to edit the application and go through all the steps of the application wizard, updating the application configuration if necessary. |