Please enable JavaScript to view this site.

Knowledge Bridge Documentation

Help version: 3.3.8

 

Description

UIActionButton is a design that makes a button in the UI and can have an actionExpression. In the example below the button is used to restore the model rules back to their default values.

 

Parameter Rules

actionExpression: A string containing an expression to be evaluated at the root (this will be the root model).
Example:"R.model.deleteModelRules(this)"

 

caption:The text which appears on the button.                
Example:"DeleteModelRules"

 

container:The 'parent' container of this control.                
Example (Default):this.nha.isKindOf("UIContainerMixin") ? this.nha : undefined

 

customSpec:This object allows adding non-parameter attributes to the control.                
Example (Default):R.collectPartialSpec(this, [this.style])

 

doUpdate:If true, a root update is executed after the button operation takes place.                
Example:true

 

image:Indicates that an image should be shown. If true, [[imageUrl]] should be supplied.                
Example:true

 

imageAlignment:One of 'top', 'left' (the default), 'right', or 'bottom', indicating the image position relative to the caption, if any.                
Example:"right"

 

imageUrl:The URL for the image data, if any.                
Example:R.getUrl({ name: 'UIActionButton.jpg', id: 'a565ca90-46ca-43b5-7dd7-08d914b6d3a9' })

 

sequenceNo:The sequence number of this control, for tab-order.                
Example:0

 

tooltip:The text which appears when the cursor hovers over the button.                
Example:"Press to restore back to default values."

 

 

Mixins

UIButtonMixin

UIControlMixin

UIStyleMixin

BaseNode

BaseModel

 

 

RULE NAME

TYPE

DEFAULTS

CATEGORY

FLAGS

actionExpression

string

""

UI

Cached
Parameter

Spec

caption

string

""

UI

Cached
Parameter

Spec

container

any

this.nha.isKindOf("UIContainerMixin")

 ? this.nha : undefined

UI

Cached
Parameter

Spec

customSpec

any

{}

UI

Cached
Parameter

doUpdate

boolean

true;

UI

Cached
Parameter

Spec

 

image

boolean

false;

UI

Cached
Parameter

Spec

imageAlignment

string

"left"

UI

Cached
Parameter

Spec

imageUrl

string

""

UI

Cached
Parameter

Spec

sequenceNo

number

0

UI

Cached
Parameter

Spec

 

tooltip

string

""

UI

Cached
Parameter

Spec

 

 

kBridgeExampleIcon

 

Project Example:

In your kBridge Examples Projects folder open the project called ‘UIActionButtonTest’.

 

UIActionButton0

 

 

Open the UIActionButtonTest project.

Press the UI start icon to start the User Interface.

 

Set the Block Height, Length and Width to different values.

UIActionButton1

 

Now click on the 'DeleteModelRules' button. All of the model values have returned to their default values.

 

UIActionButton2

 

 

Here are the values that were fed to the UIActionButton.

 

return [{

"actionExpression":"R.model.deleteModelRules(this)",

"caption":"DeleteModelRules",

"doUpdate": true,

"image":true,

"imageAlignment":"right",

"imageUrl": R.getUrl({ name: 'UIActionButton.jpg', id: 'a565ca90-46ca-43b5-7dd7-08d914b6d3a9' }),

"sequenceNo":0,

"tooltip":"Press to restore back to default values.",

"fontSize":"200%"

}];

 

 

 

Knowledge Bridge from Engingeering Intent is a full-featured engineering and sales automation environment