Magic Buttons

Sodium has some built-in features for common operations. Magic buttons are one of them. For the operations below, just declaring a button with specific name is enough to execute desired action. Writing a "button_item_clicked" trigger function is not required for Magic Buttons. Therefore, If a trigger function is defined in Code Behind File or Controller File for any one of the Magic Buttons, it will not be executed.

Sodium developer may be in need of conditionally execute commands (commit, rollback, etc). If that is the case, different button name must be used and its custom trigger function must be defined in Code Behind File.

Like other buttons, magic buttons also must be defined in a control or data block.

For commit: Execute "commit" command for all active database connections.

<input name="commit" type="button" value="Commit"/>

For rollback: Execute "rollback" command for all active database connections.

<input name="rollback" type="button" value="Rollback"/>

For creation a new record:

<input name="create-record" type="button" value="Create"/>

For deleting a record:

<input name="delete-record" type="button" value="Delete"/>

In order to show first page:

<input name="first-page" type="button" value="<<"/>

In order to show previous page:

<input name="prev-page" type="button" value=" < "/>

In order to show next page:

<input name="next-page" type="button" value=" > "/>

In order to show last page:

In order to change block status to "enter query" mode:

In order to execute filtered query on a block:

In order to cancel "enter query" mode:

In order to kill session

In order to change current theme

Last updated

Was this helpful?