Results 1 to 2 of 2

Thread: Custom form initialization

  1. #1
    Sencha User
    Join Date
    Aug 2015
    Posts
    30
    Answers
    7

    Default Answered: Custom form initialization

    We're doing some work with custom form initialization, in particular, setting up events where components on a form interact with each other. For example, an age text field is triggered by changes in a date of birth field to get the age of an applicant.

    The interactions are defined on the fly, say defined from a JSON source, so no hardcoding.

    Because all the controls will need to be set up before this can be done, we're thinking of putting this functionality in the form. The current thinking is it will check all its components for dependencies and set up events with functions as required.

    What we're unsure about is the best place to override to put this functionality in. The components should exist and have get and set methods, for example, but the contents of some fields may be changed during initialization, so we don't want to trigger too many layout changes.

    Any suggestions?

    Thank you,

    Yimin

  2. You can ue Ext.suspendLayouts() and Ext.resumeLayouts() when making changes to multiple fields to avoid too many layouts.
    Also, you might want to check ViewController's init() and beforeInit() protected methods which you might want to override in your ViewController.

  3. #2
    Sencha User
    Join Date
    Apr 2013
    Posts
    914
    Answers
    105

    Default

    You can ue Ext.suspendLayouts() and Ext.resumeLayouts() when making changes to multiple fields to avoid too many layouts.
    Also, you might want to check ViewController's init() and beforeInit() protected methods which you might want to override in your ViewController.

Similar Threads

  1. Ext.Form and initialization
    By fvinson in forum Ext: Q&A
    Replies: 2
    Last Post: 4 Jul 2012, 10:00 PM
  2. Replies: 0
    Last Post: 13 Sep 2011, 5:01 AM
  3. Replies: 0
    Last Post: 26 Oct 2010, 12:48 PM
  4. Add buttons to a extended form after its initialization
    By alexbariv in forum Ext 2.x: Help & Discussion
    Replies: 5
    Last Post: 21 Jan 2010, 6:51 AM
  5. Extending FormPanel, underlying form initialization
    By Kannabismus in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 10 Dec 2008, 1:10 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
  •