0

그냥 당신이 예를 들어 "필드 집합,은 FormPanel 및 컨테이너"센차 아키텍트 -

사용하는 것이 어디

사람이 설명해 수 엽차 터치를보고 시작 형태로 화면을 만드는 : 제목 양식을, 텍스트 입력란과 제출 버튼?

로그인 화면

...

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

1)이 로그인 화면은 컨테이너, 세트 및/또는은 FormPanel 필드 것인가?

2) 제목이없는 양식은 무엇입니까? 그냥 텍스트 필드, 버튼, 또는 제목, 데이터 목록과 화면?

답변

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 
} 

});