1. #1
    Sencha User
    Join Date
    Jun 2007
    Posts
    125
    Vote Rating
    1
    bhaidaya is on a distinguished road

      0  

    Question How can i make a reusable Custom Component

    How can i make a reusable Custom Component


    How do i add a custom component to my toolbox correctly?..

    I'm new to designer. I've been with Extjs since it was called yui-ext.

    I am currently as an exercise taking an existing application and trying to implement it into the sencha 2 beta designer. So far so good! But I can't wrap my brain around the approach for this next part..

    I have a library of reusable custom components ( don't we all?) and i am unable to decipher how to get them into my toolbox correctly.

    I've re-created my custom component lets call it 'XGridPanel' in a normal Ext.grid.Panel. I then right click and save to toolbox.

    Q1: How do I get the custom component to correctly extend the base class eg.extend: 'Ext.grid.Panel' instead of extend: 'MyApp.view.ui.XGridPanel'

    Q2: Can someone illuminate why when i reuse this component elsewhere it extends 'MyApp.view.ui.XGridPanel'?

    Q3: How can i get it to simply extend my existing lib/namespace (lets call it XYZ) 'xyz.grid.Panel'

    Are there any resources or help related to the toolbox and custom component management?

  2. #2
    Sencha User
    Join Date
    Jun 2007
    Posts
    125
    Vote Rating
    1
    bhaidaya is on a distinguished road

      0  

    Default


    After Re-watching the video i can see the use of the userAlias and userClassName in conjunction with the drag drop of the panel. That all makes sense.

    I'm still a bit confused on the namespacing but this helps me in the right direction.

  3. #3
    Sencha User
    Join Date
    Jun 2007
    Posts
    125
    Vote Rating
    1
    bhaidaya is on a distinguished road

      0  

    Default


    I was able to add several custom components in but am unable to do a certain few.

    Is it possible to introduce a custom reader extended from the Ext.data.reader.Json?

    I need to override the extractData function and can't seem to see a way.

  4. #4
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    8,883
    Vote Rating
    102
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Quote Originally Posted by bhaidaya View Post
    I'm new to designer. I've been with Extjs since it was called yui-ext.

    I am currently as an exercise taking an existing application and trying to implement it into the sencha 2 beta designer.
    Great, glad you've been around since the beginning and are taking the designer for a spin. We are certainly interested as to where we fall short of providing you everything you need to build a full application.

    Quote Originally Posted by bhaidaya View Post
    Q1: How do I get the custom component to correctly extend the base class eg.extend: 'Ext.grid.Panel' instead of extend: 'MyApp.view.ui.XGridPanel'

    Q2: Can someone illuminate why when i reuse this component elsewhere it extends 'MyApp.view.ui.XGridPanel'?
    Designer is going to create two files/subclasses for you. The .ui.js version directly extends whatever you are extending. The .js file extends the ui file. So they both inherit from Grid.

    Quote Originally Posted by bhaidaya View Post
    Q3: How can i get it to simply extend my existing lib/namespace (lets call it XYZ) 'xyz.grid.Panel'
    You cannot currently extend from anything that is not already inside of the designer.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  5. #5
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    8,883
    Vote Rating
    102
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Quote Originally Posted by bhaidaya View Post
    I was able to add several custom components in but am unable to do a certain few.

    Is it possible to introduce a custom reader extended from the Ext.data.reader.Json?

    I need to override the extractData function and can't seem to see a way.
    The ability to override functions will be coming in a release in the near future. You will be able to add a Basic Function to that particular reader instance, name it extractData, setup the appropriate arguments and implement your custom behavior.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  6. #6
    Sencha User
    Join Date
    Jun 2007
    Posts
    125
    Vote Rating
    1
    bhaidaya is on a distinguished road

      0  

    Default


    Quote Originally Posted by aconran View Post
    We are certainly interested as to where we fall short of providing you everything you need to build a full application.
    ...

    Quote Originally Posted by aconran View Post
    The ability to override functions will be coming in a release in the near future. You will be able to add a Basic Function to that particular reader instance, name it extractData, setup the appropriate arguments and implement your custom behavior.
    GREAT! I can't wait to see whats ahead! For now i'll have to wait though as all of the applications i build are served up on systems that require me to edit the readers and proxies because of the proprietary data formats served up by the backend. not much to do there... but wait.

    Quote Originally Posted by aconran View Post
    Designer is going to create two files/subclasses for you. The .ui.js version directly extends whatever you are extending. The .js file extends the ui file. So they both inherit from Grid.
    Got it.. thanks!

  7. #7
    Sencha Premium Member
    Join Date
    Feb 2012
    Posts
    22
    Vote Rating
    0
    terryfritsch is on a distinguished road

      0  

    Default


    Are there any examples on how to implement an override component like this in Architect?

  8. #8
    Sencha User
    Join Date
    Oct 2010
    Posts
    3
    Vote Rating
    0
    binarygiant is on a distinguished road

      0  

    Default Define xtype

    Define xtype


    Is there a way to define an xtype with components in Architect?

  9. #9
    Sencha User
    Join Date
    Oct 2011
    Location
    Germany
    Posts
    50
    Vote Rating
    10
    apsq will become famous soon enough

      0  

    Default


    I think the "userAlias" or what it's called (in the Architect-specific settings of your view classes) is used to generate xtypes.

  10. #10
    Sencha User
    Join Date
    Jun 2012
    Posts
    3
    Vote Rating
    0
    mfreund is on a distinguished road

      0  

    Default


    I'm using this feature, its nice, but i've got ONE problem....

    i exported a grid with a window and many components AND a store for the grid.
    when i import and use this component, everything is fine, except, the store isn't added to app.js

    when i add it manually, everything works, but i have to do it everytime i save in architect

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar