openui5 icon indicating copy to clipboard operation
openui5 copied to clipboard

sap.m.Input with tabular suggestion fails when being a cell in a sap.m.Table

Open ui5moebus opened this issue 11 years ago • 2 comments

OpenUI5 version: 1.28 Browser/version (): Chrome, IE - Fails on both URL (http://jsbin.com/jiwakayuba/1/edit?html,js,output):

Steps to reproduce the problem:

  1. The sample contains two Input controls using a tabular suggestion with two columns.
  2. The topmost control is jsut a plain control and works: Initial Content is 'Sa'. Put Focus into control and clear the 'a', the Suggestion list Pops up showing 'Sa' and 'So'.
  3. Below this we have a table with two rows, containing editable controls. The first column is an Input control, defined similar to the topmost control. When you edit the control in the last row, changing Content to 's', the same popup should appear. However nothing happens.

Have debugged with some breakpoints. It looks like the Input control in the list cells are not created correctly from the template.

In the control working correctly the field _oSuggestionTable contains correct binding Information and the 'columns' aggregation as defined in the js code.

In the controls in the list cells, the _oSuggestionTable does not contain any Information like columns and binding for 'items'. These cells are created from the template via clone().

I suspect that Input.clone() does not work correctly for sap.m.Input. The special thing about this class is that the aggregations 'suggestionColumns' and 'suggestionRows' are handled specially, for the outside they look like being an aggretation of the Input control, but invoking the setters forwards this information to other aggregations in the suggestionTable. However the implementation of ManagedObject.clone only clones the aggratations in mAggreations, it knows nothing about the _oSuggestionTable.

ui5moebus avatar Jul 23 '15 15:07 ui5moebus

Hi ui5moebius, thanks for the excellent description and the sample. Issue is being tracked internally under 1570765680 Best Regards, Martin

machwitt avatar Jul 24 '15 14:07 machwitt

Fix is done in 1.34 and master

ulasenka avatar Dec 23 '15 12:12 ulasenka