我编写了一个代码来从文本框中读取输入数据,然后单击提交按钮,该数据将显示在列表网格中。提交按钮点击事件代码在这里:
public void onClick(ClickEvent event) {sendInfoToSever();}
private void sendInfoToSever() {
String Ename=firstName.getText();
String Eemail=Email.getText();
String Equerytype=rgi.getDisplayValue();
String Edesignation1=check1.getFormValue();
String Edesignation2=check2.getFormValue();
String Econtact=Contact.getText();
int indx=li1.getSelectedIndex();
String Ecountry=li1.getValue(indx);
String Equerytext=queryText.getText();
showData.setWidth(475);
showData.setHeight(100);
ListGridField Lname= new ListGridField("name", "Name");
ListGridField Lemail= new ListGridField("email", "Email");
ListGridField Lquerytype= new ListGridField("Query Type");
ListGridField Ldesignation1= new ListGridField("Designation");
ListGridField Ldesignation2= new ListGridField("Designation");
ListGridField Lcontact= new ListGridField("Contact");
ListGridField Lcountry= new ListGridField("Country");
ListGridField Lquerytext= new ListGridField("Query Text");
showData.setFields(Lname,Lemail, Lquerytype, Ldesignation1, Ldesignation2, Lcontact, Lcountry, Lquerytext);
}
}
如何将文本框数据设置为 listgrid 字段?
谢谢