puremvc
|
|
« Reply #1 on: August 13, 2010, 07:20:53 » |
|
Yes, the component should have an ID.
If the component that shows the character data is different from the character itself, one way to handle this would be: * Click the character component, it sends an event, * The character's mediator hears it and sends a notification with the ID in the body, * A command responds to the notification, retrieves the data from the model and sends the data in the body of another notification * A mediator in charge of the component used to show the character data hears the note, sets the data on its component.
Or if the character component uses the data as a tooltip, then perhaps: * Clicking or hovering on the character component, it sends an event, * The character's mediator hears it, retrieves the data from the model and sets the data on its component.
-=Cliff>
|