Actually i doing my final year project. for that i want to use googles
search results. so want to use gwt-google.api in GWT web
project[eclipse] . My problem is that how use that api in gwt web app
and compilie that. any one please help me to compile that....may god
bless u...[soory for my language]
public void onModuleLoad() {
resultsTable = new FlexTable();
SearchControlOptions options = new SearchControlOptions();
WebSearch webSearch = new WebSearch();
// Choose no HTML generation for quicker results.
webSearch.setNoHtmlGeneration();
options.add(webSearch);
final SearchControl control = new SearchControl(options);
control.addSearchCompleteHandler(new SearchCompleteHandler() {
public void onSearchComplete(SearchCompleteEvent event) {
WebSearch search = (WebSearch) event.getSearch();
WebResult result = (WebResult) event.getResult();
++currentRow;
resultsTable.setText(currentRow, 0, "" + currentRow);
resultsTable.setHTML(currentRow, 1, "<a href=\"" +
result.getUrl() + "\">"
+ result.getTitle() + "</a>");
}
});
final TextBox textBox = new TextBox();
textBox.setText("treehouse");
Button button = new Button("Run Search");
button.addClickListener(new ClickListener() {
public void onClick(Widget sender) {
for (int i = 0 ; resultsTable.getRowCount() > 0; ++i) {
resultsTable.removeRow(0);
}
currentRow = 0;
control.execute(textBox.getText());
}
});
VerticalPanel vp = new VerticalPanel();
vp.add(textBox);
vp.add(button);
vp.add(resultsTable);
RootPanel.get().add(vp);
}
}
This code i compiled with GWT but cant compile they make more errors
they say inheritance no use
i do thesse steps in GWT
make a new project and
delete the code with class and replace all code with above code get
from urs but can't compile with eclipse please help me
[ERROR] Errors in 'file:/C:/Users/RIJIN/workspace/sample/src/com/
google/sample/client/Sample.java'
[ERROR] Line 75: No source code is available for type
com.google.gwt.search.client.SearchControlOptions; did you forget to
inherit a required module?
[ERROR] Line 77: No source code is available for type
com.google.gwt.search.client.WebSearch; did you forget to inherit a
required module?
[ERROR] Line 81: No source code is available for type
com.google.gwt.search.client.SearchControl; did you forget to inherit
a required module?
[ERROR] Line 82: No source code is available for type
com.google.gwt.search.client.SearchCompleteHandler; did you forget to
inherit a required module?
[ERROR] Line 84: No source code is available for type
com.google.gwt.search.client.SearchCompleteHandler.SearchCompleteEvent;
did you forget to inherit a required module?
[ERROR] Line 86: No source code is available for type
com.google.gwt.search.client.WebResult; did you forget to inherit a
required module?
Finding entry point classes
[ERROR] Unable to find type 'com.google.sample.client.Sample'
[ERROR] Hint: Previous compiler errors may have made this
type unavailable
[ERROR] Hint: Check the inheritance chain from your module;
it may not be inheriting a required module or a module may not be
adding its source path entries properly
--
You are subscribed to the Google Groups "GWT-Google-Apis" group.
For more options, visit http://groups.google.com/group/gwt-google-apis?hl=en
above errors are generated.
--
You are subscribed to the Google Groups "GWT-Google-Apis" group.
For more options, visit http://groups.google.com/group/gwt-google-apis?hl=en
i want upto 100 and more result from google
what are settings i do for that....i heard about ResultSetSize but it
is LARGE and SMALL only then how get 100 more result to analyse..
--
You are subscribed to the Google Groups "GWT-Google-Apis" group.
For more options, visit http://groups.google.com/group/gwt-google-apis?hl=en