Hybrid View

  1. #1
    Sencha User
    Join Date
    May 2008
    Posts
    13
    Vote Rating
    0
    mheijink is on a distinguished road

      0  

    Default Unanswered: Alternative for MultiField

    Unanswered: Alternative for MultiField


    Is there an alternative for MultiField that was in gxt2 ?

  2. #2
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,717
    Answers
    109
    Vote Rating
    89
    Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light

      0  

    Default


    What are you trying to do? Ext GWT 2's MultiField is just a field subclass with some layout details. Instead of supporting this specificlly, there is now an IsField interface to allow any widget to act like a field, and classes that used to extend MultiField (like DualListField) use it instead. AdapterField does most of the work for you of setting up the basic widget and the basic handlers, that is probably the starting point you want to use.

    From there, you can use FlowLayoutContainer or CssFloatLayoutContainer to draw multiple widgets using css layouts, or one of the other sizing/positioning containers like VerticalLayoutContainer to hold your other widgets like MultiField would have done in the past.

  3. #3
    Sencha User
    Join Date
    May 2008
    Posts
    13
    Vote Rating
    0
    mheijink is on a distinguished road

      0  

    Default


    Untitled.png

    We use it to place a image after the text field and to place 3 text fields on one line.

  4. #4
    Ext GWT Premium Member
    Join Date
    Dec 2011
    Posts
    14
    Vote Rating
    0
    shake is on a distinguished road

      0  

    Default


    Hi,

    One problem with IsField is that it can not be used as an editor in, for example, GridEditing. Method addEditor expects the widget to be instance of Field

  5. #5
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,717
    Answers
    109
    Vote Rating
    89
    Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light

      0  

    Default


    Thanks shake - this was accidently done when 3.0 is released, and would have required too much change to the API after we released 3.0.0 to change, but are able to revisit this in 3.1.

    That said, are you expecting to draw a full DualListField, etc in the inline or row grid editing? I'd like to know a little more about this use case before we commit to restoring it in 3.1.

  6. #6
    Ext GWT Premium Member
    Join Date
    Dec 2011
    Posts
    14
    Vote Rating
    0
    shake is on a distinguished road

      0  

    Default


    Hi Colin,

    We do not use inline editing, only row editing. But anyways, drawing DualListField inside a row editor would be a bit... strange so to say =)
    The fields we have are used not only in row editor but also in other places being simply put on a panel (on a form). Normally, these (composite) fields contain 2-3 inner fields alligned horizontally. For instance, we have time field (amount of time, not really "normal" time, eg "how many hours/minutes/seconds") containing 3 inner fields.
    Another example is ListField, eg a field holding multiple models of the same type. The field appears as a (underlined) label and when you click on it we show a standalone dialog allowing to edit the values. Content of the dialog can be different depending on type of models being held by ListField.

  7. #7
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,717
    Answers
    109
    Vote Rating
    89
    Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light

      0  

    Default


    Thanks for the clarification. The cleanest workaround I can see for you would be to extend Field with a simple cell like SafeHtmlCell that renders nothing, then append other widgets. Another option could be try something like CompositeCell.

    In cases where clicking brings up more content, you could consider rendering effectively as a button, and clicking on it would draw a window or some other popup, and when closing that, push the value back to the original field.

  8. #8
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,717
    Answers
    109
    Vote Rating
    89
    Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light

      0  

    Default


    The latest nightly builds and SVN now contain changes to the grid editing apis to allow IsField instances instead of just Field, so that any class which implements that interface can be used. I'd suggest AdapterField as a simple way to wrap an existing widget, but anything that properly implements the interface will work. This will go out in GXT 3.1.0.

Thread Participants: 2

Tags for this Thread