openui5 icon indicating copy to clipboard operation
openui5 copied to clipboard

sap.m.TablePersoDialog

Open TheGreenToaster opened this issue 8 years ago • 6 comments

OpenUI5 version: 1.52.9 Browser/version (+device/version): Chrome Any other tested browsers/devices(OK/FAIL): None URL (minimal example if possible): None User/password (if required and possible - do not post any confidential information here): None Steps to reproduce the problem:

  1. Navigate to a page that uses Table Personalization.
  2. Navigate away from the application
  3. Reenter the same page with the Table Personalization

What is the expected result? That the page loads with out issue What happens instead? Since the introduction of Stable IDs in the sap.m.TablePersoDialog the content of this._oColumnItemTemplate does not get deregistered. This causes the applySettings of the ManagedObject to never be called and witch then causes an infinite loop. Any other information? (attach screenshot if possible) this._oColumnItemTemplate = new InputListItem(this.getId() + "-li", { label: "{Personalization>text}", content: new sap.m.CheckBox(this.getId() + "-cb", { selected: "{Personalization>visible}", select: this._fnUpdateCheckBoxes }) }).addStyleClass("sapMPersoDialogLI");

Console Error: Uncaught (in promise) Error: Error: adding element with duplicate id 'application-Account-zepapfull-component---worklist--table-PersoDialog-cb' at constructor.u.registerElement (Core-dbg.js:2828) at f.g.register (Core-dbg.js:530) at ManagedObject-dbg.js:486 at f.constructor (ManagedObject-dbg.js:516) at f.constructor (Element-dbg.js:99) at f.constructor (Control-dbg.js:141) at new f (Metadata-dbg.js:346) at constructor.d.init (TablePersoDialog-dbg.js:150) at ManagedObject-dbg.js:497 at constructor (ManagedObject-dbg.js:516)

TheGreenToaster avatar Mar 30 '18 12:03 TheGreenToaster

Can you reproduce the problem with this code here - https://jsbin.com/pihiyedobi/1/edit?html,output or by extending it? A link to public page or other example will also be helpful.

stephania87 avatar Mar 30 '18 13:03 stephania87

Can you check if the issue remains, or it was a coding issue? Another example with SmartTable controls and navigation: https://jsbin.com/voxozosoyu/edit?html,output

stephania87 avatar Jun 26 '18 16:06 stephania87

Since there is no response from the author for more than 4 weeks I'm closing the ticket.

Shtilianova avatar Jul 18 '18 11:07 Shtilianova

@Shtilianova : we have the same issue and we can't reproduce it on jsbin because (as the original author mentioned) it only occurs when the app is launched again. This needs to be reproduced in a Launchpad environment.

pdominique avatar Oct 01 '18 07:10 pdominique

Hey @pdominique,

My solution was to destroy the TablePersoDialog in the onExit hook of the view. Im not sure why the controller does not handle this automatically.

onExit: function(){
			this._oTPC.destroy();
		}

Sorry for not responding sooner but I hope this helps.

TheGreenToaster avatar Oct 01 '18 18:10 TheGreenToaster

Hey @pdominique,

My solution was to destroy the TablePersoDialog in the onExit hook of the view. Im not sure why the controller does not handle this automatically.

onExit: function(){
			this._oTPC.destroy();
		}

Sorry for not responding sooner but I hope this helps.

Thanks, we're in contact with SAP and this is what they are suggesting. I'll try to explicitly call destroy and see if this fixes our issue.

pdominique avatar Oct 01 '18 18:10 pdominique