How can I map multiple values from select tag in Struts 2?

前端 未结 2 596
情话喂你
情话喂你 2021-01-15 05:11

I have a multi-selection combo in my Struts2 web application. I use the ui-multisection component. When I select and submit values \"1\" and \"2\"

相关标签:
2条回答
  • 2021-01-15 05:17

    what should I do for get all value selected ?

    You should make a select tag to accept multiple options. This is done via multiple="true" in struts select tag. Then you interceptor stack is incomplete because multiselect interceptor is missing. You should add <interceptor-ref name="multiselect"/> to your interceptor stack after fileupload interceptor reference.

    0 讨论(0)
  • 2021-01-15 05:39

    Try changing

    private List<String> listIdSelected = new ArrayList<String>();
    

    to

    private List<Integer> listIdSelected = new ArrayList<Integer>();
    

    since your Getters and Setters are like that.

    0 讨论(0)
提交回复
热议问题