2014-10-08 16:45:26 +00:00
caption: action-sendmessage
created: 20141008134309742
2021-10-27 10:20:11 +00:00
modified: 20211023160110220
2014-10-08 16:45:26 +00:00
tags: Widgets ActionWidgets
title: ActionSendMessageWidget
type: text/vnd.tiddlywiki
! Introduction
2016-04-04 11:45:31 +00:00
The ''action-sendmessage'' widget is an [[action widget|ActionWidgets]] that sends a [[message|Messages]] back up the widget tree. ActionWidgets are used within triggering widgets such as the ButtonWidget.
2014-10-08 16:45:26 +00:00
! Content and Attributes
The ''action-sendmessage'' widget is invisible. Any content within it is ignored.
|!Attribute |!Description |
|$message |The message to send (eg, [[WidgetMessage: tm-new-tiddler]]) |
|$param |Optional parameter string whose meaning is dependent on the message being sent |
2015-06-19 15:39:47 +00:00
|$name |Optional name of additional parameter |
|$value |Value for optional parameter whose name is specified in `$name` |
2021-10-27 10:20:11 +00:00
|$names |<<.from-version "5.2.1">> Optional filter evaluating to a list of additional parameter names |
2021-10-30 14:28:54 +00:00
|$values |<<.from-version "5.2.1">> Optional filter evaluating to a list of parameter values corresponding to the parameters names specified in `$names` |
2015-06-19 15:39:47 +00:00
|//{any attributes not starting with $}// |Multiple additional, optional named parameters that are attached to the message |
2014-10-08 16:45:26 +00:00
! Examples
Here is an example of button that displays both a notification and a wizard, and creates a new tiddler with tags and text:
<$macrocall $name='wikitext-example-without-html'
src='<$button>
<$action-sendmessage $message="tm-modal" $param="SampleWizard"/>
<$action-sendmessage $message="tm-notify" $param="SampleNotification"/>
<$action-sendmessage $message="tm-new-tiddler" title="This is newly created tiddler" tags="OneTag [[Another Tag]]" text=<<now "Today is DDth, MMM YYYY">>/>
Click me!
</$button>'/>