selection

How to bind multiple selection of listview to viewmodel?

喜欢而已 提交于 2019-12-02 17:27:43
I am implementing a listview, and a button next to it. I have to be able that when i select multiple items in a listview, and then click on a button, then the selected items are put into a list. But my question is , how do i bind the selected items towards the viewmodel? I changed my selectionmode to multiple. But then, do i just have to do: SelectedItem={Binding path= selectedItems} and then make in my viewmodel a property selectedItems, and it will set these items i have selected? Or what is the right solution to do this? Christian What you can do is you can handle the Button_Click(...) in

Get selected item when double clicking on a Richfaces extendedDataTable in JSF2

最后都变了- 提交于 2019-12-02 14:56:38
问题 In my JSF 2 application I have a Richfaces extendedDataTable. When I doubleclick on a row I want to leave this page and I will display the details of the selected table entry on this other page. I tryied the following in the table page: <rich:extendedDataTable value="#{bean.loadedAnfragen}" var="anfrage" selection="#{bean.selectedAnfrage}" id="anfragenTable" selectionMode="single" onrowdblclick="showAnfrage();"> ... here are my columns ... </rich:extendedDataTable> <a4j:jsFunction name=

Observe for highlight?

巧了我就是萌 提交于 2019-12-02 13:22:58
问题 Is it possible to use nsISelectionController to watch when a a highlight/selection is made? I know that there are different selection scopes. I want to watch when a user makes a selection in the default scope seen at MXR - nsISelectionController Constants. Kind of like an addEventListener on select change but on the text nodes of the document. Thanks 回答1: I found a solution but it doesn't use nsIController as @Neil had recommended in a SO topic HERE to look at viewSource.js. Im still

Mysql select with Where and default if where condition not present

为君一笑 提交于 2019-12-02 13:22:27
I have tables Product and productDetails. In productDetails I have rows with description of product in many languages (discriminated by lang column). Not every product will have description in every language. How to make a selection that will select the description in the specified language (by Where productDescription.lang = 'en' ) and that will select a description in a default language if the specified language is not present (descriptions with default language are always present). I made this: select * from product left join productDetails on product.id = productDetails.product_id where

javascript contentEditable - wrap cross-tag selections

主宰稳场 提交于 2019-12-02 10:36:19
问题 I'm experimenting a bit with contentEditable and encountered this issue: I have the following js snippet var range = document.getSelection().getRangeAt(0); var newNode = document.createElement("span"); newNode.className = "customStyle"; range.surroundContents(newNode); and this HTML fragment: <ul> <li>the <b>only entry</b> of the list</li> </ul> <p>Some text here in paragraph</p> The js code allows to wrap the current selection with a <span> tag. It works perfectly when the selection includes

QT QItemSelectionModel to ignore columns?

戏子无情 提交于 2019-12-02 10:25:29
问题 I am trying to restrict selection of a tree to a particular column. I am using delegates heavily to create custom per-item-per-column behaviors, editors, etc. I was hoping I could somehow do this from a delegate by blocking an event or something similar. The problem is, I think i would have to create an entirely custom solution that mimics extended selection. However, after a lot of searching and very few examples, it sounds like I want a custom QItemSelectionModel on my tree view. Is this

setStart and setEnd throwing error when trying to programmatically select text in UIWebView

跟風遠走 提交于 2019-12-02 10:03:53
Here is some HTML that I am working with in my UIWebView: <div id = "1"> <span style = "background-color:red"> <a href = "10&20"> This is a link </a> </span> </div> Once the link is tapped, I want to programmatically select the link text in the UIWebView (so "This is a link" would now be highlighted with the blue iOS text selection tool). This is why I am sending some range information in the href of the a tag. This is the call I am using to try and make this programmatic selection: //set content editable true [self.webView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@

How to save select option in localStorage with jQuery?

人走茶凉 提交于 2019-12-02 09:47:20
问题 I am trying to save selected option in localStorage in HTML, so if you refresh page, the selection stays selected. I have try this: HTML: <select id="edit"> <option>1</option> <option>2</option> <option>3</option> </select> jQuery: $(function() { $('#edit').change(function() { localStorage.setItem('todoData', this.innerHTML); }); if(localStorage.getItem('todoData')){ localStorage.getItem('todoData'); } }); But this seems not to work, any ideas, realy thanks for help... Live Demo here: http:/

Get selected item when double clicking on a Richfaces extendedDataTable in JSF2

霸气de小男生 提交于 2019-12-02 09:18:19
In my JSF 2 application I have a Richfaces extendedDataTable. When I doubleclick on a row I want to leave this page and I will display the details of the selected table entry on this other page. I tryied the following in the table page: <rich:extendedDataTable value="#{bean.loadedAnfragen}" var="anfrage" selection="#{bean.selectedAnfrage}" id="anfragenTable" selectionMode="single" onrowdblclick="showAnfrage();"> ... here are my columns ... </rich:extendedDataTable> <a4j:jsFunction name="showAnfrage" action="#{bean.showAnfrage}" /> The method in the bean gets called but the selection (the row

How to get selected values in table row in android

a 夏天 提交于 2019-12-02 08:51:45
I Had the table layout with 11 table rows and check boxes each table row i want to get selected check box row value and display in a toast message on Long clicking on selected row i had done this blow but it wont works please help me with this public class Manual_AC_Fuse_ckt extends Fragment { public int []check_box_count = new int[11]; public int [] Table_Row_Count = new int[11]; TableRow table_row; TableLayout table; CheckBox check_box; int i; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View Root_view = inflater.inflate(R