Is it possible to load a GWT project in a Frame? - gwt

I have developed some kind of "mainframe" for my GWT app. This mainframe holds a GWT Frame object in which I want to load another GWT project, just like you can easily load HTML pages in iframes. The two projects are in the same workspace and I'm using the Eclipse Plugin. Is there any way to do this?

Add an id to your frame and use this:
RootPanel.get("yourFrameId").add(YourWidget);
This should work.

Related

Cannot get JxBrowser to render in eclipse rcp JavaFx environment

I am currently evaluating JxBrowser 6.17 as an alternative browser technology for a eclipse RCP based data maintenance application, since the SWT Browser does not suit our needs.
What are our special needs anyways? Well, we need to embed an older solution into our new application, since we would not be able to add all required features into the new application in time. Since we have the required features in an older JSP based web application we need to embed it to make the functionality available to our customers. This comes with a lot of issues, but for most of them we already generated answers. The biggest issue we are currently facing is that the SWT Browser component does not support instance based Cookies which we need, since our web application has Cookie based session management.
I have also tried using the Mozilla implementation using different profiles, which unfortunately is not possible, since the profile management is just as static as the Cookie management.
Next step is to evaluate commercial frameworks with which I am currently facing some issues.
I requested an evaluation license for JxBrowser and tried to embed it into our eclipse 4 RCP application. I would like to embed it using JavaFX, since we already use JavaFX and would like to avoid AWT.
Using the following code will instantiate a JxBrowser and load the given URL. Actually the request does get fired, but the Browser does not render any content at all.
FXCanvas canvas = new FXCanvas(parent, SWT.NONE);
Browser browser = new Browser();
BrowserView browserView = new BrowserView(browser);
browser.loadURL("http://www.google.com");
canvas.setScene(new Scene(browserView));
Even when loading specific HTML it will not render any content.
There are no observable Exceptions or errors.
Does anybody have an idea on whats the issue in my case?
In a different scenario we use the JavaFX WebView embedding the CKEditor into our application and everything works (more or less) flawlessly, but I am not able to get the JxBrowser to render its contents.
I am sure, that I am doing something wrong (probably something pretty basic :))
What could I be missing?
Any idea or tip could do the trick ;)

How to use RevealRootLayoutContentEvent for designing of the GWT 2.0 layout system in GWTP?

I have just heard about RevealRootLayoutContentEvent yesterday. I have no idea of how to use it whatsoever in GWTP.
Ok, i am using GWTP on eClipse to crease a presenter like the following picture
We first need to select RevealRootLayoutContentEvent when create the Presenter, eClipse will generate some file, then what to do next?
Can anyone give me an a very simple example of how to use RevealRootLayoutContentEvent in GWTP?
Read
http://www.gwtproject.org/doc/latest/DevGuideUiPanels.html#LayoutPanels
If you use RevealRootLayoutContentEvent your application will be put inside RootLayoutPanel. In this case you should avoid using no-"...Layout..." panels.
If you use RevealRootContentEvent RootPanel will be used.

GWT and web template with javascript

I have GWT Web application and web template that consists of html+css+javascript files.
UiBinder holds html template in HTMLPanel. Problem is that this template is based on many javascript files and I know that GWT have problems with that. So my page is rendered without some javascript features.
What can I do with this? What is correct solution for GWT and external web templates?
The issue is not GWT-specific: you cannot inject <script>s using innerHTML (which HTMLPanel ultimately uses).
If you need to dynamically inject scripts in your app, then use ScriptInjector.

Is it possible to mix extjs and GWT components?

I am working with GWT2.3 version.I also found ExtJs4 framework very good and want to club the some of component of ExtJs4 in my application(GWT2.3).So I just want to know it is possible to club components of ExtJs4 with GWT application
Thanks in Adcance
Yes it is. Just add .js source to your public folder in /src. Then you can write custom JavaScript as native methods via JSNI. See more in the docs.
Why not use the GWT compatible project? http://www.sencha.com/products/extgwt/
It has the same widget library (afaik) and integrates quite nicely w/ GWT

GWT/java and javascript

can i design my web pages in html and css instead of java methods and use gwt only in parts of page that i need ajax? and which one is better gwt, extgwt, vaadin(it run apps in server-side.can i also use it in client-side?), etc...? do i also need to know javascript for using gwt?
thanks
can i design my web pages in html and
css instead of java methods and use
gwt only in parts of page that i need
ajax?
Yes, you can. You can create a div on your HTML page and insert your GWT widget there.
which one is better gwt, extgwt,
vaadin(it run apps in server-side.can
i also use it in client-side?)
I don't know about vaadin but Ext-GWT is a set of ready made components to use with GWT which make your life easier especially if you want to build an web app that looks and feels like a desktop application.
do i also need to know javascript for
using gwt?
No, it can be useful sometimes but is not necessary.