struts的和问题
<html:form action="/list?commpar=select" method="post">
类别:<html:select property="commodity.comtype">
<html:optionsCollection name="comType" label="typeName" value="typeId"/>
</html:select>
品牌:<html:select property="commodity.brand">
<html:optionsCollection name="brands" label="brandName" value="brandId"/>
</html:select>
<html:submit value="查找"/> <html:submit value="增加"/>
</html:form>
这里的问题是如何使 commpar 参数随着你提交 查找" 或 "增加" 而执行 在 DispatchAction 不同的方法
我知道用form加上js可以 可<html:form > 如何用,
而且
<html:select property="commodity.comtype">
<html:optionsCollection name="comType" label="typeName" value="typeId"/>
</html:select>
是不是一定要放html:form >里面 我放 <form>中就出错
我的配置文件
<action-mappings>
<action path="/list" parameter="commpar" input="/index.jsp" type="com.y2b2.Action.CommodityAction" name="CommodityForm" scope="session">
<forward name="list" path="/list.jsp" ></forward>
</action>
</action-mappings>
这个parameter 它能填入什么参数 我现在只知道一种 就是跟在<html:form action="/list?commpar=select" method="post"> 后面