數組列表我創造和傳遞到我的JSP是我怎樣可以過濾支柱
ArrayList countryList = new ArrayList();
countryList.add(new CountryData("1", "USA"));
countryList.add(new CountryData("2", "Canada"));
countryList.add(new CountryData("3", "Mexico"));
countryList.add(new CountryData("4", "Canada"));
JSP頁面上,我使用
<html:select property="country" >
<html:option value="0">Select Country</html:option>
<html:optionsCollection name="InputForm" property="countryList"
label="countryName" value="countryId" />
</html:select>
顯示是否可以過濾列表在jsp上只顯示加拿大的下拉菜單
你笑過濾掉除「加拿大」的所有國家uld在你的java代碼而不是在JSP中進行過濾。 – admenva
過濾取決於我認爲,沒有任何差別在另一個費爾德 – user1516790
由用戶輸入的值。無論如何,只要用戶在其他字段中選擇了一個值,就應該使用javascript進行過濾。 – admenva