Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

How to update controller options and re-render element?

$
0
0
JavascriptMVC 3.2.4 here guys and gals =)

I'm writing a component which is instantiated on an element inside a "wrapper" controller.

e.g.
  1. this.element.find('table').components_table({
  2.             headers: {
  3.                 name: "Name"
  4.             },
  5.             rows: new $.Model.List([ 
  6.                 new $.Model({ name: "Chris" }), 
  7.                 new $.Model({ name: "Dave" })
  8.             ])
  9. });
This works fine but I don't know how to re-draw the component when the models change? I'm not going off server-synchronised events here. Effectively I want to provide the result of a search component as the new options to the table component...and automatically re-draw the table component.

Any ideas? I hope I'm missing something blatantly obvious!

Viewing all articles
Browse latest Browse all 3491

Trending Articles