====== Creating Views ======
There are four ways to send events to an ActionFlow controller.
* By a link
* By a form
* By an AJAX link
* By an AJAX form
Any ActionFlow controller views can easily use these helper methods to create views that interact with the ActionFlow framework. To have all the details, consult the [[http://actionflow.devdonkey.org/rdoc-head/classes/ActionFlow/BaseHelper.html|BaseHelper API]].
===== Using links to send events =====
Links sending events can be created as follows.
<%= flow_link_to :caption, :event_name %>
This would produce the following code.
caption
See the [[API]] for more details and configuration options.
===== Using forms to send events =====
Forms sending events can be created as follows.
<%= flow_form_tag %>
<%= flow_submit_tag 'caption 1', :first_event %>
<%= flow_submit_tag 'caption 2', :second_event %>
<%= end_flow_form_tag %>
This would produce the following code.
<%= flow_link_to_remote 'caption', 'event_name', :update => 'domElementId' %>
This would produce the following code.
caption
See the [[API]] for more details and configuration options.
==== RJS Integration ====
ActionFlow is fully compliant with Rails RJS functionnality. If you master RJS, you'll understand.
===== Using AJAX forms to send events =====
AJAX forms sending events can be created as follows.
<%= flow_form_remote_tag :update => :form %>
<%= flow_submit_tag 'Update', :update %>
<%= flow_submit_tag 'Quit', :quit %>
<%= end_flow_form_tag %>
This would produce the following code.
See the [[API]] for more details and configuration options.
~~DISCUSSION~~