1. #1
    Sencha User
    Join Date
    Nov 2013
    Posts
    2
    Vote Rating
    0
    ricardocoelho is on a distinguished road

      0  

    Default Generate Form fields on the fly

    Generate Form fields on the fly


    Hello everyone, I am new to extjs,


    I am thinking of using extjs for a business application, but I wonder if it is possible to generally windows and their components through the database, as well as some functions code for loading from the database.

    If possible one simple example

  2. #2
    Sencha User steffenk's Avatar
    Join Date
    Jul 2007
    Location
    Haan, Germany
    Posts
    2,664
    Vote Rating
    7
    steffenk has a spectacular aura about steffenk has a spectacular aura about steffenk has a spectacular aura about

      0  

    Default


    you can simply return meta information with your data, which can be used to configure the form elements. Use factory methods to create the elements with given configuration.

    Easy task to build the elements, difficult task to arrange them in the form.
    vg Steffen
    --------------------------------------
    Release Manager of TYPO3 4.5

  3. #3
    Sencha User
    Join Date
    Nov 2013
    Posts
    2
    Vote Rating
    0
    ricardocoelho is on a distinguished road

      0  

    Default


    thanks for your answer, can you give me a small example

  4. #4
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    17,004
    Vote Rating
    650
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    Look at the component-loader example that comes with the SDK. The 3rd panel generates the panels dynamically from the server.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  5. #5
    Sencha Premium Member
    Join Date
    Jul 2009
    Posts
    28
    Vote Rating
    0
    mikelindsey is on a distinguished road

      0  

    Default


    I need to create form fields dynamically and I'd like for them to layout one after the other horizontally and wrap to the next line as appropriate. Is this possible?


    Field 1 Field 2 Field 3 <edge>
    F4 F5 F6 Field 7 <edge>
    F8 etc...

    Thanks

  6. #6
    Sencha Premium Member
    Join Date
    Jul 2009
    Posts
    28
    Vote Rating
    0
    mikelindsey is on a distinguished road

      0  

    Default


    I'd need to set the config on the items as well.