2
在JSP選擇標籤指定選擇標籤的列表關鍵屬性多個值是含計劃的對象列表如何在Struts2
這裏是一個計劃類
public class Plan {
private String packageId;
private String packageName;
private String price;
public String getPackageId() {
return packageId;
}
public void setPackageId(String packageId) {
this.packageId = packageId;
}
public String getPackageName() {
return packageName;
}
public void setPackageName(String packageName) {
this.packageName = packageName;
}
public String getPrice() {
return price;
}
public void setPrice(String price) {
this.price = price;
}
}
<s:select theme="simple" list="%{#request.packageList}" listKey="packageId"
listValue="packageName" headerKey="0" headerValue="--Select--"
name="packageID" class="dropdowm" id="packageID" />
現在我想listkey to have multiple values separated by comma like(packageId,price)
我該如何做到這一點?