Struts给html select标签赋值的问题,在线等!!急
我用struts给html input text 赋值为:
<input type="text" name="projectCode" class="text2Lock" readOnly value="<s:property value="listEntryD301100.PM_PROJ_CODE" />">
但怎么给html select赋值呢?我写的:
<select id="pjcategory" name="pjcategory" class="text2"
value="<s:property value="listEntryD301100.PM_PROJ_KIND" />">
<option>海外受注PJ</option>
<option>国内受注PJ</option>
</select>
应该怎么写呢?
------解决方案--------------------
------解决方案--------------------<option value=" <s:property value="listEntryD301100.PM_PROJ_KIND" />" selected >海外受注PJ </option>
------解决方案--------------------程序内部
Java code
LabelValueBean lv = new LabelValueBean();
List list = new ArrayList();
//label=listEntryD301100.PM_PROJ_KIND value=海外受注PJ
list.add(new LabelValueBean(label,value));