Quantcast
Channel: JavaScriptMVC Forum
Browsing all 3491 articles
Browse latest View live

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 Article


Re : 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 Article


Re : 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 Article

Re : 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 Article

Re : 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 Article


Re : 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 Article

CanJS 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 Article

How to create simple example using canjs

I am new to use canjs. please suggest me

View Article


html 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 Article


Re : 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 Article

Re : 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 Article

How 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 Article

Problem 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 Article


Re : 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 Article

can.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 Article


Re : 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 Article

Re : can.Component

Are the declarative bindings really necessary? Is it a really good practice?

View Article


Re : 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 Article

Using 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 Article

Re : 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
Browsing all 3491 articles
Browse latest View live