on 05-08-2015 5:01 PM
Hello,
I am using sap.m.table. In "sap.m.ListMode.SingleSelectLeft" if user has selected one of the list item then this selection will be retaining when user visits the page again unless I programmatically deselect before going to that page. How to make it by default none of the listitem is selected? I have similar issues with visibility of few controls. If its by default hidden in view and based on some action it would be enabled but when I go back to same page later the controls are visible .
Thanks,
Rashmi
Hi Rashmi, I used this trick to reset the selected item: At the end of attachSelectionChange method, I delete the mode selection of the table and then put it back.
var oTable = this.getView().byId("idTable");
oTable.setMode(sap.m.ListMode.SingleSelectMaster);
oTable.attachSelectionChange(function(oEvent) {
...
oTable.setMode(sap.m.ListMode.Delete); // Delete mode selection
oTable.setMode(sap.m.ListMode.SingleSelectMaster); // Put it back.
}
Hope this helps. Bye bye
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rashmi,
How about using removeSelections on the table when you are navigating back to the view with table.
Please specific the controls which you want to enable on navigation.
Hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.