1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    2
    Vote Rating
    0
    GregZone is on a distinguished road

      0  

    Default How can I implement Ext.app.Application 'paths' object property?

    How can I implement Ext.app.Application 'paths' object property?


    Hi, I'm trying to integrate the Sencha Architect enforced MVC folder structure, with a Zend Framework MVC application.

    I've managed to set-up the overall folder structure reasonably nicely, however, a problem remains in trying to redirect to the ExtJS app URL path from the Zend controller response URL path.

    If I leave the 'appFolder' property as the default value 'app', my ExtJS app fails to load the .js files, as it is looking for them relative to the Zend controller path. Conversely, if I set the 'appFolder' property to the required path (as I was doing manually before trying Architect), the Architect project is then saved to an 'appFolder' relative path to the actual project root folder (so no solution here because of this 'appFolder' duplicate role).

    Based on the documentation it did appear that the 'defaultURL' property was what I needed to resolve the problem, by specifying the required ExtJS application URL redirect. However 'defaultURL' doesn't appear to work / or is perhaps not implemented for an Architect ExtJS 4 application? (It appears to only be referenced in the Sencha Touch Application source).

    I then finally found a solution! If I specified a 'paths' property in Ext.Application, using the 'name' property value and the required relative URL path prefix, I have a working solution. However, although it solves the issue, the 'paths' property of Ext.Application does not appear to be documented or supported by Sencha Architect.

    Example: If I have a Zend controller called "ZFTest", Zend maps this to mywebsite.com/zftest. If my Zend default index.phtml view loads a "Test" ExtJS project app.js (which I have linked at /js/Test/app.js) then the ExtJS app fails as it attempts to load the .js files from mywebsite.com/zftest/app/... (instead of the required mywebsite/js/test/app/... path).

    The Ext.Application 'paths' property solution:
    Code:
    Ext.application({
    ..
        name: 'Test',
        paths: {'Test' : '/js/Test/app'}
    ..
    });
    This is where the remaining problem is: The Ext.app.Application 'paths' property is not available to set in Sencha Architect. Manually editing app.js is not a solution as it gets overwritten on the next save!

    If I add an Ext.app.Application custom property 'paths' this can only be specified as a string, so I end up with a broken literal string formatted 'paths' property:
    Code:
    Ext.application({
    ..
        name: 'Test',
        paths: '{\'Test\':\'/js/Test/app\'}'
    ..
    });
    Can anyone advise a solution, or a better way to resolve this Sencha Architect + Zend Framework integration "relative URL path" problem?

    TIA, Greg

  2. #2
    Ext JS Premium Member
    Join Date
    Sep 2009
    Posts
    85
    Vote Rating
    0
    HyGy is on a distinguished road

      0  

    Default


    I have the same question. Why can't we add the path property? Or any other propery what we whis not converted to a string?!

    -- i'm sorry In the last architect there is a solution to change the newly added property's type. There is an icon before the property name, press it.

Thread Participants: 1

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..."