开发者

struts2 select tag, second select based on value of first select

I have 2 select, I want the second select list loads based on selected value of first select. In another word first select is a list of objects, those objects each has a list of another objects. so I want load second list based on selected object of first select开发者_运维百科. I know that can be done using JQuery, but can I do this without JavaScript/JQuery?

Thanks in advance.


There is a tag that does this for you http://struts.apache.org/2.x/docs/doubleselect.html

Out of the box it probably uses Dojo API or uses a server side request to generate the second list. I have not used any of the JQuery UI in Struts.


No, you can't do this without Javascript. With static HTML you can't achieve this effect; drop-down fields on HTML forms come pre-loaded with their options, and are independent of other fields on the form.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜