CookBook

Method of the usage of IM-BloomMaker custom scripts and the acquisition and substituted from $variable

Posting Date: 2019 - 07 - 31 Modified:

In this lesson, we will show how of the usage of custom scripts, which is one of an action of IM-BloomMaker and retrieve and assign from $variable (variable).
Will be explained custom scripts and $variable actually by creating a sample screen.

Completion Image

Is a sample screen that is created in this lesson.

  • Designer screen

  • Actual screen

Operation contents are as follows:

  1. Error message is displayed when you press "execute" button in the state check box is not selected.
  2. The confirmation dialog box will be displayed when you press "execute" button in the state in which the check box is selected.
  3. Displays completion messages If you click OK on the confirmation dialog.
  4. And display the message that is canceled If you press Cancel of confirmation dialog boxes.

Finished Example

Take advantage download and the following and it will be complete. sample.

Screen sample import file: cookbook_163287.zip
Please import from the import screen of IM-BloomMaker.

Access the following URL, when you run it in your local environment.
http://localhost:8080/imart/bloommaker/designer/im_cookbook_163287?css-framework=imui
In addition, replace the following base URL for your local environment.
http://localhost:8080/imart

Recipe

Creation procedures of sample screen is shown below.

  1. Element is placed in page
  2. Declared variables needed for processing, Associate to the element is placed
  3. Actions created and describe the custom scripts

1. Element is placed in page

  • Please "box (repetition scheduling allows scheduling by specifying the) " are set in the page from "repetition scheduling allows scheduling by specifying the" of the element palette.

  • Please from "form part" of the element palette and place it inside the "box (repetition scheduling allows scheduling by specifying the) " you just placed the "check box".

  • Please "button" are set in the page from "form part" of the element palette.
    After deployment, please enter the "execute" for the value of the Property Tab.

2. Declared variables needed for processing, Associate to the element is placed

  • Confirm that "variable" is selected in the pull-down of the variable tab, you should cut and paste the following JSON to JSON editor create the variable.

  • Press the edit button of the variable after creating "checkResult" of variable tree open variable editor, and type for the value to change the "true/False Value" by pressing the OK button.
    In a similar way, please change it to the "true/False Value" type of the value of "rtnConfirm".

  • Press "box (repetition scheduling allows scheduling by specifying the) " placed in the page, please set "$variable.userName" to "list" property of the Property Tab.

  • Press "check box" placed in the page, please set "$variable.userName [$index] " to "textContent" property of the Property Tab.

    In addition, please take a look at this article $index.

  • Continue, please set "$variable.userName [$index] " to "value" property.

  • Continue, please set "$variable.checkStatus [$index] " to "checked" property.

3. Actions created and describe the custom scripts

ⅰ. "execution" Create an action
  • Press the "new creation" button of the Action tab open the Action Editor, please enter the "execution" to an action name.

  • Dragged and dropped in the right pane "run a Custom Script" from "action" -> "standard" in the left pane, enter the following code.

To the custom script, you can state the process in JavaScript language.
However, you cannot operate the DOM so please be careful.

Can access to the variable in getter and setter by mentioning as a key name of the $variable. variable in a custom script.
It is not pass-by-reference. Please be careful.

If/input, please state in the following manner.
Key name of the $constant. Constants
Key name of the $input. input

  • Dragged and dropped under the "run a Custom Script" on the right pane "to display message" from "action" -> "standard" the Left Pane, please set in the following manner.
Setting items Contents of settings
To display message $variable.successMessage
Flag to click Close (arbitrary) Is ON
Close time (milliseconds) (arbitrary) 3000

  • Dragged and dropped to "to display message" on the right pane "above custom scripts return value of true" from "execution condition" -> "standard" in the left pane, enter the following code.

  • Dragged and dropped under the "to display message" on the right pane "error message is displayed" from "action" -> "standard" the Left Pane, please set in the following manner.
Setting items Contents of settings
Error message is displayed $variable.cancelMessage
Flag to click Close (arbitrary) Is ON
Close time (milliseconds) (arbitrary) 3000

  • Dragged and dropped to "error message is displayed" on the right pane "above custom scripts return value of true" from "execution condition" -> "standard" in the left pane, enter the following code.

  • Close the Action Editor by pressing the OK.
ⅱ. "check" Create an action
  • Press the "new creation" button of the Action tab open the Action Editor, please enter the "check" to an action name.

  • Dragged and dropped in the right pane "run a Custom Script" from "action" -> "standard" in the left pane, enter the following code.

  • Dragged and dropped under the "run a Custom Script" on the right pane "to perform an action □" from "action" -> "standard" the Left Pane, please select "execution" from the pull down.

  • Dragged and dropped to "to perform an action □" on the right pane "above custom scripts return value of true" from "execution condition" -> "standard" in the left pane, enter the following code.

  • Dragged and dropped under the "to perform an action □" on the right pane "error message is displayed" from "action" -> "standard" the Left Pane, please set in the following manner.
Setting items Contents of settings
Error message is displayed $variable.errorMessage
Flag to click Close (arbitrary) Is ON
Close time (milliseconds) (arbitrary) 3000

  • Dragged and dropped to "error message is displayed" on the right pane "above custom scripts return value of true" from "execution condition" -> "standard" in the left pane, enter the following code.

  • Close the Action Editor by pressing the OK.

  • Finally, press "execute" buttons on the page, please set "check" action (s) to a "event" -> "at the time of clicking" of Property Tab.

Creation of sample screen using custom scripts and $variable is complete.

Operations Confirmation

You should check if the created actions and custom scripts to work properly.
Can be made operation confirmation By clicking "preview" icon on the toolbar.

There is no problem as long as operate in the following manner.

  • Error message is displayed when you press "execute" button in the state check box is not selected.
  • That confirmation dialog is displayed when you press "execute" button in the state in which the check box is selected.
  • That completion message is displayed when you press OK of confirmation dialog boxes.
  • That the message that is canceled If you press Cancel the confirmation dialog is displayed.

-CookBook
-

Author:


comment

Field that does not mail address is published. * is attached is required item

Related article

How to separate is output to the table binding data in the spreadsheet

Json data and binding data in the spreadsheet is stored in a binary column in Forma header table. spreadsheet data that are stored in the Forma Header table, registration data information Administration…

no image

Introducing the Watch function

In this lesson you are introduced Watch features that are included in "intra-mart Accel Collaboration". I think there are many opportunity to work in groups in each company. on to do the work,…

no image

Example of working with date data in calculation formula of ViewCreator

By using "ViewCreator can be easily are displayed on the screen data that are stored in the database, etc. About ViewCreator -- intra-mart Accel Platform V…

no image

How to embed calculation result to the URL of the header of the ViewCreator or link to be placed in the footer

In this article, at the time of embedding link in the header or footer of ViewCreator, how to use function. When you use this method, such as passed "nowadays date" in parameter character string can be realized.…

no image

CSRF Measures in script development (form tag Edition)

And Cross Site Request Forgery (CSRF), invalid HTTP request to send to the Reader is the attack technique to execute the intended process of attacker. In this lesson, script open…

There is no data yet.

RSSRSSRSSRSS