Results 1 to 2 of 2

Thread: Is it possible to import components in js files?

  1. #1
    Sencha Premium Member
    Join Date
    Jan 2010
    Vancouver, Canada

    Default Is it possible to import components in js files?


    I want to generate a model based on the result from a sql query outside Sencha Architect, or even write it by hand instead of drag&dropping components in SA.

    Is it possible to import that file into SA and make it available for use? According to the documentation, there are a few ways to import components:
    - Importing components created with SA. The documentation states that only those components exported with SA can be imported back in SA.
    - User extensions - it seems a bit overkill to define user extensions to import simple components.
    - use sencha cmd to create models in the app. However, I am not sure they become visible as top components in SA
    - hack the project files. It's risky because a new SA upgrade may break the hack.

    I used the model as an example. I might want to import entire forms.

    Ultimately what I want is something simple (from my perspective :-) ). I want to take a code snippet representing a model and paste it somewhere where it can become visible in SA as a top class. Is it doable in the current version?


  2. #2
    Sencha User
    Join Date
    Sep 2014
    Central Europe


    Click on the + button, click on add JS resouce and in there you can write anything you like. But be aware that you won't be able to use any "cool" SA features aka SA will not be aware about the classes you have created in there but you can use it manually in the code anywhere.

Similar Threads

  1. Library files to import
    By anajafi in forum Ext: Q&A
    Replies: 2
    Last Post: 5 Sep 2013, 8:54 AM
  2. Replies: 1
    Last Post: 1 May 2008, 1:52 PM

Posting Permissions

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