ClickIDE is an Eclipse/WTP plug-in for web application development using Click. This release has not new features however it supports Click 1.5 and Eclipse 3.4/WTP 3.0.
Please download ClickIDE 2.1.0 and enjoy Click!!
ClickIDE is an Eclipse/WTP plug-in for web application development using Click. This release has not new features however it supports Click 1.5 and Eclipse 3.4/WTP 3.0.
Please download ClickIDE 2.1.0 and enjoy Click!!
Url Rewrite Filter has a configuretion file WEB-INF/urlrewrite.xml. This is a very simple example of clean URL with a Click application.
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE urlrewrite
PUBLIC "-//tuckey.org//DTD UrlRewrite 2.6//EN"
"http://tuckey.org/res/dtds/urlrewrite2.6.dtd">
<urlrewrite>
<rule>
<from>^/contents/([0-9]+).htm$</from>
<to type="forward">/content.html?contentId=$1</to>
</rule>
</urlrewrite>
For example, Url Rewrite Filter will forward /contents/001.htm to /content.htm?contentId=001.
If content.htm has possibility to receive any other query parameters, we can define following rules.
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE urlrewrite
PUBLIC "-//tuckey.org//DTD UrlRewrite 2.6//EN"
"http://tuckey.org/res/dtds/urlrewrite2.6.dtd">
<urlrewrite>
<!-- No Query String -->
<rule>
<from>^/contents/([0-9]+).htm$</from>
<to type="forward">/content.html?contentId=$1</to>
</rule>
<!-- With Query String -->
<rule>
<from>^/contents/([0-9]+).htm?(.+)$</from>
<to type="forward">/content.html?contentId=$1&$2</to>
</rule>
</urlrewrite>
Of course, we can use Url Write Filter with other frameworks such as Struts. I think Url Write Filter is a simple solution to make clean URL in the Java web applications.
For example, see the below page class. If you clicks AjaxRequestButton, Click invokes getAllBooks() using XMLHttpRequest. And getAllBooks() renders a Java object as JSON. AjaxRequestButton generates a HTML button that invokes Ajax.Request of prototype.js.
public class AjaxPage extends AjaxPage {
public AjaxRequestButton button
= new AjaxRequestButton("search", this, "getAllBooks");
public AjaxPage(){
button.addAjaxHandler(
AjaxRequestButton.ON_COMPLETE, "displayResult");
}
public boolean getAllBooks(){
List<Book> books = bookService.getAllBooks();
renderJSON(books);
return false;
}
}
Next example. AjaxSubmit control send Form using Ajax.Request.
public class AjaxPage extends AjaxPage {
public Form form = new Form("form");
private TextField keyword = new TextFiled("keyword");
private AjaxSubmit search = new AjaxSubmit("search", this, "onSearch");
public AjaxPage(){
form.add(keyword);
form.add(search);
}
public boolean onSearch(){
List<Book> bookList = bookService.search(keyword.getValue());
renderJSON(books);
return false;
}
}
Of course, these controls need more improvement. However I think this concept matches to Click Framework well.
However I will introduce S2Click detailed features in this blog. And also I will feedback these features to Click Framework from S2Click in the feature.
This is the first step of introducing Click Framework to many Java developers. I'll make effort to incubate Click Framework in the Apache Incubator.
AIR GEAR is an open source IDE for Adobe AIR development. It works as an Eclipse plug-in so you can use it with many other Eclipse plug-ins and powerful features of Eclipse.
AIR GEAR has following features:
See this page about detailed use.
Enjoy your development!