Easyajax Overview
Easyajax aims to provide a simple but powerful ajax framework, it will include:
- # {javascript-expression} like EL support. You can use EL in html text
or element attributes, it will be evaludated and update the page content.
- easy to use ajax component, simple put a jsclass="classname" attribute
in any html element such as <div>, <input>, and the element will
attach a javascript object for its behavior. something like MS's behaivor.
- RPC support. you can call server side method directly in javascript, EasyAJAX's
RPC is more powerful than other exists ajax RPC since it enable you pass/return
complex data struture that can be represent as XML.
- XML to Javascript Mapping. like JAXB, but take advantage of javascript,
makes the mapping more simple.
Expression Text
Now, in html, we can use EL to simplify dynamic content. just use # {javascript-expr}
format in the HTML source, and it will be evaluated and replace with the result.
Welcome to #{page.username} ,
You are #{page.age} years old.
Do you know that 3.14 * 5 * 5 = #{3.14*5*5}
中文是否正常?
the source code is very simple: