multi-select

Implementing a dynamic ContextMenu for a Primefaces multi-select Datatable

喜欢而已 提交于 2019-11-30 04:01:53
问题 I have a paged PrimeFaces Datatable with a context menu, and i wish to implement multi-select, where the menu items in the context menu will depend on the number of items selected, as some actions will only be available when only one item is selected, and others will valid when one or more are selected. My first idea was to use the "rendered" option of individual menu items, which is set in the controller bean. This sort-of works, as indeed the correct menu items were displayed. The problem

fSelect Clear Selection

牧云@^-^@ 提交于 2019-11-30 00:21:21
问题 How to clear fSelect multi-select drop-down in click event, Here is an example By Clicking on Clear button It should remove all Selected value. (function($) { $(function() { $('.my-select-box').fSelect(); $('#ClearSelect').click(function(){ $("#fselectMulti option:selected").removeAttr("selected"); }) }); })(jQuery); <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <link href="https://facetwp.com/wp-content/plugins/facetwp/assets/vendor/fSelect/fSelect

How to create a picklist in JSF? Tried moving items using JS/jQuery, but submit errors with “Validation Error: Value is not valid”

丶灬走出姿态 提交于 2019-11-29 16:09:34
I am creating web application using JSF 2.0 where I am assigning users to view projects. For that I have two list. First list that have users who are not assigned that project and list B have users who have assigned that project. And we can interchange the data. Code I have is <t:selectManyListbox id="sourceCars" style="width: 40%;" value="#{PersonalInformationDataBean.listOfUsers}" size="10"> <t:selectItems value="#{PersonalInformationDataBean.showAllMyRemData()}" var="t" itemLabel="#{t.title}" itemValue="#{t.status}"/> </t:selectManyListbox> <span> <input type="button" value=" >> " id=

jqgrid multiselect only selects rows on the current page, if paging is enabled. How to make it select rows across pages?

谁说胖子不能爱 提交于 2019-11-29 13:57:19
问题 I noticed in the jqgrid demo (http://www.trirand.com/blog/jqgrid/jqgrid.html > Advanced > Multiselect) that only rows (visible) on the current page are selected if paging is enabled. Any tips on getting it to work across multiple pages. Or any other alternative solutions? 回答1: I know this question is kind of dusty, but I recently had a need for this functionality and found what I consider a much more clean way to do it. Instead of attaching an event to each checkbox, why not use the

Is there any native WPF Multiselect combobox available?

拥有回忆 提交于 2019-11-29 09:33:55
Even a 3rd party one will do. Thanks There is no native multiselect combobox in WPF. Please check my blog for a simple hack using expression blend to achieve a multi selection on combobox. http://jobijoy.blogspot.com/2009/02/simple-multiselect-combobox-using.html The idea is to utilize the Multi-Selection feature of ListBox in to ComboBox by editing the control template. But for accessing the selected items you might need to use the bellow line in the code. ((ListBox)cmbBox.Template.FindName("lstBox",cmbBox)).SelectedItems Where cmbBox is your combobox and lstBox is the ListBox inside the

.NET 3.5 Listbox Selected Values (Winforms)

你说的曾经没有我的故事 提交于 2019-11-29 08:45:33
I am BATTLING to get the selected values (please note VALUES not TEXT) from a Winforms Listbox that has multi-select enabled and has been bound to a database table getting the Name (as DisplayMember) and ID (as ValueMember) - I need the ID of the selected items. The listbox control has properties for SelectedValue to get one of the selected items values, but not for all selected items values. The SelectedItems property returns a Listbox.SelectedObjectCollection from which I cannot seem to extract the VALUES of the items. Please help! Thanks. Try casting each object in the collection to the

select all options in html select dynamically

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-29 08:06:44
I have two HTML selects in a form. The first is called available and contains several options: <select name="sortedby" multiple="multiple"> <option value="start"> <xsl:if test="@sortedby='start'"> <xsl:attribute name="selected">true</xsl:attribute> </xsl:if> Start time </option> <option value="thread_id"> <xsl:if test="@sortedby='thread_id'"> <xsl:attribute name="selected">true</xsl:attribute> </xsl:if> Thread Id </option> <option value="user_name"> <xsl:if test="@sortedby='user_name'"> <xsl:attribute name="selected">true</xsl:attribute> </xsl:if> Username </option> </select> The second is

ListView Multiselection

社会主义新天地 提交于 2019-11-29 07:57:07
I tried to implement the multiselection on Android ListView. I want to select/deselect more than one item and these items should keep highlighted or not. I don't want to use CheckBoxs for selecting the items. I put the functionallity in my adapter. Here is the code: public class MultiSelectionAdapter extends BaseAdapter { private List<Event> streams; private LayoutInflater inflater; private Context context; // I keep the selected items index. private static List<Integer> selectedIndexList = new ArrayList<Integer>(); public MultiSelectionAdapter(Context context, List<Event> streams) { this

PreferenceFragment.findPreference always returns NULL

夙愿已清 提交于 2019-11-29 03:57:40
I'm currently trying to make a settings menu, that will show a MultiSelectListPreference , to select multiple contacts from your contact list. At this moment, I'm receiving an NullPointerException , when i try to MultiSelectListPreference#setEntryValue(CharSequence[]) If I put the setEntries first, that one throws the same exception. I've put a breakpoint, to see step by step what happens. The variables are filled because they store Strings , they can contain a String "null", so I guess that it doesn't fail if there is no Display_Name available or so. I based the findPreference on the example

Multiselect ListBox

痞子三分冷 提交于 2019-11-29 03:04:24
I'm having trouble in multiple items selection in an ListBox. I've tried deriving new control from Selector and writing ListBox helper class which did not work (as expected). The issue with Selector class is, it does not expose SelectedItems and it's hell to bind the property and manipulate it with selection changed event. The issue with ListBox Helper class is, I'm getting the required data on multiple selection but it never hits the bound property. Does anybody know a better way to implement multiselect listbox? Thanks in advance... The ListBox has multiple selection already implemented.