Search

Module: Editor

Version: 2.2.1 +

User: Developer

Object Type: Output Object

Description

A Button object provides output on your website. A Button object creates a clickable object in your application, that can invoke different follow-up actions. For instance by using an Action or ChangeValue that creates changes in your webpage, or a Navigator object that takes you to another webpage.

Properties

Buttontype

Here you can select the type of button you want:

  • Normal: no special properties involved
  • LogIn: A type Login Button has the property that a certain condition must be met, to be able to log in into the application. For example a password that must be entered correctly.
  • LogOff: When a user clicks a LogOff Button the session is closed, and the user is taken to the LogOff page.
  • NewSession: When clicking a 'NewSession'Button, a new session is started.  
  • NewWindow: When clicking a 'NewWindow' Button, a new window is opened. If this window is closed, then the page that holds the button is shown again. The NewWindow Button doesn't start a new session. If a user has changed something in the opened new window, this will affect the initial webpage as well.
  • NewThread: When clicking a 'NewThread' Button, a new window is opened, which will be a copy of the document. Any changes made in this new window will not affect the initial document.
  • RedirectToIdentityProvider: When an external identity provider is used for the authentication and authorization process of your Futurama application this is configured in the web.config of your application (see Configuration - Identity Provider). To redirect to this external identity provider the RedirectToIdentityProvider type of the buttons has to be selected. 
  • LogOffAndKeepSession: When a user clicks this button the user is logged off, but the Futurama Session is still open, so all choices that are made in the session are still remembered.  (This setting is available from version 17.02)

The difference between a Button of type NewWindow, NewThread and NewSession is only applicable in the situation where cookieless="true" (to be configured in the web.config of your application). If cookieless="false" the behavior of these three types of a button is the same (like NewWindow).

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

Enabled

Possible values are 'True' or 'False'. If the value is 'False', then the object can not be used within the application.

IdentityProviderName (from version 18.10)

When the buttontype is set to ‘RedirectToIdentityProvider’, the value of this property indicates which IdentityProvider the user should be directed to. It should be set to the “Name” attribute of the configured provider. When only a single identityprovider is configured, this value can be kept to the empty value (default), which means that the only configured provider will be chosen.

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.

LoginCondition

The LoginCondition is used in combination with the ButtonType 'Login'. Clicking the button will only log in a user when the LoginCondition is met. For example a password that must be entered correctly.

TargetControl (until version 4.2.0)

The property TargetControl is used to navigate to another webpage when a button is clicked. It's possible to select multiple 'targets'. In the property TargetIndex you then should enter which target should be used.

From version 4.2.1 and further, this feature is not available anymore. You should add a Navigator object to enable navigation to another webpage instead.

TargetIndex (until version 4.2.0)

This property is used to define which TargetControl should be used when the button is clicked. It's possible to enter for instance a Formula. The result of the formula then defines the appropriate TargetIndex.

From version 4.2.1 and further, this feature is not available anymore. You should add a Navigator object to enable navigation to another webpage instead.

ToolTip

In the property Tooltip a text can be entered that is shown in the application when a cursor is moved across the Button. In this way information about the usage of the button can be given to the user.

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.

UpdatePanel

In this property you can create a reference to a WebPanel. When the Button is then clicked on in the application, ónly this WebPanel will be refreshed. The rest of the page will not be changed. When the property is left empty, the WebPage will be refreshed as a whole.

CssClass

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

ImageFileName

In this property you can enter or refer to an image that will be displayed as a clickable object.

ImageHover

In this property you can enter or refer to an image that will be displayed when the cursor is movead across the Button object. This property is often used when creating a menu.

Text

Instead of using an image file, you can also enter a text, which will be displayed as a clickable link. From Futurama version 18.02 it is also possible to define the texts within a ResourceDocument. See the page Text management and Multi-language.


Rendering

A distinction can be made between two types of Buttons.

When you have defined an image in the property ImageButton, then the button is rendered as

When you have entered a text in the property Text, then the button is rendered as

When a classname is entered in the CssClass property, for example "YourButton", the Button is rendered as respectively:

or

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.

Executing a Button directly in WebMode

It is possible to execute a Button 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 Button within your application with the ID is 12, and you want to execute it. This can be done using the URL: http://localhost/Futurama/?Folder=Test&button=12.

From Futurama version 6.0+ this functionality only works when the referred button is present on the current page. Should this not be the case then the best course of action is by creating a WebPanel with a reference to this button on the page, and setting the panel’s Class property to a CSS-class that renders it invisible to the browser. This way the button is loaded on the webpage but not usable by the end user.

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.

- Action

- ChangeValue

- ClearCache

- Navigator

- Reference

- DropDownList

- WebPage

- WebPanel

Relevant Tutorials

- Adding interactivity to your website: This tutorial shows how you how to use Buttons to add interactivity to your website.

- Multiple Pages and Navigation: This tutorial shows you how to use Buttons to create navigation between different webpages.

 

Updated: 2018-10-16