再form中把ParentID加进去,然后就好了...

解决方案 »

  1.   

    在此页面对应的actionform中,添加一个对应的parentID的get,set方法。执行action的时,将得到的parentID  set到form中这样页面自然会取到相应的值
      

  2.   

    struts中第一个<html:option value="">___</html:option>是默认选中的。
    <html:option value="">ParentID</html:option>默认选中ParentID。
      

  3.   

    楼主的意思应该是按照动态显示option中的值吧!
      

  4.   

    <html:option...
    是阿是动态生成的~
      

  5.   

    就像我之前说得,option中的selected是通过其对应form中的相应值来实现的
      

  6.   

    <html:<html:select property="ParentID" style="width: 300px;">
    <html:option value="first">请选择上级板块</html:option>
    <html:option value="second">--------------</html:option>
    <html:option value="third">根节点</html:option>
    在formbean中添加ParentID属性,同时别忘了get set方法
    然后,如果ParentID的值为"third",那么页面就默认选中根节点
    如果ParentID的值为"second",那么页面就默认选中--------------
    ParentID的值可以在action中随时修改,比那个selected好用多了