PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Changing a dynamic page into an AWP page
  • Programming tips
  • Useful to know
  • Limitations regarding the content and the programming of AWP pages
  • Displaying an AWP page
  • Installing the AWP pages on a server
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Changing a dynamic page into an AWP page
To change a dynamic page into AWP page:
  1. In the editor, display the description of current page ("Description" from the popup menu of the page).
  2. In the "General" tab, check "Generation in AWP mode (without context)". This option is displayed for the dynamic pages only.
  3. Validate.
Where will the AWP page be saved?
Once a dynamic page was transformed into an AWP page, the page will be generated in AWP format in the <Project Name>_WEB directory of the project (in each sub-directory corresponding to the languages supported by the project).
Programming tips
  • The server code must be found in the initialization codes (page or controls).
  • The contexts must be managed by programming. The page must be positioned in the database (according to the parameters received in the URL for example). See Displaying an AWP page from another page for more details.
Useful to know
  • Refreshing an AWP page: Refreshing an AWP page triggers the entire code found in the page. For example, if the AWP page was used to perform an addition, this operation will be done again when the page is refreshed.
  • Processes: The order in which the processes are run when a click is performed on a button is as follows:
    • Initialization code of project
    • Declaration code of global variables of pages
    • Initialization code of page controls
    • Initialization code of page
    • Code of clicked button
      Whenever an action is performed in the AWP page, the corresponding HTML page is entirely rebuilt on the server.
  • Links: The links can be built by programming (URL used on the Link controls).
  • Links and buttons: You should prefer the links and buttons without "submit". A "<a href>" link is generated in the page.
Limitations regarding the content and the programming of AWP pages
  • First page of a project: An AWP page cannot be the first dynamic page of a project. An AWP page can be the home page of a project.
  • WLanguage trace functions: Only the output into a file is available (trFile constant).
  • Dialog boxes: The dialog boxes displayed by Confirm, Error and Info are ignored if a page is displayed in the same process by PageDisplay.
  • Global elements used in the project: When modifying an element global to the project (global procedure, query, class, ...), the project must be recompiled in order to take these modifications into account in the relevant stand-alone AWP pages.
  • Pagers: The pagers generated by RAD cannot be used in the AWP pages. Indeed, these controls use the project context (that does not exist in the AWP pages). These controls must be replaced by a programmed pager. Each link of the pager must display a page with specific data (page based on a query with parameters for instance).
    All the records can also be displayed in a cell with scrollbar.
    Versions 16 and later
    The pager in AWP mode automatically manages the method for passing parameters, without programming. This type of pager allows you to reference all the linked pages and it avoids having to use cookies to store the current search.
    New in version 16
    The pager in AWP mode automatically manages the method for passing parameters, without programming. This type of pager allows you to reference all the linked pages and it avoids having to use cookies to store the current search.
    The pager in AWP mode automatically manages the method for passing parameters, without programming. This type of pager allows you to reference all the linked pages and it avoids having to use cookies to store the current search.
  • Table control: The Table controls are limited (the browsing tables with Link columns do not operate anymore for example). They can be replaced by a looper (whose links are dynamically created by Url).
  • Image control: No generated image can be used in the AWP pages.
  • Element in memory (list box, combo box, looper): The content of these elements is volatile. The content of these elements should be systematically filled in the initialization code of the page.
  • The value of the read-only controls is lost and it must be recalculated whenever the page is displayed.
  • Size of AWP pages: With large projects (containing several classes, global procedures or queries), the size of the generated AWP pages will be quite important.
  • Global server variables: The global server variables of the project regain their default value whenever the page is accessed in case of stand-alone AWP pages. However, you have the ability to use DeclareAWPContext or hidden controls associated with the requested value.
  • WINDEV or WEBDEV components: The components handled by an AWP page are not found. They must be moved to the <ProjectName>_WEB directory.
  • Location of data files: The location of data files must be performed in the initialization code of project, via the following code line for example:
    HSubstDir("?", fDataDir())
  • Relative URL: The relative URLs created by programming in the home page of project must not be used.
Displaying an AWP page
An AWP page can be displayed from a static page, a dynamic page or a semi-dynamic page of a WEBDEV site.An AWP page can be displayed from a static page or from a dynamic page of a WEBDEV site.
An AWP page can be displayed:
  • from the WEBDEV interface: all you have to do is select the AWP page to display when describing the link.
  • by programming.
Installing the AWP pages on a server
To install AWP pages on a server, you can:
  • use the standard setup of a dynamic site. The AWP files are classified in the "Static HTML files" category.
  • use WDDeploy or any other FTP client to install the file on the requested site.
Minimum required version
  • Version 9
Comments
Click [Add] to post a comment