Actions
// wires/Time.bx
class extends="cbwire.models.Component" {
data = {
"currentTime" : now()
};
function updateTime() {
data.currentTime = now();
}
}// wires/Time.cfc
component extends="cbwire.models.Component" {
data = {
"currentTime" : now()
};
function updateTime() {
data.currentTime = now();
}
}<!--- wires/time.bxm --->
<bx:output>
<div>
<p>Current time: #currentTime#</p>
<button wire:click="updateTime">Update</button>
</div>
</bx:output><!--- wires/time.cfm --->
<cfoutput>
<div>
<p>Current time: #currentTime#</p>
<button wire:click="updateTime">Update</button>
</div>
</cfoutput>Executing Actions
Event
Directive
Passing Parameters
Magic Actions
Action
Description
Was this helpful?