Search

Module: Editor

Version: 2.2.1 +

User: Developer

Object Type: Output Object

Description

A WebPage object provides output on a website. For each seperate webpage of your web-application you can define a WebPage object. Within the properties of the WebPage you can define its layout.

Properties

AutoPrint

The AutoPrint property has 'True' and 'False' as possible values. If the value is 'True', then a print screen will be directly opened when entering the WebPage, so that the page can be printed directly.

DebugLogMode (from version 4.1)

Indicates the level of detail of debug information that is logged during runtime of the website to the trace, a logfile, a database etc. The possible values are:

  • None: no debug information is logged
  • Simple: only basic information is given
  • Extended: in addition to the information in the Simple mode the values of all the properties of the object are shown

IsPublic

Possible values are 'True' or 'False'. If the value is 'False', then the object can only be used within the document where it is created. If the value is 'True', then also from other Futurama documents can be referred to this object. This means that changes in the object also affect the document in which is referred to this object. If the value is 'True' and you attempt to move or delete the object, a warning will be given. To limit these warnings to a minimum it is recommended to set IsPublic to 'True' only when necessary.

Visible

Possible values are 'True' or 'False'. If the value is 'True', the object will be rendered and therefore displayed in your application. If the value is 'False', the object will not be rendered.

XmlName

The name of the object as it is shown in the source of the website. By default the XmlName is equal to the name given in the property (Name) with spaces replaced by underscores, but you are free to change it.

(Name)

The name of the object.

Comment

Here a comment can be entered. For example a short description of the object.

ID

The unique identification number of the object. This number is automatically generated by Futurama on the moment of creation. This number can be used when searching for a certain object in the Find Window.

IsAjaxUpdatePanel

This is an automatic property indicating if the object is referred to as an UpdatePanel. Possible values are 'True' or 'False'.

CssClass

Here the CssClass can be entered. In the stylesheet you can define the style elements that belong to this class.

Stylesheet

Here you can define or refer to the stylesheet that should apply to the WebPage. In this stylesheet, the layout of the WebPage is defined.

PageData

With this property you can create a reference to an XmlBuilder that contains data that you can reference in the webpage. For example, if the XmlBuilder contains an element with type string and the name Name and the value “E. Xample” you can include in any string on the webpage {{PageData:Name}} and it will be replaced by “E. Xample”.

If the the XmlBuilder contains an element of type boolean with name testCondition then you can you create a text like: "This is a a teststring with {{if:PageData:testCondition}}Value if true{{/if}}"

From Futurama 19.04 it is also possible to define a array within the PageData XmlBuilder. This for example can be used in combination with a WebListBox (see WebListBoxIndex section of the WebListBox).

PageControls (version 21.01+)

Futurama WebControls (for example Buttons, CheckBox, WebListBox, DropDownList) are rendered in the HTML of a page in the order the controls are defined in the Futurama Document in the Futurama Editor. With CSS it is possible to layout and position these controls. In some situations it was difficult to position the WebControls at the right position at your webpage. Especially in situations where you want to use a Futurama WebControl within text this was difficult to model. For example if you want to have the text 'Click at this button to proceed', in the HTML of your page. Or you want to display 'you are intended to retire at x years and y months', where x and y are DropDownLists with respectively years and months to select. In these situations before 21.01 you had to define a XSLT with a reference to the ID of the Button to be clicked on (and this Button had to make invisible with CSS), or you had to define a couple of WebLabels around the DropDownLists. 

From Futurama 21.01 it is possible to render a WebControl at the desired place inside the XSLT or HTML of your WebPage. With the property PageControls of WebPage you can create a Reference to a WebPanel that contains the WebControls that you want to render in your HTML. If this WebPanel contains a WebControl with name ControlName, you can include {{PageControl:ControlName}} in any string on the WebPage and it will be replaced by the HTML that Futurama normally generates for the same WebControl. The name of the WebControl (in this example ControlName) can only refer to WebControls inside the referenced WebPanel. It is not allowed to refer to the WebPanel itself, to a non-WebControl (such as a UserVariable), or to a WebControl outside this WebPanel, or to the same WebControl more than once. The referenced WebPanel will not be rendered on the WebPage, regardless of its Visible property. Your HTML must be placed outside the referenced WebPanel.

Advantages of using PageControls are:

  • You can mix WebControls with content from XSLT and HTML.
  • You can set up part of the HTML structure of the page outside Futurama in an HTML tool.
  • You need no difficult constructions in order to position the WebControls in a way you want.

For example:

A WebPage named TestPage has a Button named TestButton. This TestButton has ID 13 and text "Click on this button". The TestPage also has a HTMLInclude with HTML "<p>Here comes button TESTBUTTON and good luck!</p>", where TESTBUTTON must be replaced by the HTML code for TestButton.

Before Futurama 21.01 you had to use CSS class ‘display:none’ to make this TestButton invisible, lookup the ID of it (ID 13), and replace TESTBUTTON in the HTMLInclude in the Editor by "<a href='?button=13'>Click on this button</a>".

From Futurama 21.01 you can add a WebPanel named TestPageControls to TestPage and make the property PageControls of TestPage refer to TestPageControls. Move the TestButton into TestPageControls. You must write the HTMLCode in HTMLInclude as "<p>Here comes button {{PageControl:TestButton}} and good luck!</p>". The web browser will render this HTMLInclude as "<p>Here comes button <a id="id13" href="javascript:__doPostBack('id13','')">Click on this button</a> and good luck!</p>".

Rendering

A WebPage is not rendered explicitely, as the content of the webpage is defined within the default BODY-code. It is possible however to define the layout of the WebPage (for example configuring margins). This can be done using the CssClass property. The CssClass entered will be rendered as the class of the BODY.

Beware that the rendering of objects depends on the DocType selected for your Futurama Document. The rendering mentioned above is based on the DocType XHTML_1_0. If your using the old DocType HMTL4_Transitional, please consult the Document page for further information.

Opening the WebPage directly in WebMode

It is possible to open a specific webpage directly in WebMode. For example when you have an application Test within the folder localhost/Futurama. This application is called upon with the URL http://localhost/Futurama/?Folder=Test. Suppose you have a specific WebPage within your application with the ID is 12, and you want to display this page. This can be done using the URL: http://localhost/Futurama/?Folder=Test&page=12.

Related Topics

- Futurama Objects: The Atlas chapter that describes all Futurama objects. See the Output-section for a description of the type of objects this object belongs to.

- Document

- WebPanel

Relevant Tutorials

- Creating a Website Application: This tutorial shows how you can create a website application.

- Styling your website with CSS: This tutorial shows you how to style your website using CssClasses.

 

Updated: 2020-01-05