struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arjuna Bandara <arjunab...@gmail.com>
Subject Re: Struts 2.5 S:Select tag with Multiple True
Date Sat, 14 Jul 2018 11:19:15 GMT
Hi, kiran,

Have you tried with "value" property?



On Sat, Jul 14, 2018, 4:31 PM Kiran Kongala <kirankongala06@gmail.com>
wrote:

> Hi Guys,
>
> We are using Struts 2.5.13 in our Enterprise Java Application and one of
> the jsp page has many Struts Select tags with multiple=true(s:select
> multiple=true) .
>
> I know that for selecting/deselecting multiple items in the list, we have
> to hold the Ctrl Key.
>
> But for the Users who are using our application, they have an issue.
>
> Suppose the User selected 5 items out of 20 in a multi select drop down by
> holding Ctrl Key and saved the page in the Add flow.
>
> In the Edit flow, the User wants to select 6th item in the existing multi
> select drop down and if the user forgets to hold the Ctrl key while
> selecting the 6th item, then all the other 5 items are deselected and only
> the 6th item is selected.
>
> Without even realizing that they deselected the other items in the list
> they save the page. By mistake they don't want that to happen.
>
> So they asked is there a way to work with the multi select by
> selecting/desecting multiple items in the list without holding the Ctrl Key
> or to stop this happening with the Select tag.
>
> So we added the below jquery script so that they can select/deselect
> without holding the Ctrl Key.
>
> jQuery('option').mousedown(function(e) {
> e.preventDefault();
> var selector = this.parentElement.id;
> jQuery(this).prop('selected', !jQuery(this).prop('selected'));
> jQuery('#' + selector).trigger('change');
> return false;
> });
>
> But this script only works in Chrome and may be FF but it doesn't work in
> IE.
>
> Because most of our Users uses the IE as the default browser and most of
> the application is tested on IE only, Is there any work around with this
> problem or is there any property in the S:SELECT which will solve this
> issue?
>
> Please help.
>
> Thanks
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message