wire:poll
Basic Usage
// wires/PollDemo.bx
class extends="cbwire.models.Component" {
data = {
"counter": 0,
"timestamp": ""
};
function updateCounter() {
data.counter++;
data.timestamp = dateTimeFormat(now(), "HH:mm:ss");
}
function updateStatus() {
data.timestamp = dateTimeFormat(now(), "HH:mm:ss");
}
}// wires/PollDemo.cfc
component extends="cbwire.models.Component" {
data = {
"counter" = 0,
"timestamp" = ""
};
function updateCounter() {
data.counter++;
data.timestamp = dateTimeFormat(now(), "HH:mm:ss");
}
function updateStatus() {
data.timestamp = dateTimeFormat(now(), "HH:mm:ss");
}
}What wire:poll Does
Available Modifiers
Was this helpful?