help please

9 views
Skip to first unread message

Rijin

unread,
Mar 7, 2010, 2:30:40 PM3/7/10
to Google API Libraries for GWT
Hei experts,

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]


Martin Trummer

unread,
Mar 8, 2010, 8:34:35 AM3/8/10
to Google API Libraries for GWT
if you want to integrate another api, you should look there for help
e.g.Google AJAX Search is well documented
http://code.google.com/docreader/#p=gwt-google-apis&s=gwt-google-apis&t=AJAXSearchGettingStarted

Rijin

unread,
Mar 8, 2010, 3:09:49 PM3/8/10
to Google API Libraries for GWT
public class SimpleSearch implements EntryPoint {
int currentRow;
FlexTable resultsTable;

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

Rijin

unread,
Mar 8, 2010, 3:22:11 PM3/8/10
to Google API Libraries for GWT
below errors are get on doing above things


[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

Eric Ayers

unread,
Mar 8, 2010, 3:26:37 PM3/8/10
to gwt-goo...@googlegroups.com
Did you run through the Getting Started first?


--
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



--
Eric Z. Ayers
Google Web Toolkit, Atlanta, GA USA
Sign up now for Google I/O 2010: May 19-20, http://code.google.com/io

Rijin

unread,
Mar 8, 2010, 3:50:37 PM3/8/10
to Google API Libraries for GWT
yes sir but i cant compile that properly in eclipse ..please help me
to do this sir.

above errors are generated.

Eric Ayers

unread,
Mar 8, 2010, 4:49:56 PM3/8/10
to gwt-goo...@googlegroups.com
Oops!  I edited the docs last week and made a mistake in the editing of the .gwt.xml file section for AjaxSearch:

instead of "<inherits name='com.google.gwt.gears.Offline",

it should read:

 <inherits name='com.google.gwt.search.Search' />

I'm looking over the others now.

-Eric.


--
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

Rijin

unread,
Mar 9, 2010, 9:32:33 AM3/9/10
to Google API Libraries for GWT
Thanks got it....
another doubt


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..

Eric Ayers

unread,
Mar 9, 2010, 9:43:21 AM3/9/10
to gwt-goo...@googlegroups.com
See the red text at the top of:

https://groups.google.com/group/Google-AJAX-Search-API?pli=1

-Eric.


--
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

Rijin

unread,
Mar 9, 2010, 2:10:05 PM3/9/10
to Google API Libraries for GWT
ya maximum 64 result or 32 how get 32 results....please gave a way..

Rijin

unread,
Mar 10, 2010, 3:38:57 PM3/10/10
to Google API Libraries for GWT
Eric i go through the link u gave....but they said that maximum 32-64
results must give....me only want that much level ....upto 32-64 .
give a way please..

Rijin

unread,
Mar 12, 2010, 10:27:30 AM3/12/10
to Google API Libraries for GWT
please aany one answer me......
Reply all
Reply to author
Forward
0 new messages