私はsenchaTouchチュートリアルに従っています。HelloWorld.phpURLににあるというWebサービスがありますhttp://mydomainTest.com/Proj/HelloWorld.php。、、の3つの値nameを取ります。emaildescription
WebサービスはPOSTメソッドを使用します。
私のコードは次のとおりです。私が知りたいのは、キーの値(POST値キー)を指定していないことと、Webサービスがキーのために何を保存するかをどのように知るか(name,email, description)です。
を作成するとき、私は(で)native iPhone appsと言いますが、私が知る必要があるのは、渡された値のキーを設定する方法です。以下にコードを添付しました。ご覧になり、手伝ってください。setPostValue: forKey:ASIHttpRequestSencha
Ext.define('GS.view.Contacts', {
extend:'Ext.form.Panel',
xtype:'contactform',
config:{
title:'Contact',
iconCls:'user',
url:'http://mydomainTest.com/Proj/HelloWorld.php',
items:[
{
xtype:'fieldset',
title: 'Contact Us',
instructions: '(email is not required)',
items: [
{
xtype:'textfield',
name: 'name',
label:'Name'
},
{
xtype:'emailfield',
name:'email',
label:'Email'
},
{
xtype:'textareafield',
name:'message',
label:'Message'
}
]
},
{
items:[
{
xtype:'button',
text: 'Submit',
ui:'confirm',
handler: function(){
this.up('contactform').submit();
}
}
]
}
]
}
} );