Button dom node.
This node is used inside a dom to display a either a button, highlight button or link. Supported fields of this node are:
- id: The id of this node
- status: The stati where the node should be shown
- rights: One of the rights needed to show the node
- edit: Defines the edit state of the node
- title: The name to display
- text: The second line text of the highlight button
- icon: The icon of the button
- link: The href link where to navigate to on click
- target: The target to open the new link in like _self/_blank
- workflow: The workflow which should be executed on click
- typ: Define the type of the button as: button/highlight/link
Within the layouter this button can be used like this:
Methods
Creates a new Button.
Example
let node = new;
node.text = "Cool Button";
node.icon = "link";
node.link = "www.exolynk.app";
node.typ = "highlight";
Protocols
let output = value.id
Get the id of the node as String. A node Id should be unique inside the complete dom.
Example
let node = new;
node.id = "id_123456";
assert_eq!;
value.id = input
Set the id of the node as String. A node Id should be unique inside the complete dom.
Example
let node = new;
node.id = "id_123456";
assert_eq!;
let output = value.status
Get the different status of the node as Vec<String>. This node and all it's child will only be displayed, when no status is set or the record has any of the given stati.
Example
let node = new;
node.status = ;
assert!;
value.status = input
Set the status of the node as Vec<String>. This node and all it's child will only be displayed, when no status is set or the record has any of the given stati.
Example
let node = new;
node.status = ;
assert!;
let output = value.edit
Get the edit status of the node as Option<bool>. The edit mode can be set as true or false. When the edit mode is not set, it takes the system edit state.
Example
let node = new;
node.edit = Some;
assert_eq!;
value.edit = input
Set the edit status of the node as Option<bool>. The edit mode can be set as true or false. When the edit mode is not set, it takes the system edit state.
Example
let node = new;
node.edit = Some;
assert_eq!;
let output = value.style
Get the style of the node as String.
Example
let node = new;
node.style = "color: red;";
assert_eq!;
value.style = input
Set the style of the node as String.
Example
let node = new;
node.style = "color: red;";
assert_eq!;
let output = value.rights
Get the different rights of the node as Vec<String>. This node and all it's child will only be displayed, when no rights are set or the user has one of the rights.
Example
let node = new;
node.rights = ;
assert!;
value.rights = input
Get the different rights of the node as Vec<String>. This node and all it's child will only be displayed, when no rights are set or the user has one of the rights.
Example
let node = new;
node.rights = ;
assert!;
let output = value.readonly
Get the readonly status of the node as Option<bool>. The readonly mode can be set as true or false. When the readonly mode is not set, it takes the parent state.
Example
let node = new;
node.readonly = Some;
assert_eq!;
value.readonly = input
Set the readonly status of the node as Option<bool>. The readonly mode can be set as true or false. When the readonly mode is not set, it takes the parent state.
Example
let node = new;
node.readonly = Some;
assert_eq!;
let output = value.title
Get title of the node.
Example
let node = new;
node.title = "Beatiful button";
assert_eq!;
value.title = input
Set title of the node.
Example
let node = new;
node.title = "Beatiful button";
assert_eq!;
let output = value.text
Get the second line text of the node.
Example
let node = new;
node.text = "Beatiful button";
assert_eq!;
value.text = input
Set the second line text of the node.
Example
let node = new;
node.text = "Beatiful button";
assert_eq!;
let output = value.icon
Get the icon of the button.
Example
let node = new;
node.icon = "link";
assert_eq!;
value.icon = input
Set the icon of the button.
Example
let node = new;
node.icon = "link";
assert_eq!;
let output = value.link
Get the link of the button.
Example
let node = new;
node.link = "www.exolynk.app";
assert_eq!;
value.link = input
Set the link of the button.
Example
let node = new;
node.link = "www.exolynk.app";
assert_eq!;
let output = value.target
Get the target of the button.
Example
let node = new;
node.target = "_blank";
assert_eq!;
value.target = input
Set the target of the button.
Example
let node = new;
node.target = "_blank";
assert_eq!;
let output = value.workflow
Get the workflow of the button.
Example
let node = new;
node.workflow = "test_wf";
assert_eq!;
value.workflow = input
Set the workflow of the button.
Example
let node = new;
node.target = "_blank";
assert_eq!;
let output = value.workflow_param
Get the workflow_param of the button.
Example
let node = new;
assert_eq!;
node.workflow_param = Some;
assert_eq!;
value.workflow_param = input
Set the workflow_param of the button.
Example
let node = new;
assert_eq!;
node.workflow_param = Some;
assert_eq!;
let output = value.typ
Get the typ of the button.
Example
let node = new;
node.typ = "link";
assert_eq!;
value.typ = input
Set the typ of the button.
Example
let node = new;
node.typ = "link";
assert_eq!;