首先是<html:select>的用法
下面是一个组合使用<logic>和<bean>
下面是一组<logic:equal>
下面是一个用<html:link action="">传值的例子
我就总结了几个比较常用的
<html:select property="comp_Version" styleClass="borderon">
<html:option value="0" >所有安装版本</html:option>
<html:option value="1" >安装版本未知</html:option>
<logic:notEmpty name="versionList">
<html:options collection="versionList" property="version" labelProperty="version"></html:options>
</logic:notEmpty>
</html:select>
//这里的versionList不是formBean里面得值,而是request或session中的集合。
下面是一个组合使用<logic>和<bean>
<logic:present name="userComputerEditForm" property="list">
<logic:iterate id="computerInfo" name="userComputerEditForm" property="list">
<tr align="center" onMouseOver="this.style.backgroundColor='#99DDFF'" onMouseOut="this.style.backgroundColor=''">
<logic:empty name="computerInfo" property="computername">
<td class="gray">机器名为空</td>
</logic:empty>
<logic:notEmpty name="computerInfo" property="computername">
<td><bean:write name="computerInfo" property="computername"/></td>
</logic:notEmpty>
<td><bean:write name="computerInfo" property="userName"/></td>
<td><bean:write name="computerInfo" property="setuptime" format="yyyy-MM-dd"/></td>
<td><bean:write name="computerInfo" property="version"/></td>
<td><bean:write name="computerInfo" property="ipaddress"/></td>
<td><bean:write name="computerInfo" property="isactivate"/></td>
<td><bean:write name="computerInfo" property="isOnline"/></td>
<td><html:link action="/gotoComputerSetAction" paramId="id" paramName="computerInfo" paramProperty="computerId">设置</html:link></td>
<td><html:link action="/showUserVirComAction" paramId="id" paramName="computerInfo" paramProperty="computerId">设置</html:link></td>
</tr>
</logic:iterate>
</logic:present>
//注意 <bean:write>的format属性 他只能转换时间类的值
下面是一组<logic:equal>
<logic:equal name="computerInfo" property="version" value="0">
<td><span class=gray>未知</span></td>
</logic:equal>
<logic:notEqual name="computerInfo" property="version" value="0">
<td><bean:write name="computerInfo" property="version"/></td>
</logic:notEqual>
下面是一个用<html:link action="">传值的例子
<html:link action="/gotoComputerSetAction" paramId="id" paramName="computerInfo" paramProperty="computerId">设置</html:link>
//paramId这个属性后面跟的就是你在action中要用request.getParameter("id")
抓的
//paramName这个属性后面跟的是与action绑定的form名或者是在用 <logic:iterate>
遍历时的id的值
//paramProperty这个属性就是form里的属性或是用 <logic:iterate>
遍历时的id的属性
如果要在链接后面传多个值的话我都是用${}来解决的
<html:link href="/xxx.do?xxx=${}&xxx=${}">
我就总结了几个比较常用的