I created a login page in GWT using widgets and RPC. After succesful login, i want to display another page that also uses GWT widgets (i will use Google Chart Tools Library 1.1). I'm using GWT plugin for Eclipse that creates some folders when starting new projects(server,client....).
How to display second GWT page from the first one?
I have seen this (GWT multi modules for separate HTML pages?), is this the right way?
One way to do that can be that upon login succes, the server send you back an url and you open this url on your client side (onSucess) by changing the location of the current window :
Window.open(YOUR_URL_TO_OTHER_GWT_PAGE, "_self", "");
or (better) :
public static native void changeWindowLocation(YOUR_URL_TO_OTHER_GWT_PAGE)/*-{
$wnd.location.href = url;
}-*/;
Related
In wicket how can I move using link in one application to another application. I had my application url like this http://test.examplefree.com/hellohomepage/details now I want to create an url link in my application. so that when I click on that link it can go to other application whose url is like http://test.examplefree.com/statusreport/homepage. Both the applications have same domain name, but the links are different. And my both applications are on three different servers like dev/test/prod. So I don't want to hard code the entire url, only the part of it, like /statusreport/homepage or /homepage/anyapplication.
I tried with
html
Click Me to go to next application
java
add(new ExternalLink("externalLink1", "/statusreport/homepage", "Click Me"));
I believe what you've done should work. What does it produce in the final HTML ?
Another way is to use RequestCycle.get().getUrlRenderer().renderFullUrl(Url.parse("/statusreport/homepage")).
I am starting to use google analytics, and my question is the following.
I'm trying to set up different url goals, but the problem is that i have a sign up process inside an iframe, like a wizard. For google analytics, all the process happens in the same view, but inside the iframe, the url is all time changing.
I need help both to configure my goals in admin panel and what do i have to do in the code. I'm working with Zend framework.
Add the standard tracking code in the ifram html.
If your iframe is on the same domain, it works fine.
If not, see the explaination on the doc :
use JavaScript to load the iFrame and pass in the cookie information using the _getLinkerURL() method
_gaq.push(function() {
var pageTracker = _gat._getTrackerByName();
var iframe = document.getElementById('myIFrame');
iframe.src = pageTracker._getLinkerUrl('http://www.my-example-iframecontent.com/');
});
Is there an easy way to force the entire page to reload from Vaadin? I have a portlet which affects the header value displayed which is pulled from IBM WebSphere's dynamic cache in a separate JSP.
I am porting over an old JSF portlet to Vaadin which depending on page reloads between actions to reflect the new value in the header template. So now I need to force the entire page (not just the portlet) to reload to make it appear that the action took effect.
You can reload the hosting web page with JavaScript:
getMainWindow().executeJavaScript("window.location.reload();");
I think this should also do the trick in a portal.
Is there a way to upload an image to the server using smart gwt? I noticed there isn't an image upload widget. Does anyone know of some open source code I could use to do this. Right now I'm using a regular upload form, that forces the page to reload.
I believe Smart does provide this functionality Upload.
The key is to use a hidden iframe page as the target so your app does not get reloaded.
This blog post seems to cover it.
For the JSNI on you hidden page in your app want something like:
public static native void uploadComplete() /*-{
$wnd.alert('Upload Complete');
}-*/;
Then on the hidden page specify in the body onLoad
window.parent.UploadComplete();
HiI have to create one login module using GWT with RPC with the functionality of login, registration and forgotPassword. Login is working fine. Now i have to proceed for registration and forgot password but i have in trouble to configure entry point. In my login page i have created hyperlink "REGISTER" and "FORGOT PASSWORD" and when i will click on Register Hyperlink i want to open Registration page (created using GWT) but i have no idea to implement that. please provide me any useful suggestion..
Thanks
Arun
You can create Hyperlink objects that have tokens for example Register and forgotPassword. Then you add a HistoryListener or a ValueChangeHandler (depends on which version of GWT you are using) and then just add the page to the panel or if you want to do a redirect you can do a JSNI redirect.
public static native void redirect(String url)/*-{
$wnd.location = url;
}-*/;
Docs for GWT 2.0