Nesting JavaScriptObjects in JavaScript Overlay Types in GWT at Blue Diamonds FX - 0 views
Maven and GWT - a never ending story? - 0 views
-
One of the cool things on GWT is, that you cannot just use Java as a programming language, you can also use all your cool and great tools, like Eclipse, JUnit, or build tools like Ant, Gradle or Maven. Sure you can, but this Maven thing seems not to be so easy. So lets take a look on how to solve it.
-
keep the structure clean by separating client (GWT) and server (maybe Java or even any other language) code in a strict way. This means, that your GWT code will not be in the same project as your Java EE web descriptor (web.xml).
-
If you have done the import, our photo-album-server module will be a Dynamic Web Project in Eclipse and you can add it to your Tomcat, JBoss or whatever server runtime. You can start it and run it as you like.
- ...2 more annotations...
GWT JSNI | GWT Tutorials - 0 views
-
JSNI gives you the freedom to pick and choose which GWT capabilities you want to use.
-
JSNI is base on Java JNI which allows you to declare a Java method, but implement the definition in another language.
-
entire JavaScript libraries have been implemented into GWT with the use of JSNI.
Using GWT Events | GWT Tutorials - 0 views
-
all event handlers are abstract classes, so you must implement the abstract functions. For example, the onClick method is abstract, so you need to implement it in your ClickHandler class, as well as define what the onClick method is going to do.
Rich Internet Applications (RIA) » Blog Archive » GWT UiBinder: Better Web Ap... - 0 views
-
Mixing HTML and Widgets So how can we mix widgets and html properly? Before GWT version 2.0, the most common way was to use “RootPanel.get(’someId’)” to access an HTML element in the application host page, and then create an object there to attach the widgets to (ie. a “RootPanel”). If we need to embed only a few widgets in the host page, this technique suffices. But doing this in a real application with a large number of widgets becomes complex and slow. UiBinder scales better because it does not inject widgets into the HTML of the host page. Instead, you declare your layout in a stand-alone HTML file that can be composed with other components as many times as necessary to build more complex interfaces. Composition entails componentization, allowing the developer to create subparts of the user interface (UI components) that can be packaged, re-used and tested in isolation.
Anchors in GWT | GWT Tutorials - 0 views
-
The primary reason why I am writing a specific tutorial on the Anchor widget is because without it you will not be able to easily use GWT’s history framework
-
let’s talk about a hash, and how to use them. Since GWT is an easy way to use AJAX we are going to stay within that realm when talking about the hash. A hash is simply anything with the pound symbol in front of it. For example “#gwt” is a hash that points somewhere in your web application. We are going to learn more about the hash in the tutorial on GWT history.
-
Anchor anchor = new Anchor("GWT Tutorials", "http://www.gwttutorials.com?action=hello", "_blank"); String paramAction = Window.Location.getParameter("action"); //Do something with paramAction.
- ...1 more annotation...
GWT History | GWT Tutorials - 0 views
-
GWT handles the browser’s history stack by changing the hash, which is always preceded by the “#” symbol. While the JavaScript community call it a hash, GWT calls it a token, but regardless of what you call it, the token is how you are going to update the state of your web application.
-
The way in which you are going to capture changes in history is through the ValueChangeHandler. You will need to implement the ValueChangeHandler in your EntryPoint class,
-
The next step is to implement a function that will handle the logic of your state changes. So I am going to create a new method called onHistoryChange and I am going to pass in an argument called token. You will see why it is not recommended to write your logic in the onValueChange method in a moment.
- ...2 more annotations...
developerlife - Tutorials » GWT Tutorial - Managing History and Hyperlinks - 0 views
-
GWT provides a way for your apps to hook into the browser’s history mechanism, so that you can control what happens when a user hits Back or Forward in their browser. You can also programmatically manipulate the browser’s history, and even create hyperlinks in your apps that can hook into the browser’s history mechanism. You can even intercept these hyperlinks when a user clicks on them, instead of having the browser handle it, or both.
-
tokens allow you to map a specific state of your application to what’s in the browser’s history stack. When your app starts up, the stack is empty. When the user interacts with your app, and clicks on something, you can add tokens to this stack (either via hyperlinks or calls to History.newItem(String token)). This lets you change the history. You can also attach a HistoryListener to your app which will allow your app to respond to this change of history.
-
Why do it this way? I mean, if your app generates the tokens themselves, why not just change the state instead of dealing with receiving a history change notification (that you just initiated) and then respond to it? A good reason for taking the trouble to do this, is to allow people to bookmark certain states of your application. If you don’t want them to do this, then you can just plug into the history mechanism, and then ignore all the history state change events, and make it so that the Back or Forward button does not mess your app up.
- ...7 more annotations...
Google Web Toolkit (GWT 2.0) with Eclipse - Tutorial - 0 views
-
The standard approach in Java is to have separated projects for separate purposes. For example the domain model of the application is usually defined in its own project.
-
This chapter describes how you can make these projects available to the GWT compiler as modules.
-
GWT need to have access to the source files to compile them into Javascript code. If you add the project or the jar file to your GWT classpath then the Java compiler will not complain if you use the classes from the included project / jar but the GWT compiler will not be able to compile them. To make the Java files available to the GWT compiler you need to Create a gwt.xml file in the Java project / jar file which you want to use - This will instruct the GWT compiler to use the listed classes. Use the included library via the inherit definition If you are using a jar file you also need to include the source files in the jar
JSNI Components « Technology I/O - 0 views
-
JSNI lets you interface between Java and JavaScript in a type-safe way; you can use JavaScript objects in the Java code and rely on Java’s strong typing to protect you against various programming errors. But again, the more functionality you include in a single JSNI block, the less you can rely on Java’s strong typing to minimize errors. JSNI also provides a seamless way of moving between Java and JavaScript, allowing you to pass objects and exceptions across the boundary in both directions. Through JSNI, you manage JavaScript objects from Java, and you can call back to the Java code from the JavaScript code you write. One use is to wrap a third-party JavaScript library, where you create JavaScript objects from the library and pass them around the GWT Java code before perhaps sending them back to the JavaScript library.
-
A guiding principle of JSNI coding is to spend as little time as possible in “the dark side”; each JSNI method should be at an atomic level (perform one clear function) so that you isolate issues and keep as much control as possible in the strongly-types Java realm.
-
Here’s a simple JSNI method call: public static native void method_name(ObjectTyp someData) /*-{ someData.@org.gwtbook.client.Data::data1 == "GWT In Action" }-*/; We hope that doesn’t look too scary, even with the @ and :: symbols sprinkled in.
- ...7 more annotations...
« First
‹ Previous
81 - 100 of 200
Next ›
Last »
Showing 20▼ items per page