惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Y
Y Combinator Blog
IT之家
IT之家
博客园_首页
人人都是产品经理
人人都是产品经理
博客园 - Franky
I
InfoQ
Recent Announcements
Recent Announcements
P
Proofpoint News Feed
H
Hackread – Cybersecurity News, Data Breaches, AI and More
GbyAI
GbyAI
大猫的无限游戏
大猫的无限游戏
aimingoo的专栏
aimingoo的专栏
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
月光博客
月光博客
Microsoft Security Blog
Microsoft Security Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
B
Blog RSS Feed
MongoDB | Blog
MongoDB | Blog
雷峰网
雷峰网
博客园 - 聂微东
N
Netflix TechBlog - Medium
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
The GitHub Blog
The GitHub Blog
D
Docker

博客园 - Cool_IT_Cool_Man

如何向MyEclipse项目的文件夹中添加JSP页面? JavaScript调试工具 MyEclipse中如何安装插件(以Subclipse为例)[转] s:textarea中的文本内容在什么时候才能被赋值给Action中的属性? 在Eclipse工作空间中移除再添加项目的方法 在Eclipse工作空间中创建新项目的方法 Visual Studio 使用常见问题 如何阅读C++源代码 《Ogre 3D 游戏开发框架指南》配套光盘的一个小瑕疵 Orz游戏开发框架阅读笔记(一) 类型安全·异常安全·线程安全 如何使用Eclipse从Subversion源码服务器下载源码? UltraEdit不能对Matlab的M文件进行语法高亮显示问题的解决 JessDE 在 Eclipse中不能正确安装的问题 UltraEdit的语法高亮文件网址 如何配置SWRLJess Tab? 编程经验小结 如何在Protege3.4中安装graphviz以便在protege中使用OwlvizTab? 语义网的学习资源大汇集(转载)
由 s:hidden 引起的文本框内容不能传到 struts的Action中
Cool_IT_Cool_Man · 2014-04-08 · via 博客园 - Cool_IT_Cool_Man

<s:form id="startForm" name ="startForm" action="/hall/hall_startList.do" method="post">
   <!--  <s:hidden name="method"></s:hidden>  -->
   <table width="100%" border="0" cellpadding="0" cellspacing="5" class="tab1">
    <tr>
     <td width="70" class="main-td1"><s:text name="room.lable.name"/></td>
     <td width="180" class="main-td1"><s:textfield name="room.name"  class="wenbenkuang" /></td>
          <td width="70" class="main-td1"><slink:a href="hall/hall_search.do"><a href="javascript:search()" class="anniu-cx"><s:text name="common.lable.search"/></a></slink:a></td>
    </tr>
   </table>
  </s:form>

如果不把s:hidden这一行注释掉,则相应的Action的search()函数中接收到的room变量的name属性始终是空字符串,也就是文本框的内容不能赋值给room.name变量。

如果把s:hidden这一行注释掉,则相应的Action的search()函数中接收到的room变量的name属性是文本框的内容,不知道为什么?读者可否指点一二