Monday, October 16th, 2006

RJS API for Java and GWT

Category: Java, JavaScript

Jacob Hookom has liked what he has seen with RJS within Rails, so pondered a RJS like API for GWT and Java.

He then created a ClientWriter that would generate the JavaScript from the Java code.

E.g. in Java:

  1. // MyBean.java
  2. private UIInput nameInput;
  3. public void setNameInput(UIInput input) {
  4.   this.nameInput = input;
  5. }
  6.  
  7. public String action() {
  8.    ....
  9.    if (loginFailed) {
  10.        ClientWriter writer = ....;
  11.        writer.select(this.nameInput, Effect.highlight());
  12.    }
  13. }

A demo of a cart application using this technique is live here

Posted by Dion Almaer at 9:23 am
1 Comment

+++--
3.2 rating from 24 votes

1 Comment »

Comments feed TrackBack URI

Google GWT has a lot more to come… lets see how google defines Ajax.
http://googlelogs.blogspot.com

Comment by Google Logs — October 17, 2006

Leave a comment

You must be logged in to post a comment.