1. #21
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,509
    Vote Rating
    374
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    validate is different from isValid. isValid of BasicForm calls validate of each field. validate also marks/clears field invalid mark.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM


  2. #22
    Ext User
    Join Date
    Apr 2008
    Posts
    26
    Vote Rating
    0
    raviext is on a distinguished road

      0  

    Default


    Hi Saki and MJ

    Thanks for the quick response. This is one of the quickest, polite and helping response i ever got. Appreciate it.

    I am in the process of going through all the study materials you have suggested. I did go through the Yahoo Vedio's by Dough Crockford and was reading couple of good tutorials.

    I feel that i am somewhere mixing java language with the javascript. There is a clear definition of object and functions in java, and which is mixed in javascript. The "context and scope" are quite different in both and it is quite confusing in javascript. I did try few examples and successfully ran. But as a programmer i kind of get frustrated when i don't code with the ease at which i do it in Java. And when i see the plugin's that you guys have written , they are simply awesome.

    And right now i use firebug, though it is a very nice tool, but i still feel that it doesn't indicate the problem very clearly. Most of the time undefined (i think the scope understanding problem or my poor javascript problem

    I am using the spket eclipse plugin, but i kind of felt that it doesn't deal with the scope of the object. When i was studying your plugin, when i do alt space after certain objects i expected it to show me the functions and variables/properties. But it doesn't show any but your plugin works perfect.


    Regards
    Rave

  3. #23
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,509
    Vote Rating
    374
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    I thing you're headed veeeeeery good direction!

    Re scope: Have you seen this: What is that Scope all about ?
    Re firebug: Just get used to it, there is nothing better.
    Re eclipse: I don't know, I use vim.

    Good luck!
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM


  4. #24
    Ext User
    Join Date
    Apr 2008
    Posts
    26
    Vote Rating
    0
    raviext is on a distinguished road

      0  

    Default


    Thanks Saki for the info.

    One dumb question. I couldn't find an option to start a new thread. Please let me know how can i do that, so that i can maintain the sanctity of the threads. If there is no way then i will continue on this thread.

    Here is my question.

    I am trying to use Ext.XTemplate() and few other renderes. In the following code "editlink" is a renderer and i am trying to call the javascript from that URL. I get an exception in the firebug
    "callAlert is undefined" . Please let me know how can i call any javascipt function from the HTML code written inside renderer or from inside Ext.XTemplate()


    Code:
    function editlink(value, p ,record) { return String.format('<a href="javascript:callAlert()">Edit</a>', record.data.id) }
    function callAlert() { alert(" Need to take care of other stuff"); }
    var cm = new xg.ColumnModel([ expander, {header: "Company Name", width: 120, sortable: true, dataIndex: 'name', renderer:renderTopic}, {header: "Website", width: 120, sortable: true, dataIndex: 'website'}, {header: "Status", width: 120, sortable: true, dataIndex: 'status.value' }, {header: "Created By", width: 120, sortable: true, dataIndex: 'createdby'}, {header: "Created Date", width: 120, sortable: true, dataIndex: 'createddate'}, {width: 60, sortable: true, dataIndex: 'createddate', renderer:editlink} ]);

    ~Rave

    Last edited by mystix; 10 May 2008 at 11:32 PM. Reason: use [code][/code] tags

  5. #25
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,509
    Vote Rating
    374
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    Go to forum you want to create a new thread in, not existing thread but Forum, and click new thread button at the top.

    (X)Template are meant to generate html code not to call functions or create object. They are very well documented:
    http://extjs.com/deploy/dev/docs/?class=Ext.XTemplate
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM


  6. #26
    Ext User
    Join Date
    Apr 2008
    Posts
    26
    Vote Rating
    0
    raviext is on a distinguished road

      0  

    Default


    Hi Saki

    Thanks for the response. So we cann't call javascript functions in from the "renderer" and Xtemplate. The reason for asking this question was, i had seen couple of threads having javascript in Xtemplate

    http://extjs.com/forum/showthread.php?p=147036

    Regards
    ~Rave

  7. #27
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,509
    Vote Rating
    374
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    Renderer is one thing - you can call anything from there and XTemplate is another thing. XTemplate supports arbitrary code execution but is not designed to create Ext components, but to generate html output.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM


  8. #28
    Ext User
    Join Date
    Apr 2008
    Posts
    26
    Vote Rating
    0
    raviext is on a distinguished road

      0  

    Default


    Hi Saki

    As per your suggestion, I have been working for last couple of weeks with the help of forums and few tutorials and been able to do quite some stuff in ExtJS. Now i think i would like to explore doing Extensions on ExtJS. Sometimes i hit to a requirement where i would have to Extend a component so wanted some suggestions from you.

    a) What should be the starting point to write extensions ?
    b) Any tutorials or links useful to start on this ?

    ~Rave

  9. #29

  10. #30
    Ext User
    Join Date
    Jul 2007
    Location
    Florida
    Posts
    9,996
    Vote Rating
    5
    mjlecomte will become famous soon enough mjlecomte will become famous soon enough

      0  

    Default


    Quote Originally Posted by raviext View Post
    Hi Saki

    As per your suggestion, I have been working for last couple of weeks with the help of forums and few tutorials and been able to do quite some stuff in ExtJS. Now i think i would like to explore doing Extensions on ExtJS. Sometimes i hit to a requirement where i would have to Extend a component so wanted some suggestions from you.

    a) What should be the starting point to write extensions ?
    b) Any tutorials or links useful to start on this ?

    ~Rave
    You may also want to review:
    1. the tutorials (2) on scope
    2. overview
    3. component life cycle
    4. forum thread on extending
    5. object oriented overview
    Item 3 is linked in Item 2. Several of Saki's and others are linked in Item 2. Item 2 compiles and summarizes nicely.
    Item 5 may be good if you are new to OO js along with Item 1.