私はsenchaTouch
チュートリアルに従っています。HelloWorld.php
URLににあるというWebサービスがありますhttp://mydomainTest.com/Proj/HelloWorld.php
。、、の3つの値name
を取ります。email
description
WebサービスはPOST
メソッドを使用します。
私のコードは次のとおりです。私が知りたいのは、キーの値(POST
値キー)を指定していないことと、Webサービスがキーのために何を保存するかをどのように知るか(name,email, description
)です。
を作成するとき、私は(で)native iPhone apps
と言いますが、私が知る必要があるのは、渡された値のキーを設定する方法です。以下にコードを添付しました。ご覧になり、手伝ってください。setPostValue: forKey:
ASIHttpRequest
Sencha
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();
}
}
]
}
]
}
} );