1、execution.sendRedirect(url)

当使用方法execution.sendRedirect(url)进行页面跳转时,在url中添加参数:url?test=5;

跳转页面获取参数:

Executions.getCurrent().getParameter("test")

2、(1)include.src(url)

(Include.zul)前台写法:

<include id="content" src="Grid.zul?test=10&amp;test1=30"/>

java后台写法:

content.setSrc("Grid.zul?test=10&test1=30");

Grid.zul获取参数:

前台写法:${param.test},${param.test1}

java后台写法:param.get("test")[0],param.get("test1")[0]------zk7.0.2 版本。

或Executions.getCurrent().getParameter("test");

若想在Grid.zul页面中获取Include.zul页面中的控件include,使用

Path.getComponent("include");

(2)Include.zul中src属性值写为"Grid.zul",缺参数,后台

Map<String,Object> map = Executions.getCurrent().getAttributes();
map.put("test", "钢之炼金术");

则Grid.zul后台获取

Map<String,Object> map = Executions.getCurrent().getAttributes();
System.out.println(map.get("test").toString());

[Ljava.lang.String; cannot be cast to java.lang.String错误

04-26 11:23