I created my application following the Yahoo JSon example.
Here is the sample json output from my server
{"ResultSet":{"totalResultsAvailable":"1","totalResultsReturned":1,"firstResultPosition":1,"Result":[{"Name":"ASM","RoHS_Status":"","LC_State":"Production","Number":"06060621","Revision":"A"}]}}
Following is my code to create the UI for Json ouput. Whenever I click the search button, UI keeps giving the message "Finding records that match your criteria" . Any help to debug this issue will be helpful.
Thanks,
Prathap
XJSONDataSource yahooDS = new XJSONDataSource();
yahooDS
.setDataURL(
"http://localhost/cgi/BOM.py?username=jim");
yahooDS.setRecordXPath("/ResultSet/Result");
...
final SearchForm form = new SearchForm();
form.setTop(50);
form.setNumCols(3);
TextItem query = new TextItem();
query.setName("number");
query.setTitle("Query");
query.setDefaultValue("07012774");
ButtonItem button = new ButtonItem();
button.setTitle("Search");
button.setStartRow(false);
button.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
grid.fetchData(form.getValuesAsCriteria());
}
});
form.setItems(query, button);
canvas.addChild(form);
canvas.addChild(grid);
return canvas;
Here is the sample json output from my server
{"ResultSet":{"totalResultsAvailable":"1","totalResultsReturned":1,"firstResultPosition":1,"Result":[{"Name":"ASM","RoHS_Status":"","LC_State":"Production","Number":"06060621","Revision":"A"}]}}
Following is my code to create the UI for Json ouput. Whenever I click the search button, UI keeps giving the message "Finding records that match your criteria" . Any help to debug this issue will be helpful.
Thanks,
Prathap
XJSONDataSource yahooDS = new XJSONDataSource();
yahooDS
.setDataURL(
"http://localhost/cgi/BOM.py?username=jim");
yahooDS.setRecordXPath("/ResultSet/Result");
...
final SearchForm form = new SearchForm();
form.setTop(50);
form.setNumCols(3);
TextItem query = new TextItem();
query.setName("number");
query.setTitle("Query");
query.setDefaultValue("07012774");
ButtonItem button = new ButtonItem();
button.setTitle("Search");
button.setStartRow(false);
button.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
grid.fetchData(form.getValuesAsCriteria());
}
});
form.setItems(query, button);
canvas.addChild(form);
canvas.addChild(grid);
return canvas;
Comment