struts2.1 标签 备忘

来源:互联网 发布:虚拟试衣间淘宝店铺 编辑:程序博客网 时间:2024/06/05 11:26

     Struts2标签中不能嵌套strut2的标签和用<%%>括起来的java代码。获取当前遍历序号可使用以下代码。主要是使用'%{#ThemeMainBean.index}'。

    <s:textfield name="showList[%{#ThemeMainBean.index}].fieldValue" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm'});" onblur="setCheckTime('%{#ThemeMainBean.index}');" readonly="true"/>

 

 

文件上传

<s:form id="" action="" name="" method="post" enctype="multipart/form-data" theme="simple">

上面标签中红色是必须的否则会提示no result defined for action错误

原创粉丝点击