|
|
|
|
|
- Overview
- Importing a WINDEV project: Webizing a project
- Overview
- Opening and webifying the project
- Conclusion
Tutorial - Webifying a WINDEV project
We will cover the following topics: - Different import/export modes.
- Webifying a WINDEV project.
10 min WEBDEV offers various import and export options. First of all, you have the possibility to import "existing" WEBDEV elements into your project. All types of WEBDEV elements can be imported: - pages, reports,
- classes, components,
- procedures,
- etc.
To import existing elements into the current project, go to the "Project" tab, "Project" group, expand "Import" and select "WEBDEV elements and their dependencies...". For more details, see Importing elements into a project. You can also export elements from your project to another directory. These elements can be reused in other projects. To export elements from your project, go to the "Home" tab, "General" group, expand "Save" and select "Export .. To a directory...". For more details, see Exporting elements to a directory. In this tutorial, we'll look at another type of import: the import of a WINDEV project, also known as webization. Importing a WINDEV project: Webizing a project Overview A widespread need today is to transform Windows applications (or parts of applications) into dynamic websites. WEBDEV's webification wizard allows you to: - convert windows into pages,
- adapt the WLanguage code.
To test the webification of a WINDEV application, we will use a WINDEV project. A WINDEV application can only be webified: - using a version of WINDEV 2025 that includes WEBDEV 2025.
- using WEBDEV 2025.
Opening and webifying the project To convert an existing WINDEV project into a website: - Go to the WEBDEV home page (Ctrl + <).
- On the home page, click on "Tutorial", then in the "Tutorial - Webizing a WINDEV project" area, click on "Open exercise project".
- There are two options available depending on the IDE used:
- If you are using a version of WINDEV that includes WEBDEV, on the "Project" tab, in the "Webification" group, expand "Webify" and select "Webify".
- If you are using WEBDEV, the webification wizard starts and indicates that a WEBDEV project configuration will be created. Proceed to the next step of the wizard.
- The wizard shows the different elements to convert. In our case, select all the elements.
To webify a WINDEV project, it is recommended to start by converting one or two windows. You can convert the other windows as you go along. - Go to the next step.
- The wizard shows the elements that can be integrated into the website. In our example, keep the report. Keep the default options and go to the next step.
- The wizard is finished. Click "Finish".
- The project audit for page conversion starts automatically. This audit makes it possible to deal with certain compilation errors by suggesting solutions. We need to fix all these errors to fully webify the application. Some errors may be related to processes or features that are not available on the web, unavailable WLanguage functions, etc. In our example, the audit shows the following problems:
We will examine the different problems one by one: - Our WINDEV application printed a report in "Report viewer" mode. This option is not available on WEBDEV websites. The code must be modified to create a PDF file.
- Double-click "Click (server)" next to "Errors". The click code with the error is displayed.
- First, we're going to modify the page loading mode. In the header of the "Click BTN_Print_quote" event, click "Minimal page reload (AJAX)" and select "Full page reload".
- Then, we need to use the code to print a PDF file. Replace the code with:
iDestination(iGenericPDF)
RPT_OrderForm.Print()
FileDisplay(iLastFile, mimeTypePDF, iLastFile)
fDelete(iLastFile)
- In the audit window, refresh the display: all printing errors have disappeared.
- The following problem is related to processes that are not supported in websites. Simply check the behavior of the element and move or delete the corresponding WLanguage code, if necessary.
- The last problem detected is related to the use of fSelect. File pickers cannot be used in websites. It is preferable to use an Upload control. We have already seen this type of control in part 3 (in the "Managing the product image" paragraph).
This small example allowed us to see the simplicity and assistance provided by WEBDEV to convert a WINDEV project into a website. Note: In some cases, new developments may be required to adapt the application's operation to the Web. For example, if the application used a Word Processing control, it may be necessary to use an HTML control and adapt the analysis to manage HTML. In this lesson, we saw how to easily webify a WINDEV application. For more details on the webification of a WINDEV project, see Convert your WINDEV applications into websites. WEBDEV offers other import modes that can be very useful, for example:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|