Documentation

Sync Panel Element - #sync_panel {}

The sync_panel element produces an HTML div which is hooked directly into a comet pool and immediately updates itself with the latest data when certain trigger messages are sent to that comet pool.

Usage

   #sync_panel {
     pool=some_pool,
     triggers=[{my, trigger}],
     body_fun=fun my_body/0
   }.

Attributes

  • pool (Erlang Term) - The name of a global Nitrogen comet pool.

  • triggers (List of Erlang Terms) - A list containing trigger messages which when broadcast to the comet pool will trigger an update and redraw via the body_fun attribute.

  • body_fun (Function with arity 0) - A function which returns Nitrogen elements.

Assisting Function

  • element_sync_panel:refresh(CometPool, Trigger) :: Trigger a refresh on all #sync_panel elements connected to the specified CometPool and which also has the specified Trigger listed in its triggers attribute.

See Also



View Source or Submit Corrections for this Documentation Page
Copyright © 2008-2021 Nitrogen Web Framework. Released under the MIT License.