1. #1
    Ext User kkbear's Avatar
    Join Date
    Aug 2007
    Posts
    43
    Vote Rating
    0
    kkbear is on a distinguished road

      0  

    Question combobox value problem,help~~

    combobox value problem,help~~


    HI all~sorry for my english
    Code:
    new Ext.form.ComboBox( {
        fieldLabel : 'BookStatus',
        name : 'model.bookCategoryID',
        store : new Ext.data.Store( {
            proxy : new Ext.data.HttpProxy( {
                url : './bookManagement/listAllStatusType.action'
            }),
            reader : new Ext.data.JsonReader( {}, [ {
                name : 'id',
                mapping : 'id',
                type : 'int'
            }, {
                name : 'typeName',
                mapping : 'typeName'
            }])
        }),
        displayField : 'typeName',
        valueField : 'id',
        hiddenName : 'bookStatusQueryConditionDTO.statusId',
        typeAhead : true,
        mode : 'remote',
        triggerAction : 'all',
        emptyText : 'Please select...',
        selectOnFocus : true,
        readOnly : true
    })
    Here,I have two problem:
    1:when I select a value, I can not make it return to empty status (Please select...);
    2:the displayField is a i18n resource,how to change the typeName just like renderer method of ColumnModel.

  2. #2
    Ext User kkbear's Avatar
    Join Date
    Aug 2007
    Posts
    43
    Vote Rating
    0
    kkbear is on a distinguished road

      0  

    Default


    Help~~

  3. #3
    Sencha User catacaustic's Avatar
    Join Date
    Jul 2007
    Location
    "A Land Down Under"
    Posts
    618
    Vote Rating
    1
    catacaustic is on a distinguished road

      0  

    Default


    I can help on the first point, but not the second.

    To get the value back to nothing in a combo, you need to either call the reset () function for the combo, or you need to have a record in your data store with a blank value that can be chosen by the user.
    'Once again, fortune vomits on my eiderdown'
    - Edmund Blackadder

Thread Participants: 1