摘要: 用Collections类sort方法排序时,需要实现Comparator接口的compare方法首先新建类ComparatorCategoryDetail实现Comparator<Object>public class ComparatorCategoryDetail implements Comparator<Object>{ public int compare(Object o1, Object o2) { CreditCategoryDetail creditCategory0 = (CreditCategoryDetail)o1; CreditCategor 阅读全文
posted @ 2011-03-31 14:58 Horrison 阅读(410) 评论(0) 推荐(0) 编辑
摘要: 在配置了Hibernate的延迟加载后,发现没有生效,原因是应为使用的json解决办法是,在struts 的配置文件当中加入一下代码<action name="listRole" class="roleAction" method="findAllRole"><result type="json"><param name="includeProperties">roles/[/d+/]/.roleId,roles/[/d+/]/.roleName,roles/ 阅读全文
posted @ 2011-03-04 15:19 Horrison 阅读(371) 评论(0) 推荐(0) 编辑
摘要: $("input[type='checkbox'][name='resId']:checked").each(function(){ alert($(this).val()); });$("input[type='checkbox'][name='resId']:checked").each(function(){ resIds = resIds + $(this).val() + ","; });type 为checkbox name 为resId 状态为 选中的复选框 阅读全文
posted @ 2011-03-01 18:23 Horrison 阅读(144) 评论(0) 推荐(0) 编辑
摘要: $("#test").attr("href","a.jsp"); 阅读全文
posted @ 2011-02-28 10:14 Horrison 阅读(238) 评论(0) 推荐(0) 编辑
摘要: $('input[name="roleStatus"]').val([$('#roleStatus_' + id).text()]);roleStatus为radio的name$('#roleStatus_' + id).text()为要选择的radio的值更多:http://lichuhui.javaeye.com/blog/271574$("#roleStatus1").attr("checked",true);选中指定ID的radio$("input[name=roleS 阅读全文
posted @ 2011-02-25 14:26 Horrison 阅读(1041) 评论(0) 推荐(0) 编辑
摘要: $("input:checked").each(function(i){ alert($(this).val()); }); 阅读全文
posted @ 2011-02-24 17:24 Horrison 阅读(401) 评论(0) 推荐(0) 编辑
摘要: 先看Action类代码public class TestAction extends ActionSupport { private String bookName; private String bookPrice; public String getBookName() { return bookName; } public void setBookName(String bookName) { this.bookName = bookName; } ... 阅读全文
posted @ 2011-02-24 10:09 Horrison 阅读(271) 评论(0) 推荐(0) 编辑
摘要: <action name="addRole" class="roleAction" method="createRole"> <result name="success" type="redirect">listRole.action</result> <result name="error">/fail.jsp</result> <result name="input">/roleA 阅读全文
posted @ 2011-02-23 17:50 Horrison 阅读(224) 评论(0) 推荐(0) 编辑
摘要: 思想:通过前台展现层(Velocity)中的工具(tools)方法来修改。***************具体修改步骤:1、在toolbox.xml配置文件中添加以下代码:<tool> <key>date</key> <scope>application</scope> <class>org.apache.velocity.tools.generic.DateTool</class></tool>2、在前台页面中需要显示时间的地方添加这样的代码:例如:要显示的时间为:$!user.time 那么添加的 阅读全文
posted @ 2011-01-10 11:59 Horrison 阅读(1116) 评论(0) 推荐(0) 编辑
摘要: jFeed 是一个通用的 RSS/ATOM 解析器jQuery插件jFeed 支持 RSS 0.91, 0.92, 1.0, 2.0 和 Atom 1.0 等格式。使用方法:jQuery.getFeed(options); 参数: * url: the feed URL (required). * data: data to be sent to the server. See jQuery.ajax data property. * success: a function to be called if the request succeeds. The function gets pass 阅读全文
posted @ 2010-12-10 18:10 Horrison 阅读(539) 评论(0) 推荐(0) 编辑