FacesContext fc = FacesContext.getCurrentInstance();
ExternalContext ec = fc.getExternalContext();
HttpServletRequest servletRequest =
(HttpServletRequest)ec.getRequest();
HttpServletResponse servletResponse = (HttpServletResponse)ec.getResponse();
取得
parameter的办法
1)
String ...
//how to get class
Class clazz = String.class;
clazz = int.class;
String s = "abc";
clazz = s.getClass();
clazz = Class.forName("java.util.ArrayList");
//create instance using default constructor
List list = (List) clazz.newInstance();
//isXX ...
//split
String s = "hello world i am 23 years";
String[] ss = s.split("\\s");
//replace
&nbs ...
public class ImageServlet extends HttpServlet {
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
//get the image parameter
  ...
1、题目:一边……一边……
小朋友写:他一边脱衣服,一边穿裤子。
老师批语:他到底是要脱还是要穿啊?
2、题目:其中
小朋友写:我的其中一只左脚受伤了。
老师批语:你是蜈蚣吗?
3、题目:陆陆续续
小朋友写:下班了,爸爸陆陆续续的回家了。
老师批语:你到底有几个爸爸呀?
4 ...
Bean:
public class User {
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = na ...
XHR
has limitations. The big one is that
url:
is not cross-domain: you can't submit the request
outside of the current host (eg: to
url:"http://google.com"
). It is a known limitation
and a common mistake when getting excited about Ajax.
dojo.xhrGet
...
1)dojo.addClass(node:
DomNode|String
, classStr: String
)
添加某class到节点,
var node=dojo.byId('divv');
dojo.addClass('divv', 'color');
dojo.addClass(node, 's1');
2)var bool =
dojo.hasClass(node: DomNode|String
, classStr: String
)
...
特点:传入一个array,
和callback
函数,并用callback
函数循环遍历array.
callback
函数:
function(item[, index, array_alias]),
item:
遍历到的array
item.
index:
当前item
的下标
array_alias: array
的别名
1)
dojo.filter
(array, callbac ...
OGNL表达式语言
一 常量
Char
‘a’
String
‘hello’ 或 &ldq ...
- 浏览: 4132 次
- 性别:

- 来自: 厦门

- 详细资料
搜索本博客
我的相册
inter
共 2 张
共 2 张
最近加入圈子
最新评论
-
dojo and ajax
很有用的函数!!
-- by cscs31 -
Dojo 与style相关的函数 ...
Lz能加上一些注解和例子就更好了:)
-- by cscs31






评论排行榜