Feedback

Creating Ajax button

The action button of the ajax type creates an ajax event of the onClick type, allowing the execution of routines without the need to reload the application.

Example of the action button in the application

Example of the link action button

See below how to create and configure this type of button.

Creating one button

on the screen of list of buttons click Create New Button.

Tela de gerenciamento dos botões de ação, criar botão

Button data

Then, select the Type and inform the name of the button.

The name field only allows numbers, unaccented letters and underscores.

Button name and type definition screen

Button visual settings

On this screen you must define the appearance of the button for displaying in your application. Button edit screen

Check out the detailed view configurationoptions below.

Display type

Tipo de exibição do botão de ação

This attribute defines the display format which can be: FontAewsome, Button, Image or text.

Some display options are displayed according to the type of display used.

The options are:

FontAwesome

This is the default value of the attribute. In this setting, the button will be shown only how a font awesome icon.

See a font awesome example

Exemplo do botão de ação como imagem Font Awesone

Button

In this configuration, the button will be shown as a standard Scriptcase button, inheriting the button theme used in your application.

After selecting this option, another option (Button format) will be displayed and you will have to define how the button label will be displayed. In this attribute you can choose between:

  • FontAwesome - The button will only display with FontAwesome.
  • Text - The button will only display with text.
  • Font Awesome and text - The button will appear with FontAwesome and text, with the text positioned to the right.
  • Text and Font Awesome - The button will appear with FontAwesome and text, with the text positioned to the left.
See a button example

Exemplo do botão de ação como imagem Font Awesone

Image

Using this option, you must upload or select an image in the Scriptcase image manager.

Example of action button as image

Exemplo do botao de ação do tipo link

Text

Using this option, the action bar button will be display how a link.

Example of action button as Text

Exemplo do botao de ação do tipo link

ID

This attribute defines the name to a button state.

No allowed the use langs or anytype variables in this attribute.

Atributo Label do visual do botão de ação

Font Awesome

Defines the font awesome that will be displayed in the button.

This option is displayed when selecting in the Type of Display attribute the valures: FontAwesome or Button

selecionando icone do fontawesome

Action button example as Font Awesome image

Image

Defines the image that will be displayed in the application when selecting Type of display as image.

Atributo imagem

Click on the icon icone para abertura do gerenciador de imagem to open the [image manager][link_gerenciador_img]{:target=”_blank”} and select the desired image.

Text

The text attribute define text that will be display how a link in the action bar.

This option is displayed when selecting in the Type of Display attribute the valures: Button or Text

The text definition has no character restriction and can be done with a fixed text or using a lang, to create systems with multiple languages.

See more details about langs and about our Data dictionary.

Color

Sets the color of the Font Awesome icon. Cif no value is informed, the icon assumes the color defined in the general configuration of the [action bar visual][link_editar_visual]{:target=”_blank”}.

Displayed only when using Type of display as FontAwesome

Selecionando a cor do ícone

Color (Hover)

Atributo cor do hover, define a cor ao posicionar o mouse sobre o link

Sets the color of the Font Awesome icon in hover state, when hovering the mouse over the icon.

Available when selecting Display Type as FontAwesome.

Color (Active)

Atributo cor do link ativo, define a cor do link quando estiver ativado

Sets the color of the Font Awesome icon in the active state.

Available when selecting Display Type as FontAwesome.

Button Visual

Button Visual

This attribute defines the color of the button. You can select a color from the list or use the Theme option to inherit the button layout used in your application.

Only available when selecting Display Type as Button.

Button Visual (Hover)

Button Visual (Hover)

This attribute sets the color of the button on button hover. You can select a color from the list or use the Theme option to inherit the button layout used in your application.

Only available when selecting Display Type as Button.

Hint

Defines the help text for the button.

Definição do hint do icone

The text definition has no character restriction and can be done with a fixed text or using a lang, to create systems with multiple languages.

See more details about langs and about our Data dictionary.

Exemplo do hint na app

Confirmation Message

The confirmation message is displayed after clicking the button and before that action is performed.

Confirmation Message example

Confirmation Message example

The text definition has no character restriction and can be done with a fixed text or using a lang, to create systems with multiple languages.

See more details about langs and about our Data dictionary.

Delete

Deletes a button state.

Botão Adicionar Estado

add state button Adds a line for configuring a new state for ajax button.

These states can be manipulated using the macrosc_actionbar_state at ajax event.


Botão salvar e crir click

After adding the desired states and configuring the appearance of the buttons, click on Save button and configure ajax to create the button and event.

Ajax Event

The ajax event will be created, which will be executed on the button’s onClick.

In this event we must code the procedures that we want to carry out. Added some macros for handling the action buttons: