使用JSNI来调用JAVA方法

静态方法的调用:
	public static void addLinkEvent(Element element){
		String type=element.getAttribute("linktype");
		EventType event=map.get(type.toLowerCase());
		addClickListener(element, event);
	}
	
	public static native void addClickListener(Element element,EventType event)/*-{
		element.onclick=function(){
			@com.extjs.gxt.ui.client.mvc.Dispatcher::forwardEvent(Lcom/extjs/gxt/ui/client/event/EventType;)(event);
		}
	}-*/;

你可能感兴趣的:(java,mvc,UI)