资 源 简 介
A struts 2 plugin for Ext.Direct
This plugin allow you to write Ext.Direct Action using annotation:
* @ExtDirectAction
* @ExtDirectMethod
Put the extdirect.jar in your WEB-INF/lib directory
You can call the router to get the API list at:
http://yourdomain:yourport/extdirectj/ExtDirectJRouter.action
Example Annotation Usage
```
package it.extdirectj.test;
import java.text.MessageFormat;
import it.extdirectj.annotation.ExtDirectMethod;
public class TestAction{
@ExtDirectMethod
public int sum(int a,int b) {
return a+b;
}
//you can set different method name
@ExtDirectMethod(name="MyMultiply")
public String multiply(int a,int b){
return "Result : "+(a*b);
}
@ExtDirectMethod
public String echo(String string,boolean bool, int integer){
return MessageFormat.format("String {0} boolean {1} integer {2}", string, bool, integer);
}