引入标签(结合实际)
<%@ taglib uri="/webwork" prefix="ww"%>
<%@ taglib uri="/WEB-INF/c.tld" prefix="c"%>引入js,css
<script type="text/javascript"
src="<c:url value='/resources/js/autocomplete/prototype.js'/>">
</script>
<script type="text/javascript"
src="<c:url value='/resources/js ...
action:testAction
action中定义的collection:listBo
...
private List listBo= new ArrayList();
...映射pojo:IndicesData
...
private String dataid;
...具体定义略...
testAction-conversion.properties:
KeyProperty_listBo=dataid
Element_ListBo=com.bjx.dataManage.pojo.IndicesData
CreateIfNull_listBo=true
jsp获取list ...
在dwr-action中除了基本配置外,需引入自己的转换器
<convert converter="bean"
match="com.bjx.puborgan.webapp.action.PubOrganAction" >
<param name="include"
value="pubStru,pubStrus,paginaredList" >
</param>
</convert>
其中加入param是为了防止诸如:
11:07:49,500 INFO DefaultRemoter:51 - Exec: DWRAct ...
在dwr配置文件中如:dwr.xml 加入
javascript="IndicesData"
<convert converter="bean"
match="com.bjx.dataManage.pojo.IndicesData"
javascript="IndicesData">
</convert>
然后在JS中的调用函数里
function test() {
var data = new IndicesData();
data = {
"dataid":"734",
"indicesValue" ...
HelloWorld
程序是没什么主要是IE下面的显示问题
IE下默认显示效果不如FF,只要把程序中的alert中的内容'Hello World!'最后一个
!号用中文的半角输入,效果就和FF一样了。
webwork+spring+hibernate
在com.xxx.service.impl中
加入
import javax.servlet.http.HttpSession;
import org.directwebremoting.WebContextFactory;
程序中
//获取当前session
HttpSession session = WebContextFactory.get().getSession();
//获取session中的属性
session.getAttribute("USER");
return ((PubUsers) session.getAttribu ...
- 17:10
- 浏览 (95)
- 评论 (0)
String sql = new StringBuffer("select {n.*} from ")
.append("PUB_STRU n ")
.append("CONNECT BY PRIOR n.STRU_ID=n.PARENT_ID START WITH n.PARENT_ID =?")
.toString();
List sids = new ArrayList();
Iterator it = dao.findBySQLQuery(sql, struId, "n", PubStru.class).iterator();
whi ...
- 17:27
- 浏览 (94)
- 评论 (0)
//posi 获取搜索条件中 "_" 的位置
//searchText 页面搜索条件值
int posi = -1;
posi = searchText.trim().indexOf("_");
//构造查询条件
DetachedCriteria deCriteria=DetachedCriteria.forClass(PubStru.class);
//组织类型
deCriteria.add(Restrictions.eq("pubStruType.dataId", typeId));
//顶级组织不用判断下级,非顶级组织,搜索组织需在其上级组织的包 ...







评论排行榜