[英]In Struts1.3, From Jsp page to action in Java
我是Jsp的新手,並且我的工作應用程序是基於Struts1.3
。 我有一個Jsp
頁面,該頁面顯示基於Jsp
的記錄,可能是記錄應該是一個還是多個,這取決於記錄的存在。 我的Jsp頁面代碼是:
<html:form method="post" action="properties.do" styleId="propertyform">
<logic:iterate id="JobsForm" name="<%=Constant.JOBFORMLISTSECOND%>">
<tr>
<td>
<html:text property="asfrom" name="JobsForm" styleClass="fieldbox2" styleId="textfield50"/>
</td>
<td>
<html:select property="withauthority" name="JobsForm">
<html:option value="0">Select</html:option>
<html:options collection="<%=Constant.INSTALLEDBY%>" property="value" labelProperty="label"/>
</html:select>
</td>
</tr>
</logic:iterate>
<table>
<tr>
<td>
<img onclick="submitPropertyForm(),update()" src="images/new.jpg" />
</td>
</tr>
</table>
</html:form>
而且,我所需要的是,在單擊按鈕后,我需要給定屬性的所有值,但是我無法做到這一點,在我的操作中,我只獲得了所有屬性的一個值。
JobsForm jobsForm = (JobsForm) form;
System.out.println("asFrom:::" + jobsForm.getAsfrom());
System.out.println("withAuth:::" + jobsForm.getWithauthority());
你能指導我怎么做。或者我必須做什么? 用於獲取所有屬性的所有值。
非常感謝,
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.