Java开发网 |
注册 |
登录 |
帮助 |
搜索 |
排行榜 |
发帖统计
|
您没有登录 |
» Java开发网 » Architecture & Framework
» Struts
打印话题 寄给朋友 订阅主题 |
作者 | Struts Validator有没有办法只生成一些我们定制的?共用的进行引入 |
YuLimin
简单就是美 版主 发贴: 866 积分: 123 |
于 2005-03-23 17:18
Struts Validator是在表单里动态生成很多共用的JS,有没有办法只生成一些我们定制的,共用的用<script language="javascript" src="../js/Common.js"></script>进行引入? 比如: validateMaxLength() validateRequired() validateDate() ..... 一个页面全部是JS代码,大的不得了。 当兵不后悔!后悔不当兵! 超越黎明时空,追逐时代潮流! 人,是要靠自己的!简单就是美! 我的Java:http://www.Java2Class.net 我的Blog:http://YuLimin.ItEye.com j2sdk老问题,classpath等,认真配置后仍然存在问题! |
作者 | Re:Struts Validator有没有办法只生成一些我们定制的?共用的进行引入 [Re:YuLimin] |
jigsaw
KK CJSDN高级会员 发贴: 3666 积分: 93 |
于 2005-03-26 02:04
i never use struts validator... u may need to implement ur validation-rules.xml and ur validator plugin.. or u can try to remove some un-used nodes from validation-rules.xml No one knows except both of us. 909090909090909090909090909090909090909090b8533ce76c8d6c241868968a0408c338b4ffbf ISO/IEC 9899:1999 关于Jute Forum的长期发展给官方的建议 |
作者 | Re:Struts Validator有没有办法只生成一些我们定制的?共用的进行引入 [Re:YuLimin] |
floater
Java Jedi 总版主 发贴: 3233 积分: 421 |
于 2005-03-26 03:06
yes, I am having the same issue, just don't have time to think about this. I am still believing, there is no such thing, like a javascript framework. The reason is just what you said, the overhead in size is too big. Once someone gave me this js framework, it was about 110K in size. Does anyone want to download a 5K page with 110K javascript embedded? Nontheless, it seems a lot of people buying in this validator lib, for its simplicity to use, do some setup and then it's there. In this case, we shouldn't manually to change it at all, let the tool do the dirty job. So my advice is "Forget it, it's not worth it" - quote from the snowman, threatened by the rabbit with a hairdryer. "Any fool can write code that a computer can understand. Good programmers write code that humans can understand." - Martin Fowler, Refactoring - Improving the Design of Existing Code 致JAVA初学者+如何下手学JAVA |
已读帖子 新的帖子 被删除的帖子 |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |