0

煎茶タッチを始めたばかり

「FieldSet、FormPanel、およびコンテナ」をどこで使用するか説明してください。

例: タイトル、テキストフィールド、送信ボタンのあるフォーム?

ログイン画面が...

Title: Login
TextField: username
PasswordField: password
Button: submit  

1) このログイン画面は、コンテナ、フィールド セット、および/またはフォームパネルにありますか?

2) タイトルのないフォームはどうですか? テキストフィールド、ボタン、またはタイトル付きの画面、データのリストだけですか?

4

1 に答える 1

0

サンプルコードが役立つと思います:

Ext.define('MyApp.view.LoginSiteContainer', {
extend: 'Ext.form.Panel',
alias: 'widget.loginsitecontainer',

config: {
    id: 'loginform',
    url: 'som_url',
    items: [            
        {
            xtype: 'container',
            layout: {
                type: 'vbox'
            },
            items: [
                {
                    xtype: 'fieldset',
                    instructions: 'Login using existing account. Password is case sensitive.',
                    title: 'Login details',
                    items: [
                        {
                            xtype: 'textfield',
                            id: 'login',
                            itemId: 'login',
                            label: 'Login'
                        },
                        {
                            xtype: 'passwordfield',
                            id: 'password',
                            itemId: 'password',
                            label: 'Password'
                        }
                    ]
                },
                {
                    xtype: 'panel',
                    layout: {
                        type: 'hbox'
                    },
                    items: [
                        {
                            xtype: 'button',
                            id: 'Login',
                            itemId: 'Login',
                            margin: '0.1em',
                            ui: 'confirm',
                            text: 'Login',
                            flex: 1
                        }
                    ]
                }
            ]
        }
    ],
    listeners: [            
        {
            fn: 'onLoginTap',
            event: 'tap',
            delegate: '#Login'
        }
    ]
},


onLoginTap: function(button, e, options) {
// login function here
}

});

于 2012-07-13T07:43:42.217 に答える