Results 1 to 2 of 2

Thread: Field class with two or more input fields - advice or existing code

  1. #1
    Sencha User
    Join Date
    Apr 2011
    Posts
    28

    Default Field class with two or more input fields - advice or existing code

    Hi all,

    in my current project there is a grid (with row editor) with a name column. The name column shows the name of a user in the way [last name, first name]. When I click on a row, the row editor pops up and there should be a possibility to enter first name and last name SEPERATELY.
    Since the input is done in a single column, I need to find a way to add TWO text input fields to a CellEditor and handle everything appropriately.
    Naturally, I want to reduce overrides from gxt code as much as possible. I could overwrite the class TextField or Field, but at my current gxt programming level, I only managed to add a second input field and to resize the two elements in onResize method so that they yould fit into the column. But there is still so much to do, f.e. currently I cannot enter something in the second input field, the cursor jumps to the first input field when I click on the cell and so on.

    Does anybody has an advice? Do I miss something which makes things easier for me? Is there perhaps existing code from another developer?

    Thanks in advance!

  2. #2
    Sencha User
    Join Date
    Apr 2011
    Posts
    28

    Default

    I concluded that in the current project situation I split up the name column into two. This means using seperate first name and last name columns and seperate input fields.

    Rewriting the complete Field class (or TextField class) code would have been too much; the field concept is so very tight connected to the concept of only one input field and sometimes it is not possible to retrieve the proper private member variables.

    Maybe I will privately try to implement a new class based on Field / TextField that can create and handle more than one input field.

Similar Threads

  1. advice needed, existing prototype/scriptaculous app
    By aktxyz in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 2 Jan 2008, 8:10 AM
  2. how add existing input field to form?
    By mary in forum Ext 1.x: Help & Discussion
    Replies: 6
    Last Post: 3 Jul 2007, 2:20 PM
  3. a3-r2: datepicker fails on existing input field
    By Wolfgang in forum Ext 2.x: Help & Discussion
    Replies: 6
    Last Post: 10 Mar 2007, 12:54 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
  •