Results 1 to 6 of 6

Thread: How to use the extjs VS extension

  1. #1
    Sencha User
    Join Date
    May 2014
    Posts
    6

    Default Answered: How to use the extjs VS extension

    I am learning how to use the vs plugin with asp.net web api. I install senchacmd and downloaded the extjs version 6, and installed the plugin to visual studio 2013. following the instructions, I populated my extjs app, and included it in my web api project. When I click "F5", the project complied without error the browser shows an empty webpage. Is that supposed to be? I think the empty page is the index.html from the web project root folder.

    Can someone show me how to show an extjs component, just a panel or something very simple, no need to use any store or model, If I can get this part working, later I can add store, model, and bind the store with the component, and for the store I can use proxy where I point the a controller in MS MVC controller, which is the (c#)web api part(which can just add a c# controller to do this). Is my guess correct?

    Thank you.

  2. That is a setting in the webconfig, you aren't being served the JSON files. Try and add this to the webconfig file. This section should be under the system.webserver tags.

  3. #2
    Sencha User
    Join Date
    Sep 2015
    Location
    Czech republic
    Posts
    20
    Answers
    5

    Default

    Hello aodeng,
    how did you populate your ExtJS application? Was it with Sencha Cmd or with Ext JS template? I am assuming that you generated ExtJS application via Cmd so these steps work for me:
    1. I created empty ASP.NET Web Application (Visual C# template).
    2. I generated classic ExtJS application via Cmd (sencha -sdk c:\Users\Alexander\Documents\frameworks\ext-6.0.1.250\ generate app --classic ClassicApplicationForDotNetWebApi ./AppFolder).
    3. Then I simply copied a content of the AppFolder and pasted it to the root of the Web project created in 1. step and in the VS (Solution Explorer) I pressed icon "Show All Files".
    4. After I pressed F5 application is correctly shown in browser. Please note that if you want to use ExtJS Plugin you have to right click on project and choose 'Enable Sencha Ext JS Plugin for project'. You have to set up config file (https://docs.sencha.com/ide_plugins/...ile__optional_)
    I would also recommend you to switch to the VS 2015 because of the absence code completion (IntelliSense) in VS 2013.
    I hope it helps

  4. #3
    Sencha User
    Join Date
    May 2014
    Posts
    6

    Default

    I followed your steps without using the vs plugin and created an empty web api project called webapi, and using sencha cmd to generate an app to folder ./sencha, then I copied the whole ./sencha folder to the webapi project, and included it in the project, as attached screenshot shows.
    (since I didn't use plugin this tiime, there is no such a config file under the .sln file folder, so no need to change it)

    When I clicked F5, the visual studio will load browser to view: http://localhost:63116, and there is nothing because the vs project is empty. if I make the file./sencha/index.html as start page by right click it and select ""set as start page", the browser still shows empty.

    I am sure I generated app with sencha cmd correctly, After I run the following code:
    sencha app build
    sencha app watch
    then I can view the build result demo at the: localhost:1841

    The fact is that even the sencha app folder included in project, it is not integrated. there must be something to get the work done missing here. If any setting change of tweak is need in your step 3 to show the actual page, please share it here. Any help is appreciated.


    Quote Originally Posted by AlexanderDrackaProfiq View Post
    Hello aodeng,
    how did you populate your ExtJS application? Was it with Sencha Cmd or with Ext JS template? I am assuming that you generated ExtJS application via Cmd so these steps work for me:
    1. I created empty ASP.NET Web Application (Visual C# template).
    2. I generated classic ExtJS application via Cmd (sencha -sdk c:\Users\Alexander\Documents\frameworks\ext-6.0.1.250\ generate app --classic ClassicApplicationForDotNetWebApi ./AppFolder).
    3. Then I simply copied a content of the AppFolder and pasted it to the root of the Web project created in 1. step and in the VS (Solution Explorer) I pressed icon "Show All Files".
    4. After I pressed F5 application is correctly shown in browser. Please note that if you want to use ExtJS Plugin you have to right click on project and choose 'Enable Sencha Ext JS Plugin for project'. You have to set up config file (https://docs.sencha.com/ide_plugins/...ile__optional_)
    I would also recommend you to switch to the VS 2015 because of the absence code completion (IntelliSense) in VS 2013.
    I hope it helps
    Attached Images Attached Images

  5. #4
    Sencha User
    Join Date
    May 2014
    Posts
    6

    Default

    Update:

    actually I found an error. in chrome browser debugger window, I found the following error message:
    Failed to load resource: the server responded with a status of 404 (Not Found)
    localhost:12345/Sencha/bootstrap.json?_dc=1455231658679
    Uncaught SyntaxError: Unexpected token < index.html

    any help to fix this error? thanks a lot

  6. #5
    Sencha Premium User
    Join Date
    Jan 2014
    Posts
    22
    Answers
    2

    Default

    That is a setting in the webconfig, you aren't being served the JSON files. Try and add this to the webconfig file. This section should be under the system.webserver tags.

  7. #6
    Sencha User
    Join Date
    May 2014
    Posts
    6

    Default

    bereachad,

    thank you. your tip works!. mystery solved!



Similar Threads

  1. Replies: 3
    Last Post: 24 Feb 2015, 9:09 AM
  2. Lightbox extension for extJs?
    By sabiola in forum Community Discussion
    Replies: 4
    Last Post: 23 Feb 2012, 11:17 PM
  3. Help..!! DatePicker extension in ExtJS 4.0
    By ashishjoshi in forum Ext:User Extensions and Plugins
    Replies: 2
    Last Post: 20 Feb 2012, 1:07 AM
  4. Extjs many extension
    By nouveauc in forum Ext 3.x: User Extensions and Plugins
    Replies: 1
    Last Post: 24 May 2011, 9:05 AM
  5. ExtJS extension for PHP / Yii
    By gevik in forum Community Discussion
    Replies: 0
    Last Post: 26 Jan 2010, 8:45 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •