PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
New WEBDEV 26 feature!
  • In this lesson you will learn the following concepts
  • Importing elements
  • Exporting elements
  • Specific import operations
  • Importing a WINDEV project: Webifying a project
  • Importing an HTML page
Lesson 9.3. Import/Export
In this lesson you will learn the following concepts
  • Importing elements from one project to another.
  • Exporting the elements of your project.
  • Specific import operations (WINDEV projects, HTML pages)
Lesson duration

Estimated time: 10 mn
Previous LessonTable of contentsNext Lesson
Importing elements
You have the ability 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:
    1. On the "Project" pane, in the "Project" group, expand "Import" and select "WEBDEV elements and their dependencies...".
    2. Click "..." and select the directory containing the elements to import (the directory must include WEBDEV elements).
    3. Validate. WEBDEV lists the elements located in the specified directory, that can be imported (subdirectories are ignored).
      Importing WEBDEV elements into the project
    4. Select the elements to import and validate. The elements (and all files used by these elements : images, etc.) are now included in the project.

Note

The "Calculate" button (in the import window) calculates the size of the selected elements along with their dependencies.
Exporting elements
You also have the ability to export elements from your project to another directory for example. These elements can be reused in other projects.

Caution!

Exporting elements is more than just copying elements. It is the only safe method to send a project element along with its dependencies (images, icons, etc.). A simple solution to send pages and their dependencies by email, for example.
  • To export elements from your project:
    1. On the "Home" pane, in the "General" group, expand "Save" and select "Export .. To a directory...".
    2. In the window that is displayed, select the project elements that will be exported.
      Exporting WEBDEV elements
    3. Specify the name of the destination directory (or select it with the “...” button).
    4. Validate. The elements are exported to the specified directory. These elements are still available in your project.

Note

The "Calculate" button (in the import window) calculates the size of the selected elements along with their dependencies.
Specific import operations

Importing a WINDEV project: Webifying a project

A widespread need today is to transform Windows applications (or parts of applications) into dynamic websites.
With the Webification wizard, WEBDEV allows you to:
  • transform your windows into pages,
  • adapt the WLanguage code.
To test the webification of a WINDEV application, we will use a WINDEV project.

Note

A WINDEV application can only be webified:
  • using WINDEV 26 with WEBDEV 26.
  • using WEBDEV 26.
  • To transform an existing WINDEV project into a website:
    1. Go to the WEBDEV home page (Ctrl + <).
    2. On the home page, click "Tutorial", then in "Part 9 - Lesson 9.3 - Import/Export", double-click "Webify a WINDEV project (Exercise)".
    3. There are two options available depending on the software used:
      • If you are using WINDEV, on the "Project" pane, 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. Go to the next step of the wizard.
    4. The wizard shows the different elements to transform. In our case, select all the elements.

      Note

      When webifying a WINDEV project, it is advisable to first transform one or two windows of your application. You can transform the other windows as you go along.
    5. Go to the next step.
    6. The wizard shows the elements that can be integrated into the site. In our example, we keep the report. Keep the default options and go to the next step.
    7. The wizard is finished. Click "Finish".
    8. The project audit for page conversion starts automatically. This audit makes it possible to deal with certain compilation errors by proposing solutions. It is necessary to correct all these errors for the application to be fully webified. Some errors may be related to processes or features that are not available on Web, unavailable WLanguage functions, etc, ... In our example, the audit shows the following problems:
  • We will examine the different problems one by one:
    1. Our WINDEV application printed a report in "Report viewer" mode. This option is not available on WEBDEV sites. 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.
      • In the header of the "Click BTN_Print_quote" event, click "AJAX enabled" to disable the Ajax mode.
      • Replace the code with:
        iDestination(iGenericPDF)
        RPT_OrderForm.Print()
        FileDisplay(iLastFile, typeMimePDF, iLastFile)
        fDelete(iLastFile)
      • Refresh the display in the audit window: all print errors have disappeared.
    2. The last problem detected is related to the use of fSelect. Indeed, it is not possible to use a file picker in a website. It is preferable to use an Upload control. We have already seen this type of control in Part 3 (paragraph "Managing the image of a product").
This small example allowed us to see the simplicity and assistance provided by WEBDEV to transform a WINDEV project into a site.
Remark: In some cases, new developments may be necessary to adapt the application's behavior 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.
For more details on the webification of a WINDEV project, see Transform your existing WINDEV applications into websites.

Importing an HTML page

A page found in a non-WEBDEV site is useful? You want to retrieve its interface? Nothing's easier.
WEBDEV gives you the ability to import your existing HTML pages into your WEBDEV project. Each imported page becomes an element of your WEBDEV site. This page can be modified!

Note

The feature for importing HTML pages is a great help given to the developers of WEBDEV sites. It is not a feature for "grabbing" Internet sites.
However, some display differences may be noticed between the HTML page before the import and the HTML page after the import.
  • To import an HTML page into a WEBDEV project:
    1. Open your WEBDEV project (for example: an existing project or a new project).
    2. On the "Project" pane, in the "Project" group, expand "Import" and select "An HTML page...". The HTML page import wizard starts.
    3. Specify the location of the HTML page. This page can be a file on your computer ("..." button) or an Internet address (e.g.: http://www.mywebdevsite.com/mapping.html). The HTML page is displayed in the “Page preview” frame.
    4. Validate. A new WEBDEV page is created.
    5. Save the page. The page is automatically added to the list of project elements.
Previous LessonTable of contentsNext Lesson
Minimum version required
  • Version 26
Comments
Click [Add] to post a comment