galfy
unread,Oct 31, 2010, 7:55:55 AM10/31/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to JavaScriptMVC
Hi JVMC folks,
I am quite new to JMVC and would like to do the following:
1. Have one index.html that handles all requests.
2. If I have url like index.html#controller/action this will call the
controller "controller" and the action "action".
How to implement point two in JVMC 2? I was thinking that including
only 'controller/history' in my plugins and writing a controller like
the one above should work.
<code>
/**
* @tag controllers
*/
jQuery.Controller.extend('inviteController',
/* @Static */
{
onDocument: true
},
/* @Prototype */
{
/**
init: function(el, message){
this._super(el)
// add here code that needs to be initialized in the beginning
},
*/
list: function(params){
alert('List Action was called')
//this.render(); // renders app/views/todos/list.ejs
}
});
</code>
But it does not work. After calling from the browser this URL or
clicking on link having this URL I do not get alert window with "List
Action was called".
Any idea how to dela with this and where there is more info or
tutorials for the JavaScriptMVC ?
Thanks in advance
Gal