Using RiotControl on Project Picker

I’ve updated Project Picker to use riotControl to handle all actions, including moving all model management to store objects. If you are using riot in your FE, this may be useful.

pp

In order to test using multiple stores, I added a pretty useless “history” functionality which keeps track of the projects chosen by the picker.

Here’s how it works, there are three different kinds of actions:

  • User actions
    • Triggered by a user doing an action on the tag. (for example, clicking a button)
    • Handled inside the tags (riotControl not involved)
  • Command actions:
    • Triggered by a user action handler after gathering all required info from the tag.
    • Handled by the stores to execute actions.
  • Result actions:
    • Triggered by a command action handler after an action has been executed.
    • Handled by the tags (and stores to a lesser extent) to update their model.

Check the source code or see it live.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s