1. #21
    Ext JS Premium Member dancablam's Avatar
    Join Date
    Apr 2008
    Location
    Dallas, TX
    Posts
    134
    Vote Rating
    0
    dancablam is on a distinguished road

      0  

    Default


    Version 1.0.4 has been packaged and is available for download. It's highly recommended you upgrade to the latest version to take advantage of new features and bug fixes:

    • Added _raw request parameter for access to all request data
    • Removed automatic scanning of all plugins in favor of manually specified plugins (to prevent failed API generation for some plugins using auto classes)
    • Removed error handler - caused too many issues with external libraries
    • Added action namespace support
    • Fixed bug where app.yml params were not being pulled because of environment

    Cheers,
    Dan

  2. #22
    Ext User
    Join Date
    Feb 2009
    Location
    Japan
    Posts
    10
    Vote Rating
    0
    r3ap3r is on a distinguished road

      0  

    Default


    Quote Originally Posted by dancablam View Post
    Regarding Base Action classes - I believe prepending Base to an action class is somewhat common practice although I'm not sure exactly how prolific it is. I hadn't given any thought to the possibility of plugins being written that wish to take advantage of dsExtDirect. My concerns are: 1) Are Base Action classes really commonplace enough to justify searching through with Reflection? 2) Will searching through Base Action classes cause problems similar to what we've already encountered with freely meddling around in plugin classes? 3) Do plugin users really want extdirect actions defined for them by default? What if they want to override or disable them?
    Dan,
    With the addition of your include_plugins directive I don't think it is a problem to search the base classes for the listed plugins. The fact that you have specified wanting the plugin should mean that only plugins designed to work with dsExtDirect are actually being searched. Performance isn't an issue since running the task is really only a one time event done when you add/remove allowed methods, etc.

    Most of the plugins that I looked at before writing my own plugin place all the functionality in the base class leaving the actual [module name]Action class empty. In the code I posted I append the parent class docs to the child class docs before your code searches for the directive. The way your code is currently written it grabs the first entry that it finds (in this case the child entry). This means that if the end user of the plugin extends the plugin by modifying the child class and adds a different directive for the class, that new directive is used, not the one listed in the parent (base) class.

    As a side note: I've got my ExtJS code finished and your plugin is working great (with the addition of my code in your task anyway ).

    Thanks again,
    -Chris

  3. #23
    Sencha User jpipas's Avatar
    Join Date
    Nov 2008
    Posts
    8
    Vote Rating
    0
    jpipas is on a distinguished road

      0  

    Default


    Hey guys,

    I've got the plugin working - however, I'm working with a grid (and pager) - and I'm looking to add a "total_count" property to the response thats being created by the server. I'm wondering if in order to do such a thing, I need to extend the resultAdapter?

    Any direction (or sample code) would be greatly appreciated. Thanks

  4. #24
    Ext JS Premium Member dancablam's Avatar
    Join Date
    Apr 2008
    Location
    Dallas, TX
    Posts
    134
    Vote Rating
    0
    dancablam is on a distinguished road

      0  

    Default


    Hi jpipas,

    Here's all you have to do:

    1. Add totalProperty to your directStore. This is what I have:
    Code:
    totalProperty : 'data.total_items'
    2. Now simply add total_items to your result. Ex:
    Code:
    $this->result['data']['total_items'] = $total;
    3. Finally, make sure your PagingToolbar lists your store:
    Code:
    bbar :new Ext.PagingToolbar( {
    	pageSize: 25,
    	store: YOUR_DIRECT_STORE_HERE,
    	displayInfo: true,
    	plugins: [new Ext.ux.PageSizePlugin()]
    })
    Let me know if you have any more questions.

    Cheers,
    Dan

  5. #25
    Sencha User jpipas's Avatar
    Join Date
    Nov 2008
    Posts
    8
    Vote Rating
    0
    jpipas is on a distinguished road

      0  

    Default


    Color me stupid. That works - I didn't even think about extending the result array sent to the controller. Its been a long day already - appreciate the quick response!

  6. #26
    Ext User
    Join Date
    May 2007
    Location
    France
    Posts
    30
    Vote Rating
    0
    Flukey is on a distinguished road

      0  

    Thumbs up


    Good work :-) I shall be using this in the very near future.

  7. #27
    Ext User
    Join Date
    May 2007
    Location
    France
    Posts
    30
    Vote Rating
    0
    Flukey is on a distinguished road

      0  

    Default


    A quick question.

    In an action where you want to use in extdirect the '$this->result' variable is always used for the response output from the rpc call. Is that right?

    If yes, what about if my action retrieves a dataset. I don't wish to do a load of template logic in the action and assign it the result variable. Is there not a way to return the template output as the result? Any help would be hugely appreciated :-)

  8. #28
    Ext JS Premium Member dancablam's Avatar
    Join Date
    Apr 2008
    Location
    Dallas, TX
    Posts
    134
    Vote Rating
    0
    dancablam is on a distinguished road

      0  

    Default


    Quote Originally Posted by Flukey View Post
    A quick question.

    In an action where you want to use in extdirect the '$this->result' variable is always used for the response output from the rpc call. Is that right?

    If yes, what about if my action retrieves a dataset. I don't wish to do a load of template logic in the action and assign it the result variable. Is there not a way to return the template output as the result? Any help would be hugely appreciated :-)
    Hi Flukey,

    I'm not 100% confident I understand your questions but tell me if this helps:

    Yes - $this->result is the variable always used for the result data that's passed in the extdirect response. You can put pretty much any kind of data in $this->result including complex arrays, stdObjects, etc. Best practice for extdirect data is that you return raw data (instead of HTML) and let ext manage that data via XTemplates or via another ext component.

    You can return HTML if you want, however (and sometimes it can be your only good option). If you want to return the HTML from a template you could create a partial and use the following code to get that partial data as a string:

    Code:
    $this->result = $this->getPartial('partialName', array('data'=>$vals));
    Let me know if that clears anything up for you.

    Cheers,
    Dan

  9. #29
    Ext User
    Join Date
    May 2007
    Location
    France
    Posts
    30
    Vote Rating
    0
    Flukey is on a distinguished road

      0  

    Default


    Quote Originally Posted by dancablam View Post
    Hi Flukey,

    I'm not 100% confident I understand your questions but tell me if this helps:

    Yes - $this->result is the variable always used for the result data that's passed in the extdirect response. You can put pretty much any kind of data in $this->result including complex arrays, stdObjects, etc. Best practice for extdirect data is that you return raw data (instead of HTML) and let ext manage that data via XTemplates or via another ext component.

    You can return HTML if you want, however (and sometimes it can be your only good option). If you want to return the HTML from a template you could create a partial and use the following code to get that partial data as a string:

    Code:
    $this->result = $this->getPartial('partialName', array('data'=>$vals));
    Let me know if that clears anything up for you.

    Cheers,
    Dan
    Hi Dan,

    Thank you for your prompt response. It is very much appreciate.

    Ok, regarding my question. What I mean is, for example i have an action called 'executeGetUsers()' and in my template 'getUsersSuccess.php' I have some simple template logic - I would like to return this template content, rather than a variable.

    For me personally, to keep everything clean, I would like to return the json code from a template, rather than buld json strings in the action. Hope that makes sense :-)

  10. #30
    Ext JS Premium Member dancablam's Avatar
    Join Date
    Apr 2008
    Location
    Dallas, TX
    Posts
    134
    Vote Rating
    0
    dancablam is on a distinguished road

      0  

    Default


    Hi Flukey,

    Gotchya. There might be a way to retreive the content of yourTemplateSucces as a string - I'll leave the research up to you. But I do know there is a way to retreive a partial template as a string using the example I gave previously. You could always just make your yourTemplateSuccess include a partial and also pull that same partial for extdirect requests.

    Hope that helps.

    Cheers,
    Dan

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