Binding in a mediator
What's the best practice for auto-updating a view based on changes in the model. Is it appropriate to bind to model properties or is their a better way?
Thanks
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by neil on Nov 06, 2012 @ 09:25 AM
sounds like you want presentation model
http://knowledge.robotlegs.org/discussions/suggestions/6-presentati...
http://joelhooks.com/2010/01/16/robotlegs-image-gallery-example-usi...
Support Staff 2 Posted by Ondina D.F. on Nov 06, 2012 @ 09:31 AM
Hello,
In most cases, the recommended way is:
A Model dispatches a custom event with a VO as a payload when its data changes.
A Mediator listens for that event and passes the VO on to its View by accessing View’s API.
Useful reads:
http://knowledge.robotlegs.org/kb/reference-mvcs-implementation/wha...
https://github.com/robotlegs/robotlegs-framework/wiki/Best-Practice...
and, of course, lots and lots of forum-discussions on this topic :
http://knowledge.robotlegs.org/search?q=model&t=d&scope=all...
Let us know if it helped you or not. Ask more questions if need be :)
Ondina
Support Staff 3 Posted by Ondina D.F. on Nov 06, 2012 @ 09:35 AM
Oops, didn’t notice Neil answered already.
+1 to Neil’s suggestion
4 Posted by neil on Nov 07, 2012 @ 02:35 PM
SPAM ALERT!
Support Staff 5 Posted by Ondina D.F. on Nov 07, 2012 @ 02:41 PM
Thanks, Neil. Spammer removed.
6 Posted by hbostic on Nov 10, 2012 @ 12:45 AM
Thank you all for the responses. I'm going with the VO approach right now, mainly because I am in learning mode. Once I get a bit more comfortable with the framework, I will employ the PM design and see what's doin
Again, thanks
Support Staff 7 Posted by Ondina D.F. on Nov 13, 2012 @ 10:39 AM
You’re welcome!
Ondina D.F. closed this discussion on Nov 13, 2012 @ 10:39 AM.