Hybrid View

  1. #1
    Ext User
    Join Date
    Jun 2008
    Posts
    1
    Vote Rating
    0
    4811083 is on a distinguished road

      0  

    Question How can i use Ext+DWR in an Air application?

    How can i use Ext+DWR in an Air application?


    How can i use Ext+DWR in an Air application?

  2. #2
    Sencha User Juvs's Avatar
    Join Date
    Oct 2007
    Posts
    36
    Vote Rating
    0
    Juvs is on a distinguished road

      0  

    Lightbulb


    Is almost the same way you use in a traditional Web application, the main challenge is the "Sand Boxing" situation, you have to take care about it.

    We solved this situations using Ext.ux.ManagedIFrame extension an create iframe to access each screen.

    The other situation with DWR was the url provided by engine.js, if you take a look at this file you'll find the next line:

    PHP Code:
    ...
    /** The default path to the DWR servlet */
    dwr.engine._defaultPath "/[your-web-context]/dwr";
    ... 
    And if you take a look into a service definition file from DWR you'll notice the follow:

    PHP Code:
    // Provide a default path to dwr.engine
    if (typeof this['dwr'] == 'undefined'this.dwr = {};
    if (
    typeof dwr['engine'] == 'undefined'dwr.engine = {};

    if (
    typeof this['ConsultarCuentasInversion'] == 'undefined'this.ConsultarCuentasInversion = {};

    ConsultarCuentasInversion._path '/[your-web-context]/dwr';;
    ... 
    The problem with this line is that was made for run into the app server, so the solution was to take this file (engine.js) and the service definitions from DWR and put into the Aptana project in order to change this files this way:

    (engine.js)
    PHP Code:
    ...
    /** The default path to the DWR servlet */
    dwr.engine._defaultPath "http://[server-address]/[web-context]/dwr";
    ... 
    (Some service definition)
    PHP Code:
    // Provide a default path to dwr.engine
    if (typeof this['dwr'] == 'undefined'this.dwr = {};
    if (
    typeof dwr['engine'] == 'undefined'dwr.engine = {};

    if (
    typeof this['ConsultarCuentasInversion'] == 'undefined'this.ConsultarCuentasInversion = {};

    ConsultarCuentasInversion._path dwr.engine._defaultPath//<--!IMPORTANT
    ... 
    I hope this helps...

    Regards,
    Juvs

Thread Participants: 1