Struts 2 Select Tag Default Value

自作多情 提交于 2019-12-07 01:18:26

You should initialize the value of the newRecord.status that should be a separate property that contains the list key value. Then simply set the default value="%{record.status}". When I said the property I mean the bean property that is accessible via OGNL.

You need to use a hash instead of a list. Notice

listKey="id" listValue="description"

Then you can set the value = the key

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!