Compile and Run gwt web application from Command Line

81 views
Skip to first unread message

leila

unread,
Jun 17, 2010, 7:57:53 PM6/17/10
to Google Web Toolkit
Hello,

How we can run the application in command line (windows), and how we
can pass parameters to onLoadModule()
I want to call this from another program and pass 2 points (string lat/
log) to it as arguments.
Please give me your suggestions I am new to this.
Thanks a lot

Leila

fmod

unread,
Jun 18, 2010, 1:00:21 PM6/18/10
to Google Web Toolkit
Hi, from the command line:
start http://somesite.com/MyPage.html

If you want to pass some parameters, you can use the address.
start http://somesite.com/MyPage.html?param1=blah&param2=boo

Somewhere in the onLoadModule() you will need to check
History.getToken()
and parse it.

Regards
Fran

André Moraes

unread,
Jun 18, 2010, 1:46:59 PM6/18/10
to Google Web Toolkit
History.getToken() isn't deprecated?!

I use the History.addValueChangeHandler.

History.addValueChangeHandler(new ValueChangeHandler<String>() {

@Override
public void onValueChange(ValueChangeEvent<String> event) {
location = event.getValue();
}
});

But it only works with the information after the "#", not with the
parameters in the QueryString part of the URL.

On 18 jun, 14:00, fmod <francisco.mode...@gdsoft.eu> wrote:
> Hi, from the command line:
> starthttp://somesite.com/MyPage.html
>
> If you want to pass some parameters, you can use the address.
> starthttp://somesite.com/MyPage.html?param1=blah&param2=boo

fmod

unread,
Jun 18, 2010, 7:57:25 PM6/18/10
to Google Web Toolkit
On Jun 18, 7:46 pm, André Moraes <andr...@gmail.com> wrote:
> History.getToken() isn't deprecated?!
This is the javadoc for History.getToken() in 2.1:

http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/gwt/user/client/History.html#getToken()
Gets the current history token. The handler will not receive a
ValueChangeHandler.onValueChange(com.google.gwt.event.logical.shared.ValueChangeEvent)
event for the initial token; requiring that an application request the
token explicitly on startup gives it an opportunity to run different
initialization code in the presence or absence of an initial token.

So guess is not deprecated.

> I use the History.addValueChangeHandler.
>
>                 History.addValueChangeHandler(new ValueChangeHandler<String>() {
>
>                         @Override
>                         public void onValueChange(ValueChangeEvent<String> event) {
>                                 location = event.getValue();
>                         }
>                 });
>
> But it only works with the information after the "#", not with the
> parameters in the QueryString part of the URL.

Yep, now u tell... There is another way to access the location, but i
never used.
http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/gwt/user/client/Window.Location.html

BTW about the question about how to compile it. You can use ant or
maven.
Reply all
Reply to author
Forward
0 new messages