1. #1
    Sencha Premium Member
    Join Date
    Jun 2009
    Location
    Rio de Janeiro, Brazil
    Posts
    13
    Vote Rating
    0
    stefanosandes is on a distinguished road

      0  

    Default Answered: New datatype in MVC

    Answered: New datatype in MVC


    Hi everyone,

    I need to create a new datatype for my model, I get a json server using this format: "/ Date (1333249200000) /", but the DATE type generates an warning. So I need to create my own datatype.

    My new datatype is this:

    PHP Code:
    Ext.data.Types.JDATE = {
         
    convert: function (valuerecord) {
             var 
    exp = / ([^ /]) + /;
             return new 
    Date (eval (value.match (exp) [0]));
         }
         
    type'JDate'
    }; 
    I'm using an example I saw in the documentation. My question is: Where should I put this code?

    My application follows the MVC pattern.

    Sorry for my bad English.

    Thanks!


  2. #2
    Sencha User jerome76's Avatar
    Join Date
    Apr 2012
    Location
    New Jersey
    Posts
    1,149
    Answers
    132
    Vote Rating
    99
    jerome76 is just really nice jerome76 is just really nice jerome76 is just really nice jerome76 is just really nice jerome76 is just really nice

      1  

  3. #3
    Sencha Premium Member
    Join Date
    Jun 2009
    Location
    Rio de Janeiro, Brazil
    Posts
    13
    Vote Rating
    0
    stefanosandes is on a distinguished road

      0  

    Default


    Quote Originally Posted by jerome76 View Post
    Very goooood!!

    Thank you!!!!

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi