Re : Working with Observables and computes
It's fine to just use computes if that's what you need. One way to beter leverage the two is to create computes from your Observe so you don't have to manually update the Observe when a compute...
View ArticleRe : navigation for popup in can.route
Not really getting the whole picture from your post. So you use can.route and then open a popup. How do you expect the popup to behave?I would expect that the popup would close when the user navigate...
View ArticleRe : CanJS Route Not Working When Pressing The Browser's Back Button
can.route is working just fine, The 'controller1 init' is rendered briefly when the Control is created, but then can.route.ready(true) quickly fires the initial route change event and that HTML is...
View ArticleRe : Data not converted to observable?
If you want to keep them separate instead of having if conditions in findAll or findOne, then you can call .model or .models inside the custom finder method to convert raw data to model...
View ArticleRe : navigation for popup in can.route
Hi,here is my project flowfirst load the home page.in home page when i click link then popup open.i select any option in popup then will go to other pages based on the option selected.i can navigate...
View ArticleRe : Data not converted to observable?
I found a workaround, basically findAll is generic enough to be called by other finders. Now I have findAll and a bunch of other finders that just delegate to findAll with specific url and filter....
View ArticleCanJS and Play! framework 1.2.x
Hi.I'm trying to using CanJS with Play! Framework 1.2.x (http://www.playframework.com/) as backend. Models are defined at backend.Consider the following code snippets.Server-side, model Todo:public...
View Articlehtml page navigation in can.route
hi,i have an initial page that is the html page in my project.when i use route concept here all pages can navigate.but going back html can't navigate properly means when i click 3 times the back button...
View ArticleRe : How to create simple example using canjs
There are tons of resources at your disposal. I'd start here: http://canjs.com/guides/Tutorial.html
View ArticleRe : Data not converted to observable?
Yes, you can delegate to findAll but the above pattern works better when you want to make multiple ajax calls and construct a model object.For simple variations in URL I also delegate either findAll or...
View ArticleHow to correctly implement findAll method with custom server response...
I am using one rest framework that will reproduce following result: { count: 10 results: [ { id: 1 }, { id: 2 }, { id: 3 } ] } I need to adapt this custom server...
View ArticleProblem with steal packages
Hello,I am using JavascriptMVC 3.3 with packages features to load features only when needed.So I have a control defined in cookbook/recipe/create and I use it as a package in another...
View ArticleRe : Working with Observables and computes
Hi,Thanks for the reply.Based on that do you think it is preferably to pass the whole observe to controls and listen with:"{obsSelectLists.course} change"Thanks.Cheers,Linton Fernandes
View Articlecan.Observe.List.prototype.replace - keep the same values from removing and...
var list = new can.Observe.List([2, 3, 4]);list.bind('change', function(ev, index, how, newVals, oldVals) { console.log(index + ', ' + how + ', ' + newVals + ', ' + oldVals);});list.replace([2, 5,...
View ArticleRe : can.Observe.List.prototype.replace - keep the same values from removing...
for merging you can use .attr( values, true).Replacing piecewise would not necessarily be faster. It would have to create additional events. Sometimes just redrawing everything is faster than...
View ArticleRe : can.Component
Are the declarative bindings really necessary? Is it a really good practice?
View ArticleRe : Start listening for event in Control.
Hi,sorry for the late reply :).i want to do something like this:a = can.Control({},{'#id1 mousedown': function(){ this.options.evt = "mousemove";}'#id2 {evt}': function(){ ... }});only when i keep...
View ArticleUsing model.attr() as a proxy for "helper" methods - good practise or confusing?
JMVC 3.2.4 here,I've recently started using the model getters to represent attributes that are not provided on instantiation and are effectively helper methods. Here's an example:ModelgetVerified:...
View ArticleRe : Using model.attr() as a proxy for "helper" methods - good practise or...
I absolutely agree. The model is an abstraction and clients of the model shouldn't need to know it's internal underlying json data structure. It would also result in cleaner views.
View Article