1. #1
    Sencha User
    Join Date
    Oct 2011
    Posts
    10
    Vote Rating
    0
    dranix is on a distinguished road

      0  

    Default monitorValid and formBind don't work

    monitorValid and formBind don't work


    Hello everyone
    I'm new to Ext Js, especially its grid, and it is wonderful library.
    Today I have a problem, I have search and read many posts but I don't know why I don't work
    I have a grid, and I use pop up add/edit
    When the add form popup, I use monitorValid and formBind but the Save button is still enable
    Would some one please help me?
    Code:
            var BookItem = new Ext.FormPanel({
                border: false,
                frame: true,
                labelWidth: 70,
                monitorValid: 'true', // !Important
                items: [
                {
                    xtype: 'textfield',
                    name: 'id',
                    id: 'id',
                    hidden: true
                },
                {
                    xtype: 'textfield',
                    name: 'book_title',
                    id: 'book_title',
                    width: 100,
                    fieldLabel: 'Book Title',
                    allowBlank: false
                },
                {
                    xtype: 'textfield',
                    name: 'author',
                    id: 'author',
                    width: 100,
                    fieldLabel: 'Author'
                }],
                buttonAlign: 'center',
                buttons:
                [{
                    align: 'center',
                    text: 'Save',
                    handler: Add,
                    formBind: 'true' // !Important
                }, {
                    align: 'center',
                    text: 'Cancel',
                    handler: Cancel
                }]
            });
    Code:
            var winForm = new Ext.Window({
                title: formTitle,
                modal: true,
                width: 275,
                autoScroll: true,
                bodyStyle: 'position:relative;',
                monitorResize: true,
                constrain: true,
                layout: 'fit',
                height: ht,
                closeAction: 'hide',
                layout: 'fit',
                items: BookItem
            });
    Code:
            var CreateBookItem = function () {
                winForm.update = true;
                winForm.setTitle('Create' + " " + formTitle);
                BookItem.getForm().reset();
                winForm.show();
                if (winForm.getHeight() < ht) {
                    winForm.setHeight(winForm.getHeight() + 32);
                }
                winForm.center();
            };
    Any help is highly appreciated
    Thank in advance

  2. #2
    Sencha User
    Join Date
    Dec 2009
    Posts
    364
    Vote Rating
    2
    raj_plays is on a distinguished road

      0  

    Default


    monitorValid and formBind take boolean values.
    Assign true instead of 'true' to them.

  3. #3
    Sencha User
    Join Date
    Oct 2011
    Posts
    10
    Vote Rating
    0
    dranix is on a distinguished road

      0  

    Default


    I don't know what to say (stupid me)
    Thank you very much

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi