I want to create Ext.data.store with several data sets. Using store like this:
Code:
store_form = new Ext.data.Stor
url: url_servlet+"kadastr_zemform.jsp?ss="+<%=str%>,
reader: new Ext.data.XmlReader({
totalProperty: "results",
record: "zem",
fields: [
{name: 'cadastr', mapping:'parcel/preview/cadastr'},
{name: 'address', mapping:'parcel/preview/address'},
{name:'res', mapping:'really/preview/res'},
{name:'zem_kod', mapping:'really/preview/zem_kod'},
{name: 'right_type_docs', mapping:'doc/preview/right_type_docs'},
{name: 'doc_docs', mapping:'doc/preview/doc_docs'},
];
This store used by 3 FormPanels: 1 for parsel, 2 for really, 3 for doc. And, for example, if on one parcel exists several real estate i want show one by one. i mean i show first then click button and show next.
Questions:
1. For this i need XML with several `zem` records?
2. How to create this XML? Now i can create XML with only one record couse:
Code:
out.print(<zem>);
Statement st1=<query to parcel table>;
while(ResultSet.next()){
out.print(<parcel>);
out.print(<parcel table fields>);
out.print(</parcel>);
}
st1.close();
Statement st2=<query to really table>;
while(ResultSet.next()){
out.print(<really>);
out.print(<really table fields>);
out.print(</really>);
}
st2.close();
Statement st3= <query to docs table>;
while(ResultSet.next()){
out.print(<doc>);
out.print(<doc table fields>);
out.print(</doc>);
}
st3.close();
out.print(</zem>);