PDA

View Full Version : Submit Button Event



sundhar_v
4 Sep 2009, 1:53 AM
Hi All.

I am doing a Proto on EXT GWT, i have created the modules and compiled the same when i click the submit button, i should call another html file. Pl. help me how to write a simple submit action.

(eg. in the html we will write like onClick="javascript:window.location.href('myfile.html');").

I want some thing like this can any one help me to acheive my task.

Secondly, when i am compiling in the output folder it is creating a number of html file like
0FF2297F4CC6338C6FB6B9BFDA51BC43.cache.html
48B3251B079F771D6C7F8AC1C8238BFB.cache.html
59744757FA2C6E4344D87A133FE8B852.cache.html
ACF4BBB50F2A28A41C1546C4E3AE4967.cache.html
F38635EBE99629EC40D8416A2E59861F.cache.html
history.html
hosted.html
AccountDelegation.html

apart from the css, gwt and images folder. Pl. let me know is all the file is important?. If i have some 20 modules means all the twenty modules is having the css, gwt and images folder. is there any option to refer these common file in one folder...?

Thanks and Regards,
Sundhar

suresh.sivanantham
6 Sep 2009, 10:48 PM
I am doing a Proto on EXT GWT, i have created the modules and compiled the same when i click the submit button, i should call another html file. Pl. help me how to write a simple submit action.

(eg. in the html we will write like onClick="javascript:window.location.href('myfile.html');").

I want some thing like this can any one help me to acheive my task.
new Button("click", new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(ButtonEvent ce) {
redirect("http://www.emgarten.com/");
}
})
public native void redirect(String url)/*-{
$wnd.location = url;
}-*/;

Secondly, when i am compiling in the output folder it is creating a number of html file like
0FF2297F4CC6338C6FB6B9BFDA51BC43.cache.html
48B3251B079F771D6C7F8AC1C8238BFB.cache.html
59744757FA2C6E4344D87A133FE8B852.cache.html
ACF4BBB50F2A28A41C1546C4E3AE4967.cache.html
F38635EBE99629EC40D8416A2E59861F.cache.html
history.html
hosted.html
AccountDelegation.html

apart from the css, gwt and images folder. Pl. let me know is all the file is important?. If i have some 20 modules means all the twenty modules is having the css, gwt and images folder. is there any option to refer these common file in one folder...?to achieve this , you have to penetrate through your nocache.js and cache.html files..
badly that will kill ur time... so try http://code.google.com/webtoolkit/doc/1.6/FAQ_DebuggingAndCompiling.html#What%27s_with_all_the_cache/nocache_stuff_and_weird_filenames to know some details about these files.....

suresh.sivanantham
6 Sep 2009, 10:59 PM
I am doing a Proto on EXT GWT, i have created the modules and compiled the same when i click the submit button, i should call another html file. Pl. help me how to write a simple submit action.

(eg. in the html we will write like onClick="javascript:window.location.href('myfile.html');").

I want some thing like this can any one help me to acheive my task.


new Button("click", new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(ButtonEvent ce) {
Window.open("http://www.google.com/", "_self", null);
// redirect("http://www.emgarten.com/");
}
})