functional-vaadin.rx.observers
Reactive extensions to interface with RxClojure. These are functions to generate Observables from various Vaadin events.
events-in
(events-in act-fn & args)
Observe events from a function. On subscription, act-fn is executed asynchronously in a future and passed the subscriber (s)
and any extra args provided. Events are indicated by using (rx/on-next s) within the function. (rx/on-completed s) is sent when the
function completes, and any exceptions thrown are reported with (rx/on-error s e). The function should check for unsuncribes, and
act appropriately (usually terminating).
mouse-clicks
(mouse-clicks component)
Observe value changes for the given notifier. Returns the Observable. Subscribers will receive a Map
{:source notifier :event evt} where source is the source of the click (the notifier) and event is the MouseClickEvent.text-changes
(text-changes textField)
Observe text changes for the given notifier. Returns the Observable. Subscribers will receive a Map
{:source textField :event evt} where source is the source of the click (the textField) and event is the TextChangeEvent.value-changes
(value-changes notifier)
Observe value changes for the given notifier. Returns the Observable. Subscribers will receive a Map
{:source notifier :event evt :field-group fg} where source is the source of the click (the notifier), event is the ValueChangeEvent
and fg is the Fieldgroup of the form that the notifier is on, or nil if there is no form.with-action-events
(with-action-events component actions)
Add a set of shortcut actions to a Panel or Window, and generate events that track their activation. Actions are a
list of action specs, which are Maps with keys :name and :keycode. These specify the action and keycode for eact action.
On activation, sunscribers will receive a value that is a Map of :action, :sender and :target keys. These are as passed
to the handleAction method of the Action.Listener interface.