Start sencha touch 2 Tour 4

Source: Internet
Author: User

At the end of the article, let's go back and add a contact table. Our last tab contains a frompanel and a fieldset:

// We 've added a third and final item to our tab panel-scroll down to see it

Ext. Application ({

Name: 'sencha ',

 

Launch :(){

Ext. Create ("Ext. tabpanel ",{

Fullscreen: True,

Tabbarposition: 'bottom ',

 

Items :[

{

Title: 'home ',

Iconcls: 'home ',

CLS: 'home ',

HTML :[

' ',

'<H1> welcome to sencha touch

"<P> you're creating the Getting Started app. This demonstrates how ",

"To use tabs, lists and forms to create a simple app </P> ",

'<H2> sencha touch (2.0.0pr1) </H2>'

]. Join ("")

},

{

Xtype: 'LIST ',

Title: 'blog ',

Iconcls: 'star ',

 

Itemtpl: '{Title }',

Store :{

Fields: ['title', 'url'],

Data :[

{Title: 'ext scheduler 100', URL: 'ext-scheduler-2-0-upgrading-to-ext-js-4 '},

{Title: 'previewing sencha touch 2', URL: 'sencha-touch-2-what-to-know CT '},

{Title: 'sencha con 2011 ', URL: 'senchacon-2011-now-packed-with-more-goodness '},

{Title: 'documentation in ext JS 4', URL: 'New-ext-js-4-documentation-center '}

]

}

},

// This is the new item

{

Title: 'Contact ',

Iconcls: 'user ',

Xtype: 'formpanel ',

URL: 'Contact. php ',

Layout: 'vbox ',

 

Items :[

{

Xtype: 'fieldset ',

Title: 'Contact us ',

Instructions: '(email address is optional )',

Items :[

{

Xtype: 'textfield ',

},

{

Xtype: 'emailfield ',

Label: 'email'

},

{

Xtype: 'texteafield ',

Label: 'message'

}

]

},

{

Xtype: 'button ',

Text: 'send ',

Ui: 'Confirm ',

Handler :(){

This. Up ('formpanel '). Submit ();

}

}

]

}

]

}). Setactiveitem (2 );

}

});

 

In the third tab, we added a table containing three fields and a submit button. On this page, we use the vbox layout to locate the submit button below. Fieldset itself is configured with a title and some instructions (prompt information ). Prompt. Finally, we use textfield, emailfield, and textareafield.

For the example source code of this entry-level article, you can find it in the examples/getting_started file directory of the sencha touch 2.0 SDK downloaded.

More references

So far, we have completed a very basic application instance, and it is time to further explore other content of the framework. Here, we have selected some development guides and component instances for you to learn. With the development of the beta version, we will also introduce more guidelines to build larger applications.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.