i’m trying to create the same thing as shown in the sproutcore doc
http://docs.sproutcore.com/
the searchfield on the left side and its dynamically changing content below.
i have set up the SC.ListView with its contentBinding and my fixtures are all shown.
how can i connect the input from a SC.TextFieldView with the content of my SC.ListView?
can someone provide an helpful link or maybe point in the right direction?
thank you
So your list view content is driven by an ArrayController. You can extend that controller and create an
App.FilteringArrayController. I think the SCUI framework has some sort of filtering controller already.For small to medium sized lists this will work.
EDIT — based on you clarification in comments things are different.
Keeping a million objects on the client is not a good idea. The browser will use a ridiculous amount of memory.
So you should change the above code, when the value changes, you should initiate a call to the server. The server should do the search for you. When it returns the results (which should be limited to say 100 records) you would update the content on the controller, and the GUI would update automatically.
Needless to say, with lots of data you are going to need a highly optimized implementation on the server. You are going to have to modify your UI elements to be inactive for the search.